Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

misleading warning over missing title #5760

Closed
brainchild0 opened this issue Sep 19, 2019 · 2 comments
Closed

misleading warning over missing title #5760

brainchild0 opened this issue Sep 19, 2019 · 2 comments

Comments

@brainchild0
Copy link

Currently, Pandoc warns if an EPUB document is created with no title metadata:

$ pandoc doc.md -o doc.epub
[WARNING] This document format requires a nonempty <title> element.
  Please specify either 'title' or 'pagetitle' in the metadata,
  e.g. by using --metadata pagetitle="..." on the command line.
  Falling back to 'doc'

You can reproduce with any MarkDown input lacking metadata.

But a faithful user is not always helped by keeping faith:

$ pandoc doc.md -o doc.epub --metadata pagetitle="Title"
[WARNING] This document format requires a nonempty <title> element.
  Please specify either 'title' or 'pagetitle' in the metadata,
  e.g. by using --metadata pagetitle="..." on the command line.
  Falling back to 'doc'

The actual resolution requires:

$ pandoc doc.md -o doc.epub --metadata title="Title"

The documentation makes no mention that I can find of pagetitle as a recognized metadata field, so removing it from the text of the warning seems like the simplest way to eliminate the conflict.

Also note, the final line is confusing to me. I interpret it to mean that the tool will generate a Word document (i.e. .doc file) instead of EPUB, but such is not what actually occurs.

@jgm jgm changed the title misleading warning over missing tite misleading warning over missing title Sep 19, 2019
@jgm
Copy link
Owner

jgm commented Sep 19, 2019

Falling back to 'doc' is saying that pandoc is using doc, the basename of your filename, as the title in the absence of an explicitly specified title.

@brainchild0
Copy link
Author

brainchild0 commented Sep 19, 2019

Oh.

I completely missed that meaning.

Maybe Using fallback title from file name: 'doc'.?

jgm added a commit that referenced this issue Sep 20, 2019
+ Use makeSection from T.P.Shared.  This deals better with
  embedded divs. (Closes #5761.)

+ Remove chapter-title class from chapter h1, for now.
  (Reverts one change made earlier; we may revisit this
  in light of #5749.)

+ Avoid issuing warning multiple times when title not set (see #5760).
@jgm jgm closed this as completed in d6b6000 Sep 20, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants