Stream: IG creation
Topic: Tables in Markdown in IGs?
Jean Duteau (Feb 22 2021 at 18:29):
I put in a table in my markdown and it is not being generated as an HTML table. Instead, I'm just getting the raw table content. For example, I have this:
| **Term** | **Definition** |
| --- | --- |
| **Batch File Format** | The file formats used to load data into PLR or receive distributions from PLR in bulk, on a delayed basis. See also Batch XML Format and Batch CSV Format. |
| **Category** | A "super-role", a category of related Provider Role Types. For example, the category "Nurse" might contain many Provider Role Types such as "LPN", RN" and so on; the category "Doctors" might contain all Provider role types assigned to doctors, and so on. |
And it is being rendered like this:
Screen-Shot-2021-02-22-at-11.29.32-AM.png
Am I doing something wrong? Or does the IG's markdown not support tables?
Lloyd McKenzie (Feb 22 2021 at 18:44):
I believe it's supported, though I've always used XHTML because I want the control it gives. @Eric Haas ?
Jose Costa Teixeira (Feb 22 2021 at 18:56):
is this part of a resource, or an MD file?
Jose Costa Teixeira (Feb 22 2021 at 18:57):
@Jean Duteau
Jean Duteau (Feb 22 2021 at 18:57):
one of my markdown pages
Jose Costa Teixeira (Feb 22 2021 at 18:58):
normally tables work.
Jose Costa Teixeira (Feb 22 2021 at 18:59):
Just a guess: do you want to replace the double quotes there by single quotes?
Jose Costa Teixeira (Feb 22 2021 at 19:01):
Tables do seem to work from MD. http://build.fhir.org/ig/hl7-be/hl7-be-wow/metamodel.html
Eric Haas (Feb 22 2021 at 19:01):
It is valid md should be fine if in a md file...
make sure is a space before and after...
Eric Haas (Feb 22 2021 at 19:03):
hint: if you want a border add '{: .grid}" on the line after it
David Pyke (Feb 22 2021 at 19:13):
Wait, you can get a grid on a MD table?
Eric Haas (Feb 22 2021 at 19:17):
yes is kramdown markdown: https://kramdown.gettalong.org/quickref.html
there are already a bunch of bootstrap and fhir classes and css styles you can access using {: .<class>}
Eric Haas (Feb 22 2021 at 19:21):
@Jean Duteau
tadaa!... https://healthedata1.github.io/Sushi-Sandbox/guidance.html
Jean Duteau (Feb 22 2021 at 19:22):
i found the problem. some of my table cells had multiple lines and it appears that isn't supported
Eric Haas (Feb 22 2021 at 19:28):
Use an HTML line break (<br />) to force a line break within a table cell:
Jean Duteau (Feb 22 2021 at 19:30):
thanks. where do I put the {:grid}? You said "on the line after it" but I can't seem to have it take effect.
David Pyke (Feb 22 2021 at 19:30):
missing the period
Jean Duteau (Feb 22 2021 at 19:33):
sigh
Jean Duteau (Feb 22 2021 at 19:33):
all good and beautiful now. thanks for the assists everyone (mostly @Eric Haas)
Eric Haas (Feb 22 2021 at 19:35):
updated version with line breaks...
https://healthedata1.github.io/Sushi-Sandbox/guidance.html
Jean Duteau (Feb 22 2021 at 19:36):
yep, i got that in all its beauty :)
Jose Costa Teixeira (Feb 22 2021 at 19:36):
the example I pasted has table formatting and line breaks if you want to look at it
John Moehrke (Feb 22 2021 at 19:40):
we need a hints for IG authors page
Jose Costa Teixeira (Feb 22 2021 at 19:41):
I was wondering if it was worth it...
Jose Costa Teixeira (Feb 22 2021 at 19:41):
I remember suffering a bit when going through this.
Jose Costa Teixeira (Feb 22 2021 at 19:42):
Should we have a markdown "fancy markdown features" in the sample or guidance IGs?
John Moehrke (Feb 22 2021 at 19:43):
the hard part is keeping it small enough to be useful . It should not cover everything or it will not be useful.
Lloyd McKenzie (Feb 22 2021 at 19:45):
Sample IG would be the best place for examples
Jose Costa Teixeira (Feb 22 2021 at 19:48):
the hard part will actually be to prioritize and produce so much guidance on these features (not only markdown). it's a pretty big list.
Eric Haas (Feb 22 2021 at 19:48):
it would be useful to point to kramdown and note how to access classes that way and that you can insert html into markdown without providing a tutorial on markdown. You kinda have to know html pretty well to use markdown beyond the basics.
Lloyd McKenzie (Feb 22 2021 at 19:50):
That's why my preference is to use XHTML in the first place. The notion is that "markdown is easier" - but it's only easy if you're doing easy things. As soon as you need to do something complex, you're pushed into funky escape syntaxes or embedding XHTML and so the "ease of use" disappears pretty quickly...
Jose Costa Teixeira (Feb 22 2021 at 19:52):
(if I type asciidoc 3 times, will it appear?) :)
Jose Costa Teixeira (Feb 22 2021 at 19:53):
I agree that Markdown is good for simple(r) stuff. At some point you're typing html and css anyway
Eric Haas (Feb 22 2021 at 19:56):
on the other hand it discipline you to keep it simple
Eric Haas (Feb 22 2021 at 19:57):
I could never see going back to html and all those stupid tags
Eric Haas (Feb 22 2021 at 19:58):
especially with great documentation frameworks like HackMD
Lloyd McKenzie (Feb 22 2021 at 19:58):
Why would you want to push toward that? If you want things to render and behave "well", then sometimes complexity is needed. I find markdown more complex in doing things like "specify the anchor for this heading distinct from the heading itself". 'Simple' results in non-reliable (and poor) anchor names.
John Moehrke (Feb 22 2021 at 21:04):
so knowing that we are using kramdown flavor of markdown is a good hint.
John Moehrke (Feb 22 2021 at 21:05):
I expect that we will learn what needs to be in the hints page by just participaing on this stream.... if it comes up here, then it likely is useful to put into the hints. If we all cooperate on the hints, it will increase at the right pace. If we try to predict what should be on the page, then it will be too big.
Frank Oemig (Feb 23 2021 at 07:16):
We can add many pages to this sample IG. Each one can concentrate on one feature...
Eric Haas (Feb 23 2021 at 15:03):
(deleted)
Grahame Grieve (Feb 24 2021 at 03:24):
(if I type asciidoc 3 times, will it appear?) :)
?
Jose Costa Teixeira (Feb 24 2021 at 05:45):
I think it would be great to have support for asciidoc as well
Grahame Grieve (Feb 24 2021 at 06:03):
I believe it's already supported
Jose Costa Teixeira (Feb 24 2021 at 06:32):
I'll retest, but IIRC we needed to add something to _congif.yml to support it. Let me confirm that
Last updated: Apr 12 2022 at 19:14 UTC