summaryrefslogtreecommitdiff
path: root/src/visitor/typesetting.rs
AgeCommit message (Collapse)AuthorFilesLines
2023-01-28refactor: move visitor, panhelper, typeset modules into mdLars Wirzenius1-85/+0
This commit just moves files around and fixes references to moved modules. Sponsored-by: author
2022-05-04(subplot): Add support for example blocksDaniel Silverstone1-1/+1
In support of #256, this adds `example` as a permitted class and ensures that we typeset it as though it were a file. This includes linting it as though it were a file too. Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2022-04-26refactor: use "diagram" instead of "graph"Lars Wirzenius1-2/+2
Change everywhere to use the word "diagram" instead of "graph. Diagram seems like the better word. It's mostly used in comments and documentation, but there was one filename and one trait name that needed changing. I used "rg -iw graph" and "find -iname '*graph*'" to find everywhere that needed changing. Sponsored-by: author
2022-04-10feat: report markup problems during typesetting as a warningLars Wirzenius1-4/+4
Sponsored-by: author
2022-04-10feat: make typesetting issues into warningsLars Wirzenius1-3/+12
Sponsored-by: author
2021-09-04chore: Fix unnecessary borrow lintsDaniel Silverstone1-1/+1
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2021-02-17refactor: make Style have methods for querying, setting fieldsLars Wirzenius1-1/+1
This seems clearer to me, and as a side effect silences a warning about changing a field outside the constructor, for a struct that implements the Default traig.
2020-11-04docgen: Support pikchr diagramsDaniel Silverstone1-0/+14
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2020-09-01feat(docgen): typeset links as footnotes in PDFLars Wirzenius1-4/+17
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).
2020-08-08refactor: split stuff from src/ast.rs into smaller modulesLars Wirzenius1-0/+49
This only moves things around, to avoid huge source code modules. It doesn't rename functions, add unit tests, or similar. * src/datafiles.rs: DataFile, DataFiles * src/metata.rs: Metadata * src/panhelper.rs: functions for querying Pandoc Attrs * src/policy.rs: the get_basedir_from function; place for later policy functions * src/typeset.rs: functions to produce Pandoc AST nodes * srv/visitor/*: various MutVisitor implementations for traversing ASTs, and their helper functions