Jianwen W.
Jianwen W.

Reputation: 3969

How to sync changes between various markup files generated by Pandoc?

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:

  1. Finish composing the hello.mkd file.
  2. Use pandoc to convert hello.mkd to hello.tex and hello.html.
  3. Edit hello.tex: add some packages, add some complicated environment to make the TeX document more beautiful.
  4. Refine 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:

Hmm...what do you think?

Upvotes: 2

Views: 259

Answers (1)

John MacFarlane
John MacFarlane

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

Related Questions