SFTtech / openage

Free (as in freedom) open source clone of the Age of Empires II engine 🚀
http://openage.dev
Other
12.73k stars 1.12k forks source link

pdflatex documentation fails because of unicode character and other things #834

Open castilma opened 7 years ago

castilma commented 7 years ago

creating the latex documentation with make doc; cd bin/doc/latex; make fails:

Chapter 53.
(./md__home_castilma_.repo_ap_openage_doc_nyan_engine_types.tex [163]

! Package inputenc Error: Unicode char ⇒ (U+21D2)
(inputenc)                not set up for use with LaTeX.

See the inputenc package documentation for explanation.
Type  H <return>  for immediate help.
 ...                                              

l.87 ... # WIP: how about checking (speed < 0) ⇒
                                                   instant before

somehow we (or doxygen) need to tell pdflatex not to choke on unicode characters. I haven't checked yet, what the option would be (maybe \usepackage[no_unicode_choke]{inputenc}) or how we would need to tell doxygen to write that options into the .tex files. I wanted to see, if this was the only problem. It wasn't. I edited mentioned file and removed the troubling character. next error:

(./md__home_castilma_.repo_ap_openage_doc_reverse_engineering_unit_stats_unit_stats.
tex

! Package array Error:  Illegal pream-token (5): `c' used.

See the array package documentation for explanation.
Type  H <return>  for immediate help.
 ...                                              

l.6 \begin{longtabu} spread 0pt [c]{*15{|X[-1]}|}

I'm confused by this. latex says check array package documentation for explanation, but longtabu is in from the tabu package. the longtabu doc mentions the c options and:

The tabu environment behaves mostly like tabular: the preamble is parsed by the macros in array.sty and some measures are performed before printing. tabu improves tabular and array:

I don't exactly understand how latex packages work, but tabu seems to somehow change the behaviour of array which causes this error? I changed the c to an r. Still the c is the problem. The question now is only, which c?

! Package array Error:  Illegal pream-token (5): `c' used.

See the array package documentation for explanation.
Type  H <return>  for immediate help.
 ...                                              

l.6 \begin{longtabu} spread 0pt [r]{*15{|X[-1]}|}

So, what now? What is the direct cause of the problem? Who needs to fix his code? EDIT: the c is not the problem, it is the 5 in {*15{...

VelorumS commented 7 years ago

Yes, if you've got non-ascii, you need inputenc (\usepackage[utf8]{inputenc}). Probably something is wrong with doxygen.

TheJJ commented 7 years ago

Maybe we can persuade Doxygen to directly use xelatex, which supports utf8 natively.

castilma commented 7 years ago

\usepackage[utf8]{inputenc} is provided. still things like Ω and ⇒ cause problems. then there are multiples of these:

]) (./d7/d7e/lzxd_8pxd.tex) (./d7/d7e/lzxd_8pxd_source.tex [4407])
(./d1/d06/constexpr_8h.tex
<dd/dc1/constexpr_8h__incl.pdf, id=148893, 186.6975pt x 178.6675pt>
<use dd/dc1/constexpr_8h__incl.pdf>
! Dimension too large.
<argument> \wd \@tempboxa 

l.17 ...dth=350pt]{df/ddc/constexpr_8h__dep__incl}

I ignored these and I ended up with

Output written on refman.pdf (5816 pages, 29849043 bytes).

After all, it contains all source files... Not sure if you'd want that. My conclusion is, that the html doc is much nicer. But we should still fix these errors (xelatex?), even if it may mean to disable latex doc creation.

castilma commented 7 years ago

sooo, I'd say we disable the latex output?