5 ms·
For my novel, I wanted to have a different style for conversations (or events) that are happening simultaneously. And I wanted to use Markdown. Rather than spri
by thangalin 3y ago
For my novel, I wanted to have a different style for conversations (or events) that are happening simultaneously. And I wanted to use Markdown. Rather than sprinkling TeX commands throughout the document, I use annotations, which were introduced by pandoc. Annotations resemble:
::: {.concurrent title="Hacker News Thread 1"}
I'm writing in an HN thread.
:::
::: {.concurrent title="Hacker News Thread 2"}
This is a separate thread.
:::
This gets styled in the PDF as:
https://i.ibb.co/ZfZXmDn/output.png https://i.ibb.co/ZfZXmDn/output.png
Later, I could opt to format the concurrent threads as two-column text ... without changing the Markdown source file.
Various styles are packed in themes, which the user can select when exporting to PDF. At present, there are only three themes:
https://github.com/DaveJarvis/keenwrite-themes/tree/main/examples/the-mill-on-the-floss https://github.com/DaveJarvis/keenwrite-themes/tree/main/exa...
There other styles in the Boschet theme, such as speech bubbles, TODOs, and so forth:
::: bubbletx
Speech sent from the device.
:::
::: bubblerx
Speech received by the device.
:::
Here's a video showing how they appear in the preview window:
https://youtu.be/7icc4oZB2I4?list=PLB-WIt1cZYLm1MMx2FBG9KWzPIoWZMKu_&t=14 https://youtu.be/7icc4oZB2I4?list=PLB-WIt1cZYLm1MMx2FBG9KWzP...
Creating a theme for tabletop role-playing games would take some elbow grease. When finished, it'd mean people could write their documents in Markdown and reuse the same theme, without having to know how TeX commands work. Knowing TeX commands is a barrier to entry for a lot of people.
- adiM 3y agoI often wonder, if one is going to add such tags anyways, why not directly use LaTeX, ConTeXt, XML, ... for example \begin{conccurrent}{Hacker News Thread} I'm writing in an HN thread. \end{concurrent} is not so different from the markdown source. All the benefits you mention are simply from using semantic markup.
- bombcar 3y agoI understand the desire to use Markdown - if you’re not using an editor that will dump the “begin/end” for you with a keystroke or two it feels faster.
- deleted 3y ago[deleted]
- o11c 3y agoThe problem with TeX is that it's a write-only imperative language. Good luck performing meaningful operations on the data. XML, for all its human-unfriendliness, is very good for declarative document layout that you can later feed into some random process.
- adiM 3y agoI use ConTeXt, and it is relatively simple to get each environment to whatever you want (plus you can code everything in Lua).
- sivakon 3y agohow do you use Context to make graphs or mind maps or flow charts? I have a hard time setting it up
- adiM 3y agoThe same way that one would use markdown :-) (you JS libs or TikZ or Metapost packages).
- thangalin 3y agoKeenWrite integrates https://kroki.io/ https://kroki.io/. A mind map in Markdown would be: ``` diagram-plantuml @startmindmap ... @endmindmap ``` See: https://kroki.io/examples.html#mind-map https://kroki.io/examples.html#mind-map The SVG output is written to a local file. KeenWrite converts Markdown to XHTML (XML), which references the local file. ConTeXt then typesets the XML, importing the local vector graphics file and formats it according to the setups defined by the theme. Kroki has other text-based formats for flow charts, Gantt charts, UML diagrams, packet diagrams, network diagrams, etc. To be concrete, create a file named "example.md": Mind Map: ``` diagram-plantuml @startmindmap skinparam monochrome true + OS ++ Ubuntu +++ Linux Mint +++ Kubuntu +++ Lubuntu +++ KDE Neon ++ LMDE ++ SolydXK ++ SteamOS ++ Raspbian -- Windows 95 -- Windows 98 -- Windows NT --- Windows 8 --- Windows 10 @endmindmap ``` Then run: ./keenwrite.sh -i example.md --theme-dir=themes/boschet -o output.pdf That outputs a PDF file with the following vector graphic (on page 3): https://i.ibb.co/SJzzYRN/output.png https://i.ibb.co/SJzzYRN/output.png
- starkparker 3y ago> Creating a theme for tabletop role-playing games would take some elbow grease The article links to several, including a convincing reproduction of basic Wizards of the Coast house style for D&D 5E: https://github.com/rpgtex/DND-5e-LaTeX-Template https://github.com/rpgtex/DND-5e-LaTeX-Template Here's another 5E one with additional sidebar styles: https://github.com/anoderay/DND-5e-LaTeX-Template/ https://github.com/anoderay/DND-5e-LaTeX-Template/ Also 5E-inspired, with a template for card accessories: https://github.com/Krozark/RPG-LaTeX-Template https://github.com/Krozark/RPG-LaTeX-Template A 5E-compatible character sheet: https://github.com/matsavage/DND-5e-LaTeX-Character-Sheet-Template https://github.com/matsavage/DND-5e-LaTeX-Character-Sheet-Te... CTAN also has packages for Basic D&D-inspired typesetting (rpg-module, also linked from the article), GURPS (gurps), generic hex boards (hexboard), and wargame hex boards with counters (wargame). There are also indie TTRPGs that've shipped using custom LaTeX templates; this one has CC-BY licensed source: https://github.com/ludus-leonis/nipajin https://github.com/ludus-leonis/nipajin And the blog author's own, with a more restrictive CC-NC-SA license: https://github.com/Vladar4/itdr https://github.com/Vladar4/itdr From personal experience, the biggest struggle is non-rectangular text wrapping around images.
- epse 3y agoI think the parent means that RPG styling in his KeenWrite system would take some elbow grease, not LaTeX