4 ms·
Markdown is a beautiful demonstration that document structure syntax can/should be simple. What most people do in Word is better done by just adjusting the docu
by kevinkoning 6mo ago
Markdown is a beautiful demonstration that document structure syntax can/should be simple. What most people do in Word is better done by just adjusting the document rendering/style, not the document structure...
I love the idea of extending markdown to include more visual elements, but if you're not careful you just reinvent HTML.
Here's my personal take on extending table syntax for charts. Easy to write, and if a renderer/parser understands the syntax you get a beautiful chart, and if it doesn't you get a table with slightly weird headings:
| Month::x | Revenue::y1 | Cost::y2 |
| -------- | ----------: | -------: |
| Jan | $82,000 | $51,000 |
| Feb | $91,000 | $56,000 |
| Mar | $95,000 | $58,000 |
- esafak 6mo agoWhat's the : in the divider?
- microflash 6mo agoThat's header alignment marker. If it's on right, the header cell is aligned to right.
- rao-v 6mo agoTables are the one thing in markdown where I’d prefer to emphasize edit ergonomics over good looking unrendered text. Making a quick manual change like adding column to a markdown table is just unfun. I’ve always thought a json like format that a linter can organize would be better. Which is all to say I really like the table proposal here - adding an optional linter to make the data look tabular in unrendered markdown will make it even better
- freedomben 6mo ago> Making a quick manual change like adding column to a markdown table is just unfun. This is one of those moments where I realize that the vim life spoils me. It's so easy to do this in vim that I don't even think about. I probably use it a dozen times per day such as commenting out code. Ctrl + v, select where you want the character, then hit I (shift + i), type your thing, hit escape, and Bob's your uncle.
- nine_k 6mo agoSame in Emacs, and, I suppose, in any editor with enough self-respect to support vertical blocks.
- jez 6mo agoEven in Vim, the editing experience falls over when making markdown tables that have non-trivial content in their cells (multiple paragraphs, a code block, etc.). I recently learned that reStructuredText supports something called "list tables": https://docutils.sourceforge.io/docs/ref/rst/directives.html#list-table https://docutils.sourceforge.io/docs/ref/rst/directives.html... Where a table is specified as a depth-2 list and then post processed into a table. Lists support the full range of block elements already: you can have multiple paragraphs, code blocks, more lists, etc. inside a list item. This syntax inspired the author of Markdoc[1] (who came from an rST background) to support tables using `<hr>`-separated lists[2] instead of nested lists (to provide more visual separation between rows). I have found various implementations of list table filters for Pandoc markdown[3][4], but have never gotten around to using any of them (and I've tossed around ideas of implementing my own). [1] https://markdoc.dev https://markdoc.dev [2] https://markdoc.dev/docs/tags#table https://markdoc.dev/docs/tags#table [3] https://github.com/pandoc-ext/list-table https://github.com/pandoc-ext/list-table [4] https://github.com/bpj/pandoc-list-table https://github.com/bpj/pandoc-list-table
- toastal 6mo agoreStructuredText & AsciiDoc are so, so much better than Markdown since they have rich feature sets to actually build documentation, blogging, & so on. It’s a massive shame everyone would prefer _yet another Markdown fork_ like the OP.
- thunderbong 6mo agoThat's basically any editor with multi-cursor capability.
- cush 6mo agoAny editor plugin makes it easy though
- drasim 5mo agocreated a vscode plugin, try it
- deleted 6mo ago[deleted]
- franga2000 6mo agoNot to defend Word et. al. too much, they have plenty of problems, but keeping the structure simple and applying a style over it is a completely supported way of doing things. I have documents with essentialy zero direct styling, just paragraph styles (for headings, bullets, code blocks, quotes) and character styles (links, inline code). The UI isn't super well optimized for that, but once you get used to it, it's so much nicer than Markdown or LaTeX for multi-page print work.