Labels, metadata

Michel Charpentier's Avatar

Michel Charpentier

Mar 13, 2015 @ 05:07 PM

I have 2 questions for which I haven't been able to find an answer:

  • When the same header appears several times in a document, LaTeX complains about multiply defined labels. The --nolabels option works fine to remove id attributes when generating html, but does not remove labels in LaTeX mode (why not?). Is there a solution, short of specifying an alternate labels by hand for each conflicting header?
  • Is there a way to specify metadata on the command-line when invoking mmd? I need to change the base header level of documents I'm not free to edit and I'd rather avoid having to generate intermediate files to add the appropriate metadata.

Thanks,

MC

  1. Support Staff 1 Posted by fletcher on Mar 13, 2015 @ 05:20 PM

    fletcher's Avatar

    1) `--nolabels` is specifically for HTML (the HTML won't validate,
    which *does* break some things in HTML-land). But as for LaTeX, why
    does it matter if `latex` complains? It still works just fine. Have a
    glass of wine (or whatever) -- it's all good.... ;)

    If you insist on soothing your inner OCD, then yes -- you can use
    non-conflicting headers, provide manual labels, or modify the source to
    not include the `autoref` functionality when outputting latex. You
    could probably also include some latex code to reassign the autoref
    command to something else innocuous.

    Personally, I recommend the wine...

    2) Metadata is simply text at the beginning, you can concatenate
    whatever you want to the front of your document before passing it to
    MMD. There's tons of info all around the internet for command-line
    tricks to help you sort out exactly what you want.

    F-

  2. Support Staff 2 Posted by fletcher on Nov 09, 2018 @ 04:44 PM

    fletcher's Avatar

    Old thread, but latest versions of the develop branch of MMD include support for the ----unique` command line option, which uses random labels for headers (including LaTeX) so that latex doesn't complain.

    F-

  3. fletcher closed this discussion on Nov 09, 2018 @ 04:44 PM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac

Recent Articles