eggdropsoap / questworlds Goto Github PK
View Code? Open in Web Editor NEWThis project forked from chaosiuminc/questworlds
Files for the Quesworlds SRD
This project forked from chaosiuminc/questworlds
Files for the Quesworlds SRD
Currently, create_context.sh compiles the markdown to TeX source (to be edited/refined/compiled manually).
Once stable, create_context.sh or its successor should either make pandoc produce ConTeXt-PDFs directly, or invoke the context engine to do so after compiling the ConTeXt source.
The preamble.ctx and preamble.book.ctx files exist because they allow hacking on the ConTeXt PDF results without having to constantly re-run pandoc.
Once stable, their contents should either be integrated into the respective context*.template files, or used as input to the -H switch of pandoc in create_context.sh.
Stripping off the hardcoded numbers in the markdown Headers to let ConTeXt generate real section numbers works, but the resulting numbering isn't tracking the original numbering right. The obstacle is twofold:
Both reasons should be respected / not affect the numbering by the ConTeXt PDF output.
Both could be fixed by having pandoc generate ownnumber=
keys in the \section
calls.
Addressing this with a filter similar to stripHeaderNumbers.lua
and a post-processor, perhaps a piece of inline Lua code in the ConTeXt template, to embed the hardcoded numbers into the sections with \section[ownnumber=]
might work. Since the context writer discards the key=value section, processing after the filter is necessary—the number can only be smuggled in via the reference=
value, which if I use a regular format, can be parsed back into a correct ownnumber=
value. Might also require a whole separate post-processor on the tex code before compiling, since I'm not sure that embedded Lua can easily grab and manipulate surrounding ConTeXt code.
(In theory it should be addressed with a simpler filter that directly places ownnumber, but Pandoc's ConTeXt writer discards the key=value section of the Pandoc AST that filters operate on.)
Just the problems caused by the tables section->caption change could be addressed by reverting that in the markdown sources, filtering to place non-display section headers that still participate in the numbering sequence, while using the filter to inject table captions. That may be more viable for long-term upstream compatibility. This still leaves the problem of sequence drift caused by upstream non-systematic hand-numbered sections (e.g., §5.0.1). That still can only be fixed by some kind of hard-coded number, such as reverting to hand-numbering in the titles, or some kind of solution using ownnumber=
.
While processing header numbers into reference fields in the AST, we can also have the script freelance and go find all the "see §x.x" text and replace with a live internal link. The reference being used to smuggle the numbering means that we'll have a regular, unique* identifier that is known accurate to use in the internal link.
* Will not be unique in case of repeated section numbers in the source. That's fine: testing shows context will just link to the first header reference, and otherwise not misbehave due the duplicate reference. It will just throw a warning during compile. On the plus side, such warnings will alert to numbering errors in the markdown sources.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.