I want to assign the German date 22. Juni 2017 to the date field of the document in the title block of Pandoc. The following works

% Titel
% Autor
% 22. Juni 2017

but I like the named specification more than this positional one, and I also need to add a subtitle. So I switched to the YAML metadata block. But now, with the German date after date:

title: 'Titel'
author: 'Autor'
date: '22. Juni 2017'

Pandoc interprets the day part (22.) as an indicator for an ordered list:

<h3 class="date"><ol start="22" style="list-style-type: decimal">
<li>Juni 2017</li>

I found that inserting a comment (which sometimes help to force a break between document parts) date: <!-- comment -->22. Juni 2017 doesn't change anything here.

The following hack suppresses the enumeration

title: 'Titel'
author: 'Autor'
date: \ 22. Juni 2017

but produces a non-breaking space that slightly disturbs the layout:

<h3 class="date">&nbsp;22. Juni 2017</h3>

Maybe I'm trying something completely wrong here?

Background information[1]

Recently I switched from LibreOffice to Pandoc for multi-media publishing. I will at least need to produce HTML and PDF (print) in the future. I'm currently working on getting a stable document (structure) for my Markdown source code that was automatically generated from *.odt (via Pandoc). That's why I'm checking HTML output: it's fastest. I suspect that issues in the interpretation of the YAML metadata block may affect other output formats as well (including LaTeX).

[1] I added some background information after the question was put on hold.

closed as off-topic by DG', Schweinebacke, Martin Schröder, Romain Picot, Stefan Pinnow Jun 22 '17 at 11:39

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "This question does not fall within the scope of TeX, LaTeX or related typesetting systems as defined in the help center." – DG', Schweinebacke, Martin Schröder, Romain Picot, Stefan Pinnow
If this question can be reworded to fit the rules in the help center, please edit the question.

  • 2
    As your issue concerns only HTML output and does not involve LaTeX your question is probably off-topic here. But the issue looks like a real bug and you should file it on github: github.com/jgm/pandoc/issues – DG' Jun 22 '17 at 10:39
  • looks like a real bug -- filed as #3755 thanks for leading. – Wolf Jun 22 '17 at 13:40
  • 1
    I tried to show that the question is indirectly TeX related (via Pandoc). – Wolf Jun 22 '17 at 14:02

Instead of non-breaking space you could use zero-width space (html: &#x200b;):

title: 'Titel'
author: 'Autor'
date: '&#x200b;22. Juni 2017'

If you want to compile a PDF from the same source you have to use either LuaLaTeX or XeLaTeX since the html entity will be rendered as the unicode character U+200B.

  • 1
    Up'd. My own fix was to escape the dot (22\.), but the question is closed meanwhile (sorry for not responding earlier), so I cannot add another answer. I really like LaTeX, but I currently prefer generating it from Pandoc Markdown. I'd expect that the date would be misinterpreted also for different output formats even LaTeX? But I think that this considerations don't make the question on-topic. So if you incorporate my solution into your answer, I'll probably accept it. – Wolf Jun 22 '17 at 13:01
  • 1
    ..also a non-breaking space after the dot would do the trick.. – Wolf Jun 22 '17 at 13:07

Not the answer you're looking for? Browse other questions tagged or ask your own question.