jkotlinski / durexforth

Modern C64 Forth
Other
230 stars 28 forks source link

Forth word index in latex documentation #459

Closed lonetech closed 2 years ago

lonetech commented 2 years ago

Builds (somewhat clumsily) HTML, ePub and PDF versions of the documentation, now with an index. Intended as a starting point for #448

Multiple passes are sadly required to get ToC and index right.

lonetech commented 2 years ago

I think it should be fine to merge. If we find a better way to do things like the epub index, we'll put that in then. For now, there's more to do and I'd love to have this as a basis.

jkotlinski commented 2 years ago

Cool! Thank you for the contribution!

jkotlinski commented 2 years ago

@lonetech after getting the changes, I get this error when building the manual. What am I missing?


(...)
Writing index file durexforth.idx
(/usr/share/texmf-dist/tex/latex/l3backend/l3backend-pdftex.def)
(./durexforth.aux) (/usr/share/texmf-dist/tex/latex/microtype/mt-cmr.cfg)
(/usr/share/texmf-dist/tex/latex/hyperref/nameref.sty
(/usr/share/texmf-dist/tex/latex/refcount/refcount.sty)
(/usr/share/texmf-dist/tex/generic/gettitlestring/gettitlestring.sty))
(./durexforth.out) (./durexforth.out)
(/usr/share/texmf-dist/tex/context/base/mkii/supp-pdf.mkii
[Loading MPS to PDF converter (version 2006.09.02).]
) (/usr/share/texmf-dist/tex/latex/epstopdf-pkg/epstopdf-base.sty
(/usr/share/texmf-dist/tex/latex/latexconfig/epstopdf-sys.cfg))
! Undefined control sequence.
l.18 \ifdef
           {\Css}{
?
lonetech commented 2 years ago

Oh my. That's not what we want; the whole point of \ifdef is to avoid running undefined control sequences. This could be a TeX distribution difference; I'm currently using texlive 2022.20220722-1 from Debian. texfaq.org suggests \ifdefined.

Could you try if https://github.com/jkotlinski/durexforth/commit/573a3597ec8a335aa102ccfa74df2750dbabc221 helps?

(Oops: that includes 3 extra lines about a coverimage, feel free to just remove them. That's WIP anyhow; while epub3 seems to allow SVG cover images, it doesn't seem supported by eg koreader or kobo.)

jkotlinski commented 2 years ago

\ifdefined did not help. \usepackage{etoolbox} did the trick.

jkotlinski commented 2 years ago

@lonetech another problem now. Any idea what might be wrong?

(this uses the script at share/texmf-dist/scripts/make4ht/make4ht)

EDIT: It looks like this is a lua/MSYS2 problem. The script tries to create a temporary file, but fails. Not sure what I can do about it.

EDIT 2: The same error appears with tex4ebook. I am not sure how I can run these scripts successfully.

make4ht -e manual.mk4 -j durexforth manual.tex
[STATUS]  make4ht: Conversion started
[STATUS]  make4ht: Input file: manual.tex
This is pdfTeX, Version 3.141592653-2.6-1.40.24 (TeX Live 2022/Built by MSYS2 project) (preloaded format=latex)
 restricted \write18 enabled.
entering extended mode
...64/share/texmf-dist/scripts/make4ht/make4ht-indexing.lua:123: attempt to index a nil value (local 'f')
make: *** [Makefile:25: durexforth.html] Error 1
jkotlinski commented 1 year ago

Probably I should simply install full texlive distribution. I will try that.

On Fri, 5 Aug 2022 at 12:49, Yann Vernier @.***> wrote:

Oh my. That's not what we want; the whole point of \ifdef is to avoid running undefined control sequences. This could be a TeX distribution difference; I'm currently using texlive 2022.20220722-1 from Debian. texfaq.org https://texfaq.org/FAQ-isdef suggests \ifdefined.

Could you try if 573a359 https://github.com/jkotlinski/durexforth/commit/573a3597ec8a335aa102ccfa74df2750dbabc221 helps?

— Reply to this email directly, view it on GitHub https://github.com/jkotlinski/durexforth/pull/459#issuecomment-1206311542, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAY34O6NKIFCQ4WOPYUPWQTVXTWSDANCNFSM55TRMSUQ . You are receiving this because you modified the open/close state.Message ID: @.***>