FHIR Chat · Tables in Markdown in IGs? · IG creation

Stream: IG creation

Topic: Tables in Markdown in IGs?


view this post on Zulip 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?

view this post on Zulip 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 ?

view this post on Zulip Jose Costa Teixeira (Feb 22 2021 at 18:56):

is this part of a resource, or an MD file?

view this post on Zulip Jose Costa Teixeira (Feb 22 2021 at 18:57):

@Jean Duteau

view this post on Zulip Jean Duteau (Feb 22 2021 at 18:57):

one of my markdown pages

view this post on Zulip Jose Costa Teixeira (Feb 22 2021 at 18:58):

normally tables work.

view this post on Zulip Jose Costa Teixeira (Feb 22 2021 at 18:59):

Just a guess: do you want to replace the double quotes there by single quotes?

view this post on Zulip 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

view this post on Zulip 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...

view this post on Zulip Eric Haas (Feb 22 2021 at 19:03):

hint: if you want a border add '{: .grid}" on the line after it

view this post on Zulip David Pyke (Feb 22 2021 at 19:13):

Wait, you can get a grid on a MD table?

view this post on Zulip 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>}

view this post on Zulip Eric Haas (Feb 22 2021 at 19:21):

@Jean Duteau
tadaa!... https://healthedata1.github.io/Sushi-Sandbox/guidance.html

view this post on Zulip 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

view this post on Zulip Eric Haas (Feb 22 2021 at 19:28):

Use an HTML line break (<br />) to force a line break within a table cell:

view this post on Zulip 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.

view this post on Zulip David Pyke (Feb 22 2021 at 19:30):

missing the period

view this post on Zulip Jean Duteau (Feb 22 2021 at 19:33):

sigh

view this post on Zulip Jean Duteau (Feb 22 2021 at 19:33):

all good and beautiful now. thanks for the assists everyone (mostly @Eric Haas)

view this post on Zulip Eric Haas (Feb 22 2021 at 19:35):

updated version with line breaks...

https://healthedata1.github.io/Sushi-Sandbox/guidance.html

view this post on Zulip Jean Duteau (Feb 22 2021 at 19:36):

yep, i got that in all its beauty :)

view this post on Zulip 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

view this post on Zulip John Moehrke (Feb 22 2021 at 19:40):

we need a hints for IG authors page

view this post on Zulip Jose Costa Teixeira (Feb 22 2021 at 19:41):

I was wondering if it was worth it...

view this post on Zulip Jose Costa Teixeira (Feb 22 2021 at 19:41):

I remember suffering a bit when going through this.

view this post on Zulip Jose Costa Teixeira (Feb 22 2021 at 19:42):

Should we have a markdown "fancy markdown features" in the sample or guidance IGs?

view this post on Zulip 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.

view this post on Zulip Lloyd McKenzie (Feb 22 2021 at 19:45):

Sample IG would be the best place for examples

view this post on Zulip 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.

view this post on Zulip 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.

view this post on Zulip 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...

view this post on Zulip Jose Costa Teixeira (Feb 22 2021 at 19:52):

(if I type asciidoc 3 times, will it appear?) :)

view this post on Zulip 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

view this post on Zulip Eric Haas (Feb 22 2021 at 19:56):

on the other hand it discipline you to keep it simple

view this post on Zulip Eric Haas (Feb 22 2021 at 19:57):

I could never see going back to html and all those stupid tags

view this post on Zulip Eric Haas (Feb 22 2021 at 19:58):

especially with great documentation frameworks like HackMD

view this post on Zulip 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.

view this post on Zulip John Moehrke (Feb 22 2021 at 21:04):

so knowing that we are using kramdown flavor of markdown is a good hint.

view this post on Zulip 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.

view this post on Zulip Frank Oemig (Feb 23 2021 at 07:16):

We can add many pages to this sample IG. Each one can concentrate on one feature...

view this post on Zulip Eric Haas (Feb 23 2021 at 15:03):

(deleted)

view this post on Zulip Grahame Grieve (Feb 24 2021 at 03:24):

(if I type asciidoc 3 times, will it appear?) :)

?

view this post on Zulip Jose Costa Teixeira (Feb 24 2021 at 05:45):

I think it would be great to have support for asciidoc as well

view this post on Zulip Grahame Grieve (Feb 24 2021 at 06:03):

I believe it's already supported

view this post on Zulip 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