[Qgis-community-team] manual in pdf

Alexander Bruy alexander.bruy at gmail.com
Sun Oct 13 09:50:18 PDT 2013


2013/10/13 Richard Duivenvoorde <richard at duif.net>:
> Yep, I saw that, but I was hoping it had something todo with certain
> character sets not available on my laptop...

As I can see, all characters are ok, but as I said before it is difficult
to read.

> Ok, that problem I had on the QGIS server also. Apparently I have
> another shell or find on my laptop. Instead of
>         find -name "*.png" -exec ebb -x {} \; \
> You need:
>         find -name "*.png" -exec ebb -x {} +; \
> (this creates bbx files for every png in that dir).
>
> Please try again.

Thanks. I fixed Makefile as you suggested, now it failed with next
messages

mkdir -p output/pdf/ru
# need to build 3x to have proper toc and index
# currently texi2pdf has bad exit status. Please ignore errors!!
# prepending the texi2pdf command with - keeps make going instead of quitting
# japanese and russion have problems, when build with texi2pdf
# as alternative we can use platex
# on Debian available in package 'texlive-lang-cjk'
This is e-pTeX, Version 3.1415926-p3.3-110825-2.4 (utf8.euc) (TeX Live
2012TeX Live 2012/Slackware (rworkman))
 restricted \write18 enabled.
entering extended mode
! Unable to read an entire line---bufsize=200000.
Please increase buf_size in texmf.cnf.
This is e-pTeX, Version 3.1415926-p3.3-110825-2.4 (utf8.euc) (TeX Live
2012TeX Live 2012/Slackware (rworkman))
 restricted \write18 enabled.
entering extended mode
! Unable to read an entire line---bufsize=200000.
Please increase buf_size in texmf.cnf.
QGISUserGuide.dvi -> QGISUserGuide.pdf
DVI ID = 98

** ERROR ** Something is wrong. Are you sure this is a DVI file?

Output file removed.
make: [pdf] Error 1 (ignored)
mv output/latex/ru/QGISUserGuide.pdf output/pdf/ru/QGIS-testing-UserGuide.pdf
mv: cannot stat 'output/latex/ru/QGISUserGuide.pdf': No such file or directory
make: *** [pdf] Error 1

> You can also just run the commands yourself (after the sphinx-build -b
> latex step):
>
> cd output/latex/ru
> find -name "*.png" -exec ebb -x {} +
> platex -interaction=batchmode QGISUserGuide.tex
> platex -interaction=batchmode QGISUserGuide.tex
> platex -interaction=batchmode QGISUserGuide.tex

Hmm, in Makefile I see only two calls for platex not three. Is this bug?

Well, tried to run above commands in manual mode. First command
(find) finished without any errors and produced no messages in
console. When I tried to run first platex command I get this:

$ platex -interaction=batchmode QGISUserGuide.tex
This is e-pTeX, Version 3.1415926-p3.3-110825-2.4 (utf8.euc) (TeX Live
2012TeX Live 2012/Slackware (rworkman))
 restricted \write18 enabled.
entering extended mode
! Unable to read an entire line---bufsize=200000.
Please increase buf_size in texmf.cnf.

Seems errors related to fact that japan and cyrillic character has
size greater than one byte and default buffer is too short for them.

So I tried to increase buffer. Using locate command I found 3
different texmf.cnf files in my directory tree. Don't know which
should be edited. But as I understand, buffer size can be set also
via environment variable. This command works for me

 buf_size=8000000 platex -interaction=batchmode QGISUserGuide.tex

After running it three times and then using dvipdfmx command from
Makefile I was able to get PDF. But it looks ugly as generated by
you: very small images, monospace font and big intervals between
letters. But at least it builds.

Hope this trick with buf_size variable will be useful.

> You can also try the 'normal' pdf workflow:
> cd output/latex/ru
> texi2pdf --quiet QGISUserGuide.tex
> texi2pdf --quiet QGISUserGuide.tex
> texi2pdf --quiet QGISUserGuide.tex

Also tried 'normal' workflow. It works for me even without any additional
tuning. Only one minor issue — each time texi2pdf runs it print

egrep: Invalid range end

but I also have this when building manual for version 1.8, so I think it is
not important.

'normal' workflow gives me nice PDF — images have correct size, fonts
looks good. I uploaded generated file for comparison here

http://wikisend.com/download/485684/QGIS-testing-UserGuide-ru.pdf

> If you are able to run one of above ways, there is something you have on
> you laptop which I do not have ...

I'll be happy to provide any info you need, just tell me.

Hope this helps a bit
Alex


More information about the Qgis-community-team mailing list