Repository navigation
pptx and xlsx readers: speaker notes, charts, hidden slides, numbers and dates #12023
nachogarcia
started this conversation in
Ideas
Replies: 1 comment 1 reply
|
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
We use the new pptx and xlsx readers to turn academic slide decks and
workbooks into Markdown for review. Thanks for adding them! Several plain
bugs are already filed as issues, each with a PR:
A few other changes add behaviour, so I'd like to check before opening PRs.
1. pptx: speaker notes. The reader never opens the
notesSlideparts.On four CC-BY academic decks from Zenodo, which hold 29 non-empty notes
between them, it reads none. I have a branch, now #12030, that reads each slide's notes
into a
::: notesdiv at the end of the slide. That is the form the pptxwriter turns into speaker notes, so pptx → Markdown → pptx keeps them.
It follows the slide's own relationship, because
notesSlideN.xmloftenisn't slide N's (in one of those decks, 32 of 33 numbers differ). It also
skips notes parts with no text.
Question: should notes be read by default? In HTML or docx output they
show up as an ordinary div. If you'd rather make them opt-in, I can put
them behind a reader extension.
2. pptx: charts. A chart currently becomes the paragraph
[Graphic: other: http://schemas.openxmlformats.org/drawingml/2006/chart].The chart part carries cached values for every series (
c:catandc:valwith their
strCache/numCache), so the reader could emit the chart'stitle and a table with one column per series, keeping the placeholder
when the chart part can't be read. Would you take that?
3. pptx: hidden slides. Slides with
show="0"are read like anyother, with nothing to mark them. Leave that as it is, mark them (for
example with a
hiddenclass on the slide's header), or skip them?4. xlsx: numbers. Values are rendered with Haskell's
show:0.05becomes
5.0e-2,12345678becomes1.2345678e7,21becomes21.0,and booleans become
1.0/0.0. I'd propose rendering them the way Excel'sGeneral format does: integers without
.0, no exponent for ordinarymagnitudes, and
TRUE/FALSE. Would you treat that as a bug fix?Or do you want a wider change that honours each cell's number format
(decimals, percentages, thousands separators)?
5. xlsx: dates. No number formats are parsed, so a date comes out as
its serial number (
45231.0). The proposal is to readnumFmtsandcellXfs. Cells with a date or time format (built-in ids 14–22 and45–47, or a custom format with date tokens) would be rendered as ISO 8601,
honouring the workbook's 1904 date system flag.
Happy to adjust any of these to fit how you'd like the readers to evolve.
All reactions