Error running make docs in peg-markdown

46 views
Skip to first unread message

Peter Valdemar Mørch

unread,
Oct 12, 2011, 7:03:25 AM10/12/11
to MultiMarkdown Discussion List
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?

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
`~`?)

[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)

Fletcher T. Penney

unread,
Oct 12, 2011, 8:35:22 AM10/12/11
to Peter Valdemar Mørch, MultiMarkdown Discussion List

On Oct 12, 2011, at 7:03 AM, Peter Valdemar Mørch wrote:

> 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-

Peter Valdemar Mørch

unread,
Oct 12, 2011, 3:21:44 PM10/12/11
to Fletcher T. Penney, MultiMarkdown Discussion List
On Wed, Oct 12, 2011 at 2:35 PM, Fletcher T. Penney
<flet...@fletcherpenney.net> wrote:
>
> On Oct 12, 2011, at 7:03 AM, Peter Valdemar Mørch wrote:
>
> > 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.

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

Fletcher T. Penney

unread,
Oct 12, 2011, 3:26:38 PM10/12/11
to Peter Valdemar Mørch, MultiMarkdown Discussion List
If you want pdf output, you simply set a flag and latexmk creates pdf instead of dvi.

F-
--  
Fletcher T. Penney

Fletcher T. Penney

unread,
Oct 12, 2011, 3:27:31 PM10/12/11
to Fletcher T. Penney, Peter Valdemar Mørch, MultiMarkdown Discussion List
Sorry - hit send too soon.

I use the file  ~/.latexmkrc with:

$pdf_mode = 1;

F-

Peter Valdemar Mørch

unread,
Oct 12, 2011, 6:24:43 PM10/12/11
to MultiMarkdown Discussion List
On Oct 12, 9:27 pm, "Fletcher T. Penney" <fletc...@fletcherpenney.net>
wrote:
> I use the file  ~/.latexmkrc with:
>
>         $pdf_mode = 1;

Hi,

This costed me hours today... (But I learned a lot about latex on the
way)

So I've sent you a pull request for the `latexmk -pdf` parameter, so
we don't all have to have a non-obvious non-documented ~/.latexmkrc.
It'll still work with it, but it isn't required any longer.

https://github.com/fletcher/peg-multimarkdown/pull/90

Peter
Reply all
Reply to author
Forward
0 new messages