Closed graymalkin closed 5 years ago
@OleMussmann I agree that it looks better without the bullet point
One possibility would be to parse
- [x] Foo
- [ ] Bar
into the pandoc structure
Div ("",["checklist"],[])
[ BulletList
[ [Plain [Span ("",["checkbox","checked"],[]) [Str "☑",Space], Str "Foo"]]
, [Plain [Span ("",["checkbox","unchecked"],[]) [Str "☐",Space], Str "Bar"]]
]
]
In most formats, this would come out as a bullet list with the unicode checkbox characters. But specific writers could be taught to give special output, e.g. the HTML output suggested above.
I suppose the extra Span wrapping the unicode string lowers the probability of a clash even further, though I guess it's not strictly necessary. But yeah, maybe it's somewhat cleaner...
Mauro Bieg notifications@github.com writes:
I suppose the extra Span wrapping the unicode string lowers the probability of a clash even further, though I guess it's not strictly necessary. But yeah, maybe it's somewhat cleaner...
The point of the extra span is to make it easy for
writers to replace it, e.g. with an input
element.
I have a hack that I'm using to render a box next to a text list.
I'm writing Markdown in Obsidian, and it allows for LaTeX math symbols, natively.
$\Box$ This is left side checkbox
Check box to the right of this line of text $\Box$
Pandoc conversions of the Markdown to pdf using --pdf-engine=xelatex
render to PDF with no issues.
It would be nice if Pandoc's GFM supported checkboxes, either through an extension or native to the GFM.
I hope I'm not just being thick here, I couldn't find anything about it in the manual, and no one appears to have mentioned it in the issue tracker.