Reputation: 3969
all. I'm using Pandoc as my writing tools. Its amazing ability to convert between various markup formats (markdown, LaTeX, HTML) impresses me. "One source file, multi output formats" sounds good, but I've got some problems about syncing changes between the markdown formats.
Let's say, I start by writing the markdown source file, name hello.mkd
. I list my tasks in time sequence:
hello.mkd
file.hello.mkd
to hello.tex
and hello.html
.hello.tex
: add some packages, add some complicated environment to make the TeX document more beautiful.hello.html
.Here comes the problem: If I find a typo, or other bugs when I edit hello.tex
, shall I fix it in .tex
immediately or shall I fix it in the source file hello.mkd
and regenerate the outputs?
Two choices for me:
hello.mkd
, then regerate all the outputs, which refer to hello.tex
and hello.html
here. Then I have to merge all changes made towards the specific file types, for example, merging all the packages/environment et al. changes into the newly generated file.hello.mkd
, hello.tex
, hello.html
, and more fixes/filetypes if you like. Well, this method requires less merge work. But it looks ridiculous because the three share-rooted markup files seem irrelevant now. Hmm...what do you think?
Upvotes: 2
Views: 259
Reputation: 8947
Try using custom templates (--template
option) to get the customization you need in HTML and LaTeX. Also look at the -H
, -B
, -A
, and --css
options. These options are designed to allow you to refine the output while still generating it from a single markdown source.
Upvotes: 5