Closed wadoli closed 13 years ago
Under what circumstances would one want to disable the use of the metadata that one entered into the document?
I've used latex-snippet.xslt with MMD2 so far (which didn't export any of the meta-data into the .tex-file) and would like to keep the meta-data in the Multimarkdown file for conversions into other formats than LaTeX.
If I include the .tex-file generated by MMD3 with the meta-data definitions at the beginning into my LaTeX frame document it breaks a few things.
This is not a problem if people stick to your recommendations for LaTeX-code generation in MMD3, though (that is, if they work with a LaTeX header- and footer-file). And for myself I can easily fix this with a simple regular expression. I just imagined some other users with a similar work-flow might run into the same problem. You could wait and see, I guess. :-)
Can you describe some real life examples of this situation? I don't want to flat out say no without better understanding the situation, but it's seeming like a rather unique situation.
Hi,
Don't include your metadata in your mmd source, but in a separate file. Then you can use the plain source in latex to be included in a master document, or prepend the metadata file for html output.
multimarkdown -t latex doc.txt > doc.tex
cat meta.txt doc.txt | multimarkdown > doc.html
Personally, I use (a modified version of) mmdmerge.pl index.txt
and use the metadata in a separate file called at the beginning of my index.
Hope it helps.
That's a good idea, thank you. I'm using Scrivener, though, and even if I delete all of the metadata in the Scrivener compile-dialogue, I still get the following two lines of metadata in the resulting MultiMarkdown file:
Language: German Format: complete
These turn up as
\def\language{German} \def\format{complete}
in my LaTeX-snippet. If I leave them there, they somehow redefine my pageheader to begin with «German =» (using the documentclass scrartcl).
I don't need a command line option all for myself, though. I'll use a regex.
A few points:
Thank you. For the moment I just use this Perl-one liner to delete the definitions (inspiration taken from here):
perl -ni -e 'print unless /^\\def\\.*/' /path/to/filename
So I'm fine and you can still add a command line option if the need/popular demand arises, Fletcher.
Sounds good. If we need to revisit this later, we can.
Scrivener 2.1 allows exporting MultiMarkdown-files without any Meta-data, as long as you don't set a language other than English for SmartyPants in the preferences, see http://www.literatureandlatte.com/forum/viewtopic.php?f=3&t=14854&p=105818
So this wish has vanished.
One thing nice to have for the beta: Would it be possible to add a command line switch to disable the output of the Metadata definitions at the beginning of the file in LaTeX-mode? I'm talking about these lines:
That would be swell.