Pandoc/Markdown weirdness [with letter case transformation in title]

Hello again!

I’m developing a workflow for outlining as discussed in this post, but when compiling for either Pandoc (DOCX), TXT or Markdown, this happens for both my chapter titles and scene titles (even if uppercase is chosen for both title and prefix):

Chapter ONE - Section Title

The expected output is this:

CHAPTER ONE - SECTION TITLE

Disabling uppercase in the compile settings seemingly fixes this issue, but I want all my chapter/scene headings and titles to be uppercase.

Any ideas?

Thank you for the help.

1 Like

Thanks, I’ve moved this over to the Scrivener for Windows section as a bug, since it clearly does not seem to be reacting to these settings when using plain-text output (whereas it does seem to work with other formats). It doesn’t look like we have that written up yet as an internal ticket, so I’ll do that.

As an aside, as a Markdown user I most often handle formatting and numbering entirely at the stylesheet level, rather than baking it into the text itself with compile settings. It depends on the kind of file you are converting to of course, how that would be done, but even CSS can do all of this, for example, inserting "Chapter two - " into <h1>Section Title</h1>, and then transforming the case to upper. So that’s a potential workaround for any file type that can do such things.

I would imagine Word with DOCX can do so—LibreOffice certainly can if not. With Pandoc you can even set up the numbering and formatting into a template and set the compile command line to use that template for the output and get the result you want in one shot.

2 Likes

35 posts were split to a new topic: Setting up numbering and heading formats in Pandoc and Typst

@AmberV, any ETA on when there’s going to be a fix for the letter case bug?

No. Unless I say at the time that it will be in the next update (means its marked fixed) and that we’re currently working on that update, there is nothing to estimate with. I filed this one as medium priority, since it involves user interface that does nothing, but there are many more urgent fixes ahead of it, like how merely opening Project Settings can increment modification dates on thousands of binder items, rendering that particular feature somewhat useless, and breaking anything that might use that information for synchronisation purposes.

2 Likes

Okay. It’s fine, just wanted to know.

Currently my workaround is to open the .md file in EditPad and use the Uppercase command.

Well, like I said elsewhere I think, I tend to prefer to solve such problems with stylesheet analogues, so that I don’t have “CHAPTER THREE” in the source, and thus much more difficult to change my mind about while designing, but it still prints that way. I’ve honestly never used these settings. But depending on what you need, that might not always be feasible.

2 Likes

So you use post-processing for numbering?

I’d put it more like, I use stylesheets to implement the numbering too, as well as the overall presentation. So ## Red Book in the text, when printed, can become something like this without any fussing about, that’s just how it opens:

1 Like

Do you use CSS for this?

That in particular is an example of an ODT template, being called upon by Pandoc’s command line arguments to inject the text into the styling. But yes, I use CSS for HTML (it has counters), too.

I haven’t looked into it, but I think Pandoc has numbering arguments too, which might be better for ebooks, if that’s what you’re looking at (CSS counters are scoped to .html files, and ebooks tend to have one file per major section; twenty Chapter One’s in other words). But Scrivener’s numbering isn’t a bad choice either, it is dynamic after all, just not after the fact. You do have to compile again if the content shifts.

2 Likes

Interesting.

I may have found another issue/unimplemented feature on Windows. Do I make a new post in more detail?

Yes, if it is unrelated that would be easier, if it doesn’t show up in search too.

1 Like