summaryrefslogtreecommitdiff
path: root/src/typeset.rs
AgeCommit message (Collapse)AuthorFilesLines
7 daysrefactor: move all typesetting (HTML generation) to src/typeset.rsLars Wirzenius1-0/+434
This paves the way for a future change where src/html.rs is replaced with the html-page crate. Signed-off-by: Lars Wirzenius <liw@liw.fi> Sponsored-by: author
2023-01-28refactor: move visitor, panhelper, typeset modules into mdLars Wirzenius1-229/+0
This commit just moves files around and fixes references to moved modules. Sponsored-by: author
2022-09-03refactor: add a type for SVG imagesLars Wirzenius1-4/+4
This allows us to not use a generic byte vector, and slightly lessens the chance of mistakes. Also, it strongly encodes what we need to know about and do with SVG images. Sponsored-by: author
2022-05-04(subplot): Add support for example blocksDaniel Silverstone1-0/+5
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-10/+10
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-8/+8
Sponsored-by: author
2022-04-10feat: make typesetting issues into warningsLars Wirzenius1-7/+7
Sponsored-by: author
2022-01-26feat: automatically use "and" on outputLars Wirzenius1-8/+18
This changes typesetting of scenarios so that when two adjacent scenario steps have the same keyword, "and" is used on the second one. This means that when input has when I do foo when I do bar the output will have when I do foo and I do bar I didn't bother to make this configurable. I don't feel that level of configuration is good. The "keyword aliases" scenario is repurposed to verify this. Sponsored-by: author
2022-01-25chore: use Display, instead of .to_stringLars Wirzenius1-1/+1
Sponsored-by: author
2021-09-07subplot: Properly support polyglot bindingsDaniel Silverstone1-1/+1
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2021-09-04chore: Fix unnecessary borrow lintsDaniel Silverstone1-1/+1
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2021-04-09chore: Clear some clippy lintsDaniel Silverstone1-4/+1
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2021-01-16typeset: recognise noNumberLines to invert default numberLinesDaniel Silverstone1-1/+9
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2020-12-18chore: Undo unnecessary allow attributesDaniel Silverstone1-2/+1
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2020-11-04docgen: Support pikchr diagramsDaniel Silverstone1-1/+18
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2020-09-01feat(docgen): typeset links as footnotes in PDFLars Wirzenius1-0/+12
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/+181
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
2019-12-14Refactor: move graphs.rs and typeset.rs into ast.rsLars Wirzenius1-94/+0
2019-12-14Refactor: typeset our own ErrorLars Wirzenius1-1/+2
2019-12-01Add: clarify what typesetting meansLars Wirzenius1-0/+4
2019-12-01Refactor: rustfmtLars Wirzenius1-7/+2
2019-11-30Change: typeset using bindings informationLars Wirzenius1-20/+61
Read bindings from the file named in the document meta data.
2019-11-30Refactor: move typesetting logic into their own modulesLars Wirzenius1-0/+53