-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
blog post about PDF attachments added, #786
- Loading branch information
1 parent
1ae773e
commit b22d515
Showing
3 changed files
with
108 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,108 @@ | ||
--- | ||
layout: post | ||
title: "Metanorma now supports PDF attachments" | ||
date: 2021-12-04 | ||
categories: documentation | ||
authors: | ||
- | ||
name: Ronald Tse | ||
email: ronald.tse@ribose.com | ||
social_links: | ||
- https://github.com/ronaldtse | ||
- | ||
name: Alexander Dyuzhev | ||
email: dyuzhev@gmail.com | ||
social_links: | ||
- https://www.linkedin.com/in/alexander-dyuzhev/ | ||
- https://github.com/Intelligent2013/ | ||
|
||
excerpt: >- | ||
Metanorma-generated PDFs now support attachments. | ||
--- | ||
== Introduction | ||
|
||
NOTE: PDF attachments feature is available *from* Metanorma v1.10.0. | ||
|
||
Increasingly, organizations are issuing PDFs that contain attachments in order | ||
to incorporate machine-readable content. | ||
|
||
Metanorma allows specifying the attachments for PDF documents, and generates the | ||
hyperlinks to the attachments. | ||
|
||
== PDF attachments | ||
|
||
Metanorma supports per-document attachments so that users that only deal | ||
with one document file can easily incorporate and link to the | ||
incorporated attachments as native document elements. | ||
|
||
Sometimes Metanorma document needs to link to non-Metanorma documents (files), | ||
but which need to be distributed together with the document, for instance: | ||
|
||
* program code, | ||
|
||
* XML, JSON, YAML files, | ||
|
||
* PDF files, | ||
|
||
* executable binaries | ||
|
||
Metanorma already supports the PDF attachments for math formulas in BIPM SI Brochure, | ||
see our post link:../2021-08-26-pdf-accessibility-for-math-formulas[Making math accessible in Metanorma PDFs], | ||
but now we extend this feature for used-defined attachments for all flavors. | ||
|
||
The attachment can be added into the Metanorma document in two steps: | ||
|
||
. encode file attachments in the bibliography section of a Metanorma document | ||
+ | ||
``` | ||
* [[[anchor,attachment:(file path of attachment relative to current file identifier)]]] | ||
``` | ||
|
||
. use the cross-reference to `<<anchor>>` in the document | ||
|
||
|
||
.Example of attaching the `sources/program.c` program code file | ||
==== | ||
``` | ||
== Scope | ||
The sample C program: <<file1>> | ||
[bibliography] | ||
== Bibliography | ||
* [[[file1,attachment:(sources/program.c)]]] | ||
``` | ||
Any cross-references to `<<file1>>` will be point to the attachment. | ||
==== | ||
|
||
.The resulted PDF with hyperlink to the attachment | ||
image::/assets/blog/2024-08-20_1.png[] | ||
|
||
.PDF attachments can be saved from the PDF file in the compatible PDF reader (Adobe Reader example) | ||
image::/assets/blog/2024-08-20_2.png[] | ||
|
||
|
||
== PDF attachments support in the PDF readers | ||
|
||
Not every PDF reader supports PDF attachments! | ||
|
||
.PDF attachment support in PDF readers on different platforms | ||
[cols="a,a,a",options="header"] | ||
|=== | ||
| Support | Platform | Application | ||
|
||
| ✓ | Windows | Adobe Reader | ||
| ✓ | macOS | Adobe Reader | ||
| ✗ | macOS | Preview | ||
| ✗ | macOS | Skim | ||
|
||
|=== | ||
|
||
|
||
== References | ||
|
||
* https://www.metanorma.org/author/topics/sections/attachments/[Attachments] |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.