Closed schanzer closed 5 months ago
After experimenting with how to programmatically convert tables from index.adoc to zlides.md, arrived at the following impressions and solution attempt:
We're often using |===
tables in almost the full diversity that AsciiDoc allows. In particular, we're using multiline cells, sometimes with multiple paragraphs, sometimes with (bulleted) lists. Markdown tables seem to require each row to correspond to one input line.
Given this, for simple tables, it may be best to continue to write slide-intended tables as before even in the AsciiDoc source. The @table
line can be safely ignored by AsciiDoc, and this type of (simple) table will work for both AsciiDoc and slides, so they don't need to be written two different ways.
However, for the general table, we still want the more featureful AsciiDoc syntax, while being satisfied with a simpler copy for slides. This is not too bad anyway, since the slides table doesn't have enough space to render in great complexity anyway. To accommodate this, I've added directives @ifslide
and @ifnotslide
which can be used to wrap tables meant for slides only and those meant for AsciiDoc only respectively. I've also made @table
be a no-op in AsciiDoc. (Of course we can use @ifslide
and @ifnotslide
for other purposes too, not just for annotating tables.)
This should let us write the simple tables once and, in situations where this isn't enough, we are still able to write a more complicated table for AsciiDoc and a less complicated one for slides. What say?
@ds26gte I'm really uncomfortable with having authors create two versions of the tables inside the lesson plan. This just moves all the bad duplication from slides.md right into the asciidoc!
I'd much rather you parse the asciidoc (ignoring the [...]
formatting at the top), identify multicolumn cells (\d+
) and insert blank cells, and generate a messed-up markdown table that the authors have to fix by hand in the slides.md
file.
'@table
directive down the road, for authors to get fed up and start using more canonical tables, or for me to try and upgrade md2googleslides
to be smarter about tables(I have the same worries about @ifslide
and @ifnoslide
, but as long as we use them VERY sparingly I think it's fine)
Messed-up translation of adoc table to md table is already available. The one thing you need to do is add an extra @table{numcols}
or @table{numcols, header}
line just before the table. The adoc preproc will skip these lines (I've made @table{...}
equivalent to @scrub{...}
for the preproc).
I could parse any [...cols...header...]
line to generate this @table{...}
line but it requires special treatment of every [
attribute line and checking its rather free-form contents to find out the number of columns and if a header row is needed. Doable (since I can obviously describe it in natlang), and I'll perhaps do it eventually, but for now, the additional @table
line should work just fine.
@ds26gte I'm ok with this for now, but I will absolutely want to parse those asciidoc lines eventually. :)
Decide how to handle roleplay
Is it written in lesson instruction voice or teacher facing?
Should we switch between roleplay and QandA?
Use QandA?
Or add the possibility for role play to have QandA directives. Perhaps this would be accomplished by using @roleplayQandA
instead of @QandA
@flannery-denny documenting our agreement last Tuesday that role-play should be written in student-facing voice, with role-play used to describe the scene and smaller instructions ("let's have TARGET and DANGER switch places!") written as instruction within QandA (probably using some custom formatting)
@retabak We can close this issue as soon as you check off the dot-plots-bar-charts-codap
:) Woohoo!
FD
Projects -- RT and ES discussed and agreed that these do not require slides; can use dummy slide ID
RT
ES
No Slides To be Built