summaryrefslogtreecommitdiff
path: root/src/lib.rs
diff options
context:
space:
mode:
authorLars Wirzenius <liw@liw.fi>2020-08-31 09:59:04 +0300
committerLars Wirzenius <liw@liw.fi>2020-09-01 09:24:59 +0300
commite265cfdc9f6afef7f969283df7f63148d91b857f (patch)
tree973041ff38944c41f10276f36dd9f197e78d7dc3 /src/lib.rs
parentb384358ac0ddcf6e8baae1c280f4d7d9930754ad (diff)
downloadsubplot-e265cfdc9f6afef7f969283df7f63148d91b857f.tar.gz
feat(docgen): typeset links as footnotes in PDF
When reading a PDF printed on paper or on a reMarkable tablet, it's not possible to see that there even is a link in a PDF. Make this more visible by typesetting the link URL as a footnote. This is not done on HTML output as web pages are read on browsers that make links easy to see. This is the first time the AST is transformed by docgen differently based on the output format. The decision of what should be done is a policy decision, best done at the topmost level: in the main function of docgen. The result of that decidion (turn links into footnotes or not) is communicated from docgen main into the ast.rs module via a new Style struct. This mechanism can later be extended for other typesetting style decisions (e.g., what fonts to use).
Diffstat (limited to 'src/lib.rs')
-rw-r--r--src/lib.rs1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/lib.rs b/src/lib.rs
index 842a264..051ef0b 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -30,6 +30,7 @@ pub use metadata::Metadata;
mod ast;
pub use ast::Document;
+pub use ast::Style;
mod scenarios;
pub use scenarios::Scenario;