Pandoc: Markdown: recent pandoc --standalone writes not clear warnings about title

Created on 6 Nov 2017  Â·  23Comments  Â·  Source: jgm/pandoc

I recently moved from pandoc 1.x to 2.0.1.1 and noticed some new not clear warnings.

Example, hello.md:


Command:

pandoc hello.md --standalone

Output:

> pandoc hello.md --standalone
[WARNING] This document format requires a nonempty <title> element.
  Please specify either 'title' or 'pagetitle' in the metadata.
  Falling back to 'hello'
<HTML output>
...

What does this warning mean?
What is wrong with the markdown file or the pandoc command?

NB: This warning is written to stderr and this causes a lot of pain on calling from
PowerShell (due to its own strange handling of stderr output of external apps).

Related issues:

Most helpful comment

+++ Roman Kuzmin [Nov 06 17 23:18 ]:

Aha, this is what I am looking for. Thank you.

Hmm, no. The title is rendered in the document itself....

If you don't want that, then set pagetitle instead of title
(as the warning suggests).

All 23 comments

+++ Roman Kuzmin [Nov 06 17 18:50 ]:

I recently moved from pandoc 1.x to 2.0.1.1 and noticed some new not
clear warnings.

Example, hello.md:
Hello

Command:
pandoc hello.md --standalone

Output:

pandoc hello.md --standalone
[WARNING] This document format requires a nonempty element.<br /> Please specify either 'title' or 'pagetitle' in the metadata.<br /> Falling back to 'hello'<br /> <HTML output><br /> ...</p> </blockquote> <p>What does this warning mean?<br /> What is wrong with the markdown file or the pandoc command?</p> </blockquote> <p>It means what it says. HTML5 requires a nonempty title<br /> element. You did not specify a title in the metadata (see<br /> the manual under "metadata" for how to do this). So pandoc<br /> is warning you that it's using the title "hello" (derived<br /> from the filename) in order to have a valid title element.<br /> This will show up in the title bar of browsers when they<br /> look at this web page.</p> <blockquote> <p>NB: This warning is written to stderr and this causes a lot of pain on<br /> calling from<br /> PowerShell (due to its own strange handling of stderr output of<br /> external apps).</p> </blockquote> <p>I wasn't aware of these issues. Can you elaborate?</p> <p>By the way, if you don't want any warnings, just use<br /> --quiet.</p> </div> <div class="card-footer"> <div class="row"> <div class="col"> <img src="https://avatars0.githubusercontent.com/u/3044?v=4&s=40" style="width:20px; height:20px;" class="mr-2 rounded float-left" alt="jgm picture"> <strong>jgm</strong> <span class="text-muted ml-1">on 6 Nov 2017</span> </div> <div class="col text-right"> </div> </div> </div> </div> <div class="card card-custom mb-4"> <div class="card-body pt-3 pb-3 markdown"> <blockquote> <p>HTML5 requires a nonempty title element. You did not specify a title in the<br /> metadata (see the manual under "metadata" for how to do this). So pandoc is<br /> warning you that it's using the title "hello" (derived from the filename) in<br /> order to have a valid title element. This will show up in the title bar of<br /> browsers when they look at this web page.</p> </blockquote> <p>I see. Can this be done without a warning? If I get the default title which<br /> pandoc chooses then I am 99% happy. In 1%, when I want a custom title, it's my<br /> duty to read the docs and set it.</p> <blockquote> <p>I wasn't aware of these issues. Can you elaborate?</p> </blockquote> <p>There more than one, including subtle depending on environments and hosts.<br /> For example, in the console host run this (i.e. in PowerShell console):</p> <pre><code class="prettyprint">pandoc.exe hello.md --standalone --output hello.html 2>&1 </code></pre> <p>As a result, I am getting something like this:</p> <pre><code class="prettyprint">pandoc.exe : [WARNING] This document format requires a nonempty <title> element. At C:\tmp\_171106_195128_pandoc_stderr\test.ps1:2 char:1 + pandoc.exe hello.md --standalone --output hello.html 2>&1 + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : NotSpecified: ([WARNING] This ...title> element.:String) [], RemoteException + FullyQualifiedErrorId : NativeCommandError Pl ease s p e c i f y ... a lot of lines with one character of the message each .... </code></pre> </div> <div class="card-footer"> <div class="row"> <div class="col"> <img src="https://avatars3.githubusercontent.com/u/927533?v=4&s=40" style="width:20px; height:20px;" class="mr-2 rounded float-left" alt="nightroman picture"> <strong>nightroman</strong> <span class="text-muted ml-1">on 6 Nov 2017</span> </div> <div class="col text-right"> </div> </div> </div> </div> <div class="card card-custom mb-4"> <div class="card-body pt-3 pb-3 markdown"> <blockquote> <p>see the manual under "metadata" for how to do this</p> </blockquote> <p>Is it this part?</p> <pre><code class="prettyprint"> Metadata blocks Extension: pandoc_title_block If the file begins with a title block % title </code></pre> <p>Then it says it is related to the extension <code>pandoc_title_block</code>.<br /> But I am not using this extension in my command.<br /> Do I have to use it then? That's strange or I miss something.</p> </div> <div class="card-footer"> <div class="row"> <div class="col"> <img src="https://avatars3.githubusercontent.com/u/927533?v=4&s=40" style="width:20px; height:20px;" class="mr-2 rounded float-left" alt="nightroman picture"> <strong>nightroman</strong> <span class="text-muted ml-1">on 6 Nov 2017</span> </div> <div class="col text-right"> </div> </div> </div> </div> <div class="card card-custom mb-4"> <div class="card-body pt-3 pb-3 markdown"> <p>Here is the PowerShell known issue <a rel="nofollow noopener" target="_blank" href="https://github.com/PowerShell/PowerShell/issues/3813">https://github.com/PowerShell/PowerShell/issues/3813</a> and the coming (who knows when) fix <a rel="nofollow noopener" target="_blank" href="https://github.com/PowerShell/PowerShell/pull/5190">https://github.com/PowerShell/PowerShell/pull/5190</a></p> <p>Currently PowerShell "wraps stderr as ErrorRecord". The result depends on the current settings and the host. It may fail, produce strange errors and output, etc. </p> </div> <div class="card-footer"> <div class="row"> <div class="col"> <img src="https://avatars3.githubusercontent.com/u/927533?v=4&s=40" style="width:20px; height:20px;" class="mr-2 rounded float-left" alt="nightroman picture"> <strong>nightroman</strong> <span class="text-muted ml-1">on 6 Nov 2017</span> </div> <div class="col text-right"> </div> </div> </div> </div> <div class="card card-custom mb-4"> <div class="card-body pt-3 pb-3 markdown"> <p>Well, that looks like a PowerShell problem, not a pandoc<br /> problem. We don't really have an alternative to writing<br /> the warnings to stderr, becaue pandoc can be used as a pipe,<br /> writing its output to stdout, and if warnings went there<br /> too, things would be messed up.</p> <p>+++ Roman Kuzmin [Nov 06 17 20:38 ]:</p> <blockquote> <p>Here is the PowerShell known issue [1]PowerShell/PowerShell#5190<br /> Currently PowerShell "wraps stderr as ErrorRecord". The result depends<br /> on settings and the host. It may fail, produce strange errors and<br /> output, etc.</p> <p>—<br /> You are receiving this because you commented.<br /> Reply to this email directly, [2]view it on GitHub, or [3]mute the<br /> thread.</p> <p>References</p> <ol> <li><a rel="nofollow noopener" target="_blank" href="https://github.com/PowerShell/PowerShell/pull/5190">https://github.com/PowerShell/PowerShell/pull/5190</a></li> <li><a rel="nofollow noopener" target="_blank" href="https://github.com/jgm/pandoc/issues/4048#issuecomment">https://github.com/jgm/pandoc/issues/4048#issuecomment</a>-342278801</li> <li><a rel="nofollow noopener" target="_blank" href="https://github.com/notifications/unsubscribe-auth/AAAL5EyzyM7sdAwR3X7Q89JYEURQsj2iks5sz25CgaJpZM4QTs7W">https://github.com/notifications/unsubscribe-auth/AAAL5EyzyM7sdAwR3X7Q89JYEURQsj2iks5sz25CgaJpZM4QTs7W</a></li> </ol> </blockquote> </div> <div class="card-footer"> <div class="row"> <div class="col"> <img src="https://avatars0.githubusercontent.com/u/3044?v=4&s=40" style="width:20px; height:20px;" class="mr-2 rounded float-left" alt="jgm picture"> <strong>jgm</strong> <span class="text-muted ml-1">on 6 Nov 2017</span> </div> <div class="col text-right"> </div> </div> </div> </div> <div class="mb-4"> <ins class="adsbygoogle" style="display:block" data-ad-client="ca-pub-3835332123789605" data-ad-slot="3731713875" data-ad-format="auto" data-full-width-responsive="true"></ins> <script> (adsbygoogle = window.adsbygoogle || []).push({}); </script> </div> <div class="card card-custom mb-4"> <div class="card-body pt-3 pb-3 markdown"> <p>+++ Roman Kuzmin [Nov 06 17 20:23 ]:</p> <blockquote> <p>Then it says it is related to the extension pandoc_title_block.<br /> But I am not using this extension in my command.</p> </blockquote> <p>It's built into pandoc's markdown by default.<br /> You can also use a YAML metadata block, or specify the<br /> title on the command line <code>--metadata title="Blah"</code>.</p> </div> <div class="card-footer"> <div class="row"> <div class="col"> <img src="https://avatars0.githubusercontent.com/u/3044?v=4&s=40" style="width:20px; height:20px;" class="mr-2 rounded float-left" alt="jgm picture"> <strong>jgm</strong> <span class="text-muted ml-1">on 6 Nov 2017</span> </div> <div class="col text-right"> </div> </div> </div> </div> <div class="card card-custom mb-4"> <div class="card-body pt-3 pb-3 markdown"> <blockquote> <p>It's built into pandoc's markdown by default.</p> </blockquote> <p>Probably not:</p> <p>Example:</p> <pre><code class="prettyprint">% title Hello </code></pre> <p>Command:</p> <pre><code class="prettyprint">pandoc hello.md --standalone --from=markdown_strict --output hello.html </code></pre> <p>Output:</p> <pre><code class="prettyprint">C:\tmp\_171106_195128_pandoc_stderr>pandoc hello.md --standalone --from=markdown_strict --output hello.html [WARNING] This document format requires a nonempty <title> element. Please specify either 'title' or 'pagetitle' in the metadata. Falling back to 'hello' </code></pre> </div> <div class="card-footer"> <div class="row"> <div class="col"> <img src="https://avatars3.githubusercontent.com/u/927533?v=4&s=40" style="width:20px; height:20px;" class="mr-2 rounded float-left" alt="nightroman picture"> <strong>nightroman</strong> <span class="text-muted ml-1">on 7 Nov 2017</span> </div> <div class="col text-right"> 👍<span class="ml-2 mr-3">1</span> </div> </div> </div> </div> <div class="card card-custom mb-4"> <div class="card-body pt-3 pb-3 markdown"> <blockquote> <p>title on the command line <code>--metadata title="Blah"</code>.</p> </blockquote> <p>Aha, this is what I am looking for. Thank you.</p> <p>No problem, if all is by design, please close.</p> <p>NB: IMHO it kind of violates the least surprise principle. I have to use not obvious tricks (documented, yes). I did not have to do this in the old version. Just my opinion.</p> </div> <div class="card-footer"> <div class="row"> <div class="col"> <img src="https://avatars3.githubusercontent.com/u/927533?v=4&s=40" style="width:20px; height:20px;" class="mr-2 rounded float-left" alt="nightroman picture"> <strong>nightroman</strong> <span class="text-muted ml-1">on 7 Nov 2017</span> </div> <div class="col text-right"> 👍<span class="ml-2 mr-3">9</span> </div> </div> </div> </div> <div class="card card-custom mb-4"> <div class="card-body pt-3 pb-3 markdown"> <blockquote> <p>Aha, this is what I am looking for. Thank you.</p> </blockquote> <p>Hmm, no. The title is rendered in the document itself....</p> </div> <div class="card-footer"> <div class="row"> <div class="col"> <img src="https://avatars3.githubusercontent.com/u/927533?v=4&s=40" style="width:20px; height:20px;" class="mr-2 rounded float-left" alt="nightroman picture"> <strong>nightroman</strong> <span class="text-muted ml-1">on 7 Nov 2017</span> </div> <div class="col text-right"> 👍<span class="ml-2 mr-3">1</span> </div> </div> </div> </div> <div class="card card-custom mb-4"> <div class="card-body pt-3 pb-3 markdown"> <p>Example:</p> <pre><code class="prettyprint">% title Hello </code></pre> <p>Command:</p> <pre><code class="prettyprint">pandoc hello.md --standalone --from=markdown_strict --output hello.html --metadata title=Blah. </code></pre> <p>Output html:</p> <pre><code class="prettyprint"><!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml" lang="" xml:lang=""> <head> <meta charset="utf-8" /> <meta name="generator" content="pandoc" /> <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes" /> <title>Blah.</title> <style type="text/css"> code{white-space: pre-wrap;} span.smallcaps{font-variant: small-caps;} div.line-block{white-space: pre-line;} div.column{display: inline-block; vertical-align: top; width: 50%;} </style> <!--[if lt IE 9]> <script src="//cdnjs.cloudflare.com/ajax/libs/html5shiv/3.7.3/html5shiv-printshiv.min.js"></script> <![endif]--> </head> <body> <header> <h1 class="title">Blah.</h1> </header> <p>% title</p> <p>Hello</p> </body> </html> </code></pre> <p>In the browser it is rendered as</p> <pre><code class="prettyprint">Blah. % title Hello </code></pre> <p>I did not mean <code>Blah.</code> to be shown in the page.<br /> Is it by design?</p> </div> <div class="card-footer"> <div class="row"> <div class="col"> <img src="https://avatars3.githubusercontent.com/u/927533?v=4&s=40" style="width:20px; height:20px;" class="mr-2 rounded float-left" alt="nightroman picture"> <strong>nightroman</strong> <span class="text-muted ml-1">on 7 Nov 2017</span> </div> <div class="col text-right"> </div> </div> </div> </div> <div class="mb-4"> <ins class="adsbygoogle" style="display:block" data-ad-client="ca-pub-3835332123789605" data-ad-slot="3731713875" data-ad-format="auto" data-full-width-responsive="true"></ins> <script> (adsbygoogle = window.adsbygoogle || []).push({}); </script> </div> <div class="card card-custom mb-4"> <div class="card-body pt-3 pb-3 markdown"> <p>You're specifying markdown_strict, which turns off pandoc<br /> extensions.</p> <p>+++ Roman Kuzmin [Nov 06 17 23:05 ]:</p> <blockquote> <pre><code class="prettyprint">It's built into pandoc's markdown by default. </code></pre> <p>Probably not:</p> <p>Example:</p> <p>% title</p> <p>Hello</p> <p>Command:<br /> pandoc hello.md --standalone --from=markdown_strict --output hello.html</p> <p>Output:<br /> C:tmp_171106_195128_pandoc_stderr>pandoc hello.md --standalone --from=markdown<br /> _strict --output hello.html<br /> [WARNING] This document format requires a nonempty <title> element.<br /> Please specify either 'title' or 'pagetitle' in the metadata.<br /> Falling back to 'hello'</p> <p>—<br /> You are receiving this because you commented.<br /> Reply to this email directly, [1]view it on GitHub, or [2]mute the<br /> thread.</p> <p>References</p> <ol> <li><a rel="nofollow noopener" target="_blank" href="https://github.com/jgm/pandoc/issues/4048#issuecomment">https://github.com/jgm/pandoc/issues/4048#issuecomment</a>-342318339</li> <li><a rel="nofollow noopener" target="_blank" href="https://github.com/notifications/unsubscribe-auth/AAAL5AHk3kJWMGJSr7A9CEFJ9ZztlVT5ks5sz5C9gaJpZM4QTs7W">https://github.com/notifications/unsubscribe-auth/AAAL5AHk3kJWMGJSr7A9CEFJ9ZztlVT5ks5sz5C9gaJpZM4QTs7W</a></li> </ol> </blockquote> </div> <div class="card-footer"> <div class="row"> <div class="col"> <img src="https://avatars0.githubusercontent.com/u/3044?v=4&s=40" style="width:20px; height:20px;" class="mr-2 rounded float-left" alt="jgm picture"> <strong>jgm</strong> <span class="text-muted ml-1">on 7 Nov 2017</span> </div> <div class="col text-right"> </div> </div> </div> </div> <div class="card card-custom mb-4"> <div class="card-body pt-3 pb-3 markdown"> <blockquote> <p>You're specifying markdown_strict, which turns off pandoc extensions.</p> </blockquote> <p><code>gfm</code>, <code>markdown_phpextra</code> -- the same issue.</p> </div> <div class="card-footer"> <div class="row"> <div class="col"> <img src="https://avatars3.githubusercontent.com/u/927533?v=4&s=40" style="width:20px; height:20px;" class="mr-2 rounded float-left" alt="nightroman picture"> <strong>nightroman</strong> <span class="text-muted ml-1">on 7 Nov 2017</span> </div> <div class="col text-right"> </div> </div> </div> </div> <div class="card card-custom mb-4"> <div class="card-body pt-3 pb-3 markdown"> <p>+++ Roman Kuzmin [Nov 06 17 23:11 ]:</p> <blockquote> <p>NB: IMHO it kind of violates the least surprise principle. I have to<br /> use not obvious tricks (documented, yes). I did not have to do this in<br /> the old version. Just my opinion.</p> </blockquote> <p>The old version would just happily produce an invalid HTML5<br /> document. If we don't want to do that, we need to put<br /> something in the title element, and I think a warning<br /> to the user that we're populating the title element with<br /> text they didn't explicitly specify is appropriate in that case.<br /> Better to be surprised by a warning than surprised by<br /> something inserted without your knowledge into the document<br /> itself.</p> </div> <div class="card-footer"> <div class="row"> <div class="col"> <img src="https://avatars0.githubusercontent.com/u/3044?v=4&s=40" style="width:20px; height:20px;" class="mr-2 rounded float-left" alt="jgm picture"> <strong>jgm</strong> <span class="text-muted ml-1">on 7 Nov 2017</span> </div> <div class="col text-right"> </div> </div> </div> </div> <div class="card card-custom mb-4"> <div class="card-body pt-3 pb-3 markdown"> <p>+++ Roman Kuzmin [Nov 06 17 23:18 ]:</p> <blockquote> <pre><code class="prettyprint">Aha, this is what I am looking for. Thank you. </code></pre> <p>Hmm, no. The title is rendered in the document itself....</p> </blockquote> <p>If you don't want that, then set pagetitle instead of title<br /> (as the warning suggests).</p> </div> <div class="card-footer"> <div class="row"> <div class="col"> <img src="https://avatars0.githubusercontent.com/u/3044?v=4&s=40" style="width:20px; height:20px;" class="mr-2 rounded float-left" alt="jgm picture"> <strong>jgm</strong> <span class="text-muted ml-1">on 7 Nov 2017</span> </div> <div class="col text-right"> 👍<span class="ml-2 mr-3">9</span> ❤<span class="ml-2 mr-3">1</span> </div> </div> </div> </div> <div class="card card-custom mb-4"> <div class="card-body pt-3 pb-3 markdown"> <blockquote> <p>gfm, markdown_phpextra -- the same issue.</p> </blockquote> <p>Well yes. These don't include pandoc-specific extensions either.<br /> Please see the MANUAL.</p> </div> <div class="card-footer"> <div class="row"> <div class="col"> <img src="https://avatars0.githubusercontent.com/u/3044?v=4&s=40" style="width:20px; height:20px;" class="mr-2 rounded float-left" alt="jgm picture"> <strong>jgm</strong> <span class="text-muted ml-1">on 7 Nov 2017</span> </div> <div class="col text-right"> </div> </div> </div> </div> <div class="mb-4"> <ins class="adsbygoogle" style="display:block" data-ad-client="ca-pub-3835332123789605" data-ad-slot="3731713875" data-ad-format="auto" data-full-width-responsive="true"></ins> <script> (adsbygoogle = window.adsbygoogle || []).push({}); </script> </div> <div class="card card-custom mb-4"> <div class="card-body pt-3 pb-3 markdown"> <p>Definitely wasn't a clear message - i didn't even notice I finally was getting beautiful CSS, it just sounds like it's totally failing. (now also will use --metadata title="Blah" since I want to not set it in the markdown till I understand more)</p> </div> <div class="card-footer"> <div class="row"> <div class="col"> <img src="https://avatars1.githubusercontent.com/u/2828955?v=4&s=40" style="width:20px; height:20px;" class="mr-2 rounded float-left" alt="FlorianHeigl picture"> <strong>FlorianHeigl</strong> <span class="text-muted ml-1">on 27 May 2018</span> </div> <div class="col text-right"> </div> </div> </div> </div> <div class="card card-custom mb-4"> <div class="card-body pt-3 pb-3 markdown"> <p>So what's the resolution here? Is there some way to put title metadata in a document of type gfm or markdown_strict? I certainly can't get pandoc to output such a gfm file from its own markdown format--it seems to strip the title off always.</p> </div> <div class="card-footer"> <div class="row"> <div class="col"> <img src="https://avatars0.githubusercontent.com/u/4564109?v=4&s=40" style="width:20px; height:20px;" class="mr-2 rounded float-left" alt="stanford-scs picture"> <strong>stanford-scs</strong> <span class="text-muted ml-1">on 20 Jun 2018</span> </div> <div class="col text-right"> </div> </div> </div> </div> <div class="card card-custom mb-4"> <div class="card-body pt-3 pb-3 markdown"> <p>No---these formats don't support metadata. However, for <code>markdown_strict</code> (but not <code>gfm</code>) you can add in support for pandoc-style yaml metadata: <code>-f markdown_strict+yaml_metadata_block</code>. (This is not currently possible in <code>gfm</code> because here we just wrap a C library.)</p> <p>stanford-scs <a rel="nofollow noopener" target="_blank" href="mailto:notifications@github.com">notifications@github.com</a> writes:</p> <blockquote> <p>So what's the resolution here? Is there some way to put title metadata in a document of type gfm or markdown_strict? I certainly can't get pandoc to output such a gfm file from its own markdown format--it seems to strip the title off always.</p> <p>--<br /> You are receiving this because you modified the open/close state.<br /> Reply to this email directly or view it on GitHub:<br /> <a rel="nofollow noopener" target="_blank" href="https://github.com/jgm/pandoc/issues/4048#issuecomment">https://github.com/jgm/pandoc/issues/4048#issuecomment</a>-398832980</p> </blockquote> </div> <div class="card-footer"> <div class="row"> <div class="col"> <img src="https://avatars0.githubusercontent.com/u/3044?v=4&s=40" style="width:20px; height:20px;" class="mr-2 rounded float-left" alt="jgm picture"> <strong>jgm</strong> <span class="text-muted ml-1">on 21 Jun 2018</span> </div> <div class="col text-right"> </div> </div> </div> </div> <div class="card card-custom mb-4"> <div class="card-body pt-3 pb-3 markdown"> <p>This continues to be really frustrating. Are you just saying don't use gfm format as input for pandoc? Otherwise, can you just break it down in really stupid terms and spoon feed me a solution here for turning a gfm file into an html file?</p> <p>Basically I would like to preview mardown files before pushing them to github by translating them to HTML. Surely I can't be the only person to want to do this. But this annoying problem is such that it is not clear whether or not pandoc could be used for the purpose. I would love a definitive answer of yes or no, and if no, suggestions for other tools would of course be welcome...</p> </div> <div class="card-footer"> <div class="row"> <div class="col"> <img src="https://avatars0.githubusercontent.com/u/4564109?v=4&s=40" style="width:20px; height:20px;" class="mr-2 rounded float-left" alt="stanford-scs picture"> <strong>stanford-scs</strong> <span class="text-muted ml-1">on 8 Aug 2018</span> </div> <div class="col text-right"> </div> </div> </div> </div> <div class="card card-custom mb-4"> <div class="card-body pt-3 pb-3 markdown"> <p>@stanford-scs this is what I ended up using:</p> <p><a rel="nofollow noopener" target="_blank" href="https://gist.github.com/FlorianHeigl/773411d0b2d180d5974508d4b716256a">https://gist.github.com/FlorianHeigl/773411d0b2d180d5974508d4b716256a</a></p> <p>I lack the css/html understanding to make anything more of it, but it is my "everyday toolchain" now. Pending inotify or other extensions that will probably take another year.<br /> At some point it was time to cut my losses and just have something good enough...</p> </div> <div class="card-footer"> <div class="row"> <div class="col"> <img src="https://avatars1.githubusercontent.com/u/2828955?v=4&s=40" style="width:20px; height:20px;" class="mr-2 rounded float-left" alt="FlorianHeigl picture"> <strong>FlorianHeigl</strong> <span class="text-muted ml-1">on 8 Aug 2018</span> </div> <div class="col text-right"> </div> </div> </div> </div> <div class="card card-custom mb-4"> <div class="card-body pt-3 pb-3 markdown"> <p>@stanford-scs if you have YAML metadata, but use GitHub extensions, you can try</p> <pre><code class="prettyprint">pandoc -f markdown_github+yaml_metadata_block </code></pre> <p>(or use <code>markdown_strict+yaml_metadata_block</code> if the only extension you need is YAML metadata.</p> <p><code>markdown_github</code> is our legacy parser for gfm. It's not as accurate as <code>gfm</code>, which you should use if you want the input to be parsed exactly as GitHub does it. But unlike <code>gfm</code> you can tack on the YAML metadata extension.</p> </div> <div class="card-footer"> <div class="row"> <div class="col"> <img src="https://avatars0.githubusercontent.com/u/3044?v=4&s=40" style="width:20px; height:20px;" class="mr-2 rounded float-left" alt="jgm picture"> <strong>jgm</strong> <span class="text-muted ml-1">on 9 Aug 2018</span> </div> <div class="col text-right"> </div> </div> </div> </div> <div class="card card-custom mb-4"> <div class="card-body pt-3 pb-3 markdown"> <p>Just hit this myself. One nice-to-have would be potentially suppressing that warning if <code>--template</code> is specified, but <code>--quiet</code> is fine with me. Overall I agree with the warning because if you use <code>$title$</code> anywhere you might be surprised. </p> </div> <div class="card-footer"> <div class="row"> <div class="col"> <img src="https://avatars1.githubusercontent.com/u/3749067?v=4&s=40" style="width:20px; height:20px;" class="mr-2 rounded float-left" alt="rwxrob picture"> <strong>rwxrob</strong> <span class="text-muted ml-1">on 16 Jan 2019</span> </div> <div class="col text-right"> </div> </div> </div> </div> <div class="card card-custom mb-4"> <div class="card-body pt-3 pb-3 markdown"> <blockquote> <p>+++ Roman Kuzmin [Nov 06 17 23:18 ]:<br /> Aha, this is what I am looking for. Thank you. Hmm, no. The title is rendered in the document itself....<br /> If you don't want that, then set pagetitle instead of title (as the warning suggests).</p> </blockquote> <p>Let's add <code>pagetitle</code> to the man page? -> pull request #6843.</p> </div> <div class="card-footer"> <div class="row"> <div class="col"> <img src="https://avatars1.githubusercontent.com/u/1617895?v=4&s=40" style="width:20px; height:20px;" class="mr-2 rounded float-left" alt="xealits picture"> <strong>xealits</strong> <span class="text-muted ml-1">on 16 Nov 2020</span> </div> <div class="col text-right"> 👍<span class="ml-2 mr-3">1</span> </div> </div> </div> </div> </div> <div class="col-12"> <div class="card card-custom mb-4"> <div class="card-body pt-3 pb-3 markdown text-center helpful"> <div class="title">Was this page helpful?</div> <div class="mt-1" onMouseLeave="rating(271580970, 0);"> <i class="fas fa-star inactive" id="star-1" onMouseOver="rating(271580970, 1);" onclick="rate(271580970, 1);"></i> <i class="fas fa-star inactive" id="star-2" onMouseOver="rating(271580970, 2);" onclick="rate(271580970, 2);"></i> <i class="fas fa-star inactive" id="star-3" onMouseOver="rating(271580970, 3);" onclick="rate(271580970, 3);"></i> <i class="fas fa-star inactive" id="star-4" onMouseOver="rating(271580970, 4);" onclick="rate(271580970, 4);"></i> <i class="fas fa-star inactive" id="star-5" onMouseOver="rating(271580970, 5);" onclick="rate(271580970, 5);"></i> </div> <div class="description text-small"><span id="rating-val">0</span> / 5 - <span id="rating-count">0</span> ratings</div> </div> </div> <div class="mb-4"> <ins class="adsbygoogle" style="display:block" data-ad-client="ca-pub-3835332123789605" data-ad-slot="3452512275" data-ad-format="auto" data-full-width-responsive="true"></ins> <script> (adsbygoogle = window.adsbygoogle || []).push({}); </script> </div> </div> </div> </div> <div class="col-12 col-lg-4"> <div id="ph-above-related"></div> <div class="card card-custom issue-box"> <div class="card-body pt-3 pb-5"> <h2 class="mb-4">Related issues</h2> <div> <strong> <a href="/pandoc/688544594/smart-quotes-don-t-work-for-multi-paragraph-quotations">Smart quotes don't work for multi-paragraph quotations</a> </strong> </div> <div class="text-muted text-small mt-2"> <img src="https://avatars3.githubusercontent.com/u/37978984?v=4&s=40" style="width:20px; height:20px;" class="mr-2 rounded float-left" alt="johnridesabike picture"> <strong class="pr-1" dir="ltr">johnridesabike</strong>  Â·  <span class="px-1" dir="ltr">4</span><span>Comments</span> </div> <hr /> <div> <strong> <a href="/pandoc/32139937/latex-ordered-list-enumerate-fails-with-missing-item">Latex: Ordered list/enumerate FAILS with "missing \item"</a> </strong> </div> <div class="text-muted text-small mt-2"> <img src="https://avatars3.githubusercontent.com/u/134942?v=4&s=40" style="width:20px; height:20px;" class="mr-2 rounded float-left" alt="eins78 picture"> <strong class="pr-1" dir="ltr">eins78</strong>  Â·  <span class="px-1" dir="ltr">5</span><span>Comments</span> </div> <hr /> <div> <strong> <a href="/pandoc/204974140/pandoc-document-conversion-failed-with-error-83">pandoc document conversion failed with error 83</a> </strong> </div> <div class="text-muted text-small mt-2"> <img src="https://avatars0.githubusercontent.com/u/21962816?v=4&s=40" style="width:20px; height:20px;" class="mr-2 rounded float-left" alt="guifh picture"> <strong class="pr-1" dir="ltr">guifh</strong>  Â·  <span class="px-1" dir="ltr">4</span><span>Comments</span> </div> <hr /> <div> <strong> <a href="/pandoc/566272057/headers-4-levels-deep-render-differently">Headers 4 levels deep render differently </a> </strong> </div> <div class="text-muted text-small mt-2"> <img src="https://avatars0.githubusercontent.com/u/1499652?v=4&s=40" style="width:20px; height:20px;" class="mr-2 rounded float-left" alt="chrissound picture"> <strong class="pr-1" dir="ltr">chrissound</strong>  Â·  <span class="px-1" dir="ltr">4</span><span>Comments</span> </div> <hr /> <div> <strong> <a href="/pandoc/37639249/docx-and-number-sections">docx and --number-sections</a> </strong> </div> <div class="text-muted text-small mt-2"> <img src="https://avatars1.githubusercontent.com/u/1370732?v=4&s=40" style="width:20px; height:20px;" class="mr-2 rounded float-left" alt="tolot27 picture"> <strong class="pr-1" dir="ltr">tolot27</strong>  Â·  <span class="px-1" dir="ltr">5</span><span>Comments</span> </div> </div> </div> <div class="sticky-top pt-4"> <ins class="adsbygoogle" style="display:block" data-ad-client="ca-pub-3835332123789605" data-ad-slot="3919948963" data-ad-format="auto" data-full-width-responsive="true"></ins> <script> (adsbygoogle = window.adsbygoogle || []).push({}); </script> <div id="ph-below-related-2" class="mt-4"> <ins class="adsbygoogle" style="display:block" data-ad-client="ca-pub-3835332123789605" data-ad-slot="3919948963" data-ad-format="auto" data-full-width-responsive="true"></ins> <script> (adsbygoogle = window.adsbygoogle || []).push({}); </script> </div> </div> </div> <div class="col-12 col-lg-4"> </div> </div> <div class="skyscraper-container"> <ins class="adsbygoogle" style="display:block" data-ad-client="ca-pub-3835332123789605" data-ad-slot="7879185320" data-ad-format="vertical" data-full-width-responsive="true"></ins> <script> (adsbygoogle = window.adsbygoogle || []).push({}); </script> </div> </div> <div class="mt-5 spacer"></div> <footer class="mt-5 pb-2 py-4 text-center mt-auto"> <div class="container"> <a class="navbar-brand logo mr-5" href="/"> <img src="/assets/img/logo.svg" width="40" height="40" alt="bleepingcoder logo"> bleeping<strong>coder</strong> </a> <div class="mt-4"> bleepingcoder.com uses publicly licensed GitHub information to provide developers around the world with solutions to their problems. We are not affiliated with GitHub, Inc. or with any developers who use GitHub for their projects. We do not host any of the videos or images on our servers. All rights belong to their respective owners. </div> <div> Source for this page: <a href="https://www.github.com/jgm/pandoc/issues/4048" rel="nofollow noreferrer" target="_blank">Source</a> </div> </div> <hr class="mb-5 mt-5"> <div class="container"> <div class="row"> <div class="col-sm-4 col-lg mb-sm-0 mb-5"> <strong>Popular programming languages</strong> <ul class="list-unstyled mb-0 mt-2"> <li class="mb-2"> <a href="/python" dir="ltr">Python</a> </li> <li class="mb-2"> <a href="/javascript" dir="ltr">JavaScript</a> </li> <li class="mb-2"> <a href="/typescript" dir="ltr">TypeScript</a> </li> <li class="mb-2"> <a href="/cpp" dir="ltr">C++</a> </li> <li class="mb-2"> <a href="/csharp" dir="ltr">C#</a> </li> </ul> </div> <div class="col-sm-4 col-lg mb-sm-0 mb-5"> <strong>Popular GitHub projects</strong> <ul class="list-unstyled mb-0 mt-2"> <li class="mb-2"> <a href="/microsoft/vscode" dir="ltr">vscode</a> </li> <li class="mb-2"> <a href="/numpy/numpy" dir="ltr">numpy</a> </li> <li class="mb-2"> <a href="/ant-design/ant-design" dir="ltr">ant-design</a> </li> <li class="mb-2"> <a href="/mui-org/material-ui" dir="ltr">material-ui</a> </li> <li class="mb-2"> <a href="/vercel/next-js" dir="ltr">next.js</a> </li> </ul> </div> <div class="col-sm-4 col-lg mb-0"> <strong>More GitHub projects</strong> <ul class="list-unstyled mb-0 mt-2"> <li class="mb-2"> <a href="/rust-lang/rust" dir="ltr">rust</a> </li> <li class="mb-2"> <a href="/moment/moment" dir="ltr">moment</a> </li> <li class="mb-2"> <a href="/yarnpkg/yarn" dir="ltr">yarn</a> </li> <li class="mb-2"> <a href="/mozilla/pdf-js" dir="ltr">pdf.js</a> </li> <li class="mb-2"> <a href="/JuliaLang/julia" dir="ltr">julia</a> </li> </ul> </div> </div> </div> <hr class="mb-5 mt-5"> <div class="container text-muted"> © 2026 bleepingcoder.com - <a href="/bleeps" rel="nofollow">Contact</a><br /> By using our site, you acknowledge that you have read and understand our <a href="/cookies" rel="nofollow">Cookie Policy</a> and <a href="/privacy" rel="nofollow">Privacy Policy</a>. </div> </footer> <script src="https://code.jquery.com/jquery-3.5.1.slim.min.js" integrity="sha256-4+XzXVhsDmqanXGHaHvgh1gMQKX40OUvDEBTu8JcmNs=" crossorigin="anonymous"></script> <script async src="https://cdn.jsdelivr.net/npm/popper.js@1.16.0/dist/umd/popper.min.js" integrity="sha384-Q6E9RHvbIyZFJoft+2mJbHaEWldlvI9IOYy5n3zV9zzTtmI3UksdQRVvoxMfooAo" crossorigin="anonymous"></script> <script src="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/js/bootstrap.min.js" integrity="sha384-wfSDF2E50Y2D1uUdj0O3uMBJnjuUD4Ih7YwaYd1iqfktj0Uod8GCExl3Og8ifwB6" crossorigin="anonymous"></script> <!--<script defer type="text/javascript" src="//s7.addthis.com/js/300/addthis_widget.js#pubid=ra-5fb2db66acbd74b2"></script>--> <script type="text/javascript" src="/assets/js/main.js"></script> <script src="https://cdn.jsdelivr.net/gh/google/code-prettify@master/loader/run_prettify.js"></script></body> </html>