> When I then run `make docs`, I get an error:
> `LaTeX Error: Cannot determine size of graphic in TextMate-prefs.png
> (no BoundingBox)`
>
> Am I doing something wrong?
Is that image file present in the documentation folder? If so, then I suspect there is a problem with your LaTeX, and not MMD.
> To get started, I cloned [peg-multimarkdown][], ran
> `update_submodules.sh` and put [LaTeX Support Files][] in their place
> at `~/texmf/tex/mmd/`. (Can I (please) put them somewhere relative to
> `./` and set a flag or environment variable, so I don't mess with
> `~`?)
I always put mine in ~/Library/texmf, but you can put them wherever you like. That's a LaTeX issue, not a MMD issue.
> [peg-multimarkdown]: https://github.com/fletcher/peg-multimarkdown.git
> [LaTeX Support Files]: https://github.com/fletcher/peg-multimarkdown-latex-support.git
>
> The entire output from `make docs` is in [make docs output](https://
> gist.github.com/1280906/)
>
> I'm interested in `make docs` to understand how the docs are made, Re:
> [What's up with the documentation for definition lists?](http://
> groups.google.com/group/multimarkdown/browse_thread/thread/
> 4d487f5a747d679e?hl=en)
Basically, make docs uses mmd_merge to combine the various separate files, then mmd to create the HTML output, and mmd -t latex to create the LaTeX file. Then it simply runs latexmk to create the PDF output. You can do it all manually, but the "make docs" command just makes it faster.
F-
Now that I've dug into latex a little, I understand why "make docs"
doesn't work for me, but I don't understand how "make docs" can work
for you. The 'docs:' rule in Makefile runs `latexmk manual.tex` and
expects to create a .pdf file. However, the [documentation for
latexmk][1] says:
By default latexmk will run the commands necessary to generate a .dvi
file.
[1]: http://www.phys.psu.edu/~collins/software/latexmk/latexmk-426.txt
Also, it seems that .eps are the only supported graphics formats for
latex (where pdflatex supports e.g. png), which is why I get the
error:
`LaTeX Error: Cannot determine size of graphic in TextMate-prefs.png
(no BoundingBox)`
Convert the image to an .eps with `convert` and s/png/eps/ in FAQ.md
and the error goes away. The .pdf file is still not generated,
however, because latexmk doesn't create .pdf files by default.
If I revert the FAQ.md change and apply this patch instead, all works
fine, and the .pdf is generated and all is well:
diff --git a/Makefile b/Makefile
index 57f12e0..93b8427 100644
--- a/Makefile
+++ b/Makefile
@@ -153,7 +153,7 @@ docs: $(PROGRAM)
mkdir -p ../manual; \
../multimarkdown manual.txt > ../manual/index.html; \
../multimarkdown -b -t latex manual.txt; \
- latexmk manual.tex; \
+ latexmk -pdf manual.tex; \
latexmk -c manual.tex; \
mv manual.pdf ../manual/mmd-manual.pdf; \
rm ../documentation/manual.t*;
[man latexmk][1] says:
-pdf Generate pdf version of document using pdflatex.
So now this question remains: Why does `latexmk` create a .pdf for
you, contrary to the documentation I could find? Do you happen to
know?
> > ... and put [LaTeX Support Files][] in their place
> > at `~/texmf/tex/mmd/`. (Can I (please) put them somewhere relative to
> > `./` and set a flag or environment variable, so I don't mess with
> > `~`?)
>
> I always put mine in ~/Library/texmf, but you can put them wherever you like. That's a LaTeX issue, not a MMD issue.
Yes, and for others who may be googling this,
export TEXMFHOME=/some/dir/texmf
does the trick ( http://www.tex.ac.uk/cgi-bin/texfaq2html?label=privinst )
Peter