pandoc icon indicating copy to clipboard operation
pandoc copied to clipboard

No single parenthesis

Open jidanni opened this issue 1 month ago • 4 comments

Pandoc man page says:

Thus, the following yields a list with numbers followed by a single parenthesis,

          9)  Ninth
         10)  Tenth
         11)  Eleventh

Sorry, there is no single parenthesis:

$ for i in 1 2 3; do echo $i\) $i; done
1) 1
2) 2
3) 3
$ for i in 1 2 3; do echo $i\) $i; done | pandoc
<ol type="1">
<li>1</li>
<li>2</li>
<li>3</li>
</ol>

No I didn't forget to turn on an extension. Same problem as 1) for (1).

Anyway you'll need pretty fancy HTML5 to get those parenthesis rendered, so maybe on the man page mention the parenthesis don't work in HTML output mode.

$ pandoc --version
pandoc 3.1.11.1

jidanni avatar Dec 07 '25 13:12 jidanni

They are parsed as having the SingleParen style, but unfortunately there isn't an easy way to make HTML output that.

jgm avatar Dec 07 '25 15:12 jgm

The CSS required to do something for this is widely supported; perhaps we could at least support it for --standalone in the default template.

silby avatar Dec 08 '25 05:12 silby

In fact the Taiwan judicial system court forms require

(一) (二) (三) (四)

i.e., ( + list-style-type: cjk-ideographic + )

But also sometimes

list-style-type: decimal;
list-style-type: trad-chinese-informal;

too, all in the same document.

jidanni avatar Dec 09 '25 04:12 jidanni

I'm open to supporting this in the standard template if someone can make precise the CSS/HTML changes required.

jgm avatar Dec 09 '25 08:12 jgm