Re: [tex4ht] tex4ebook and imakeidx - no hyperlinked index

2018-09-15 Thread Jürgen Hubert
(Forgot to CC it to the list)

Thanks for the advice.

However, I am using MiKTeX on a Windows 10 machine (using cygwin for the 
occasional Linux commands), and the installation instructions don't seem to 
work using either the Windows command terminal or cygwin (neither finds a 
"TEXMFHOME" directory, and they cannot use the "git" command either). 
Attempting some kind of workaround has caused me to accidentally break my 
MiKTeX installation, which took me all of four days to fix again.

So... before I break it _again_, I thought I'd ask if anyone here as any 
experience with installing bundles like this to MiKTeX. ;)

Best regards,

- Jürgen

> Gesendet: Mittwoch, 12. September 2018 um 21:23 Uhr
> Von: "Michal Hoftich" 
> An: "Jürgen Hubert" 
> Cc: tex4ht 
> Betreff: Re: [tex4ht] tex4ebook and imakeidx - no hyperlinked index
>
> Hello Jurgen,
> 
> 
> > I am new to this list and can at best be described as "casual LaTeX user" - 
> > I use it every year or two for some minor writing project, and then put it 
> > aside again (promptly forgetting many of the technical details in the 
> > process). For my current writing project, I need to create an epub version 
> > of the ebook I am writing. tex4ebook has generally served my needs very 
> > well, but now I also want to add an index - or rather, at least two. Some 
> > quick research indicated that the imakeidx package was the best tool for 
> > this, but now I have hit a snag:
> >
> > When I compile the LaTeX files with TeXworks (using the pdfLaTeX + 
> > MakeIndex + BibTeX option) I get proper hyperlinked indices like I want. 
> > However, if I compile them afterwards with tex4ebook (using cygwin) I do 
> > get an epub file... but the index is _not_ hyperlinked, unlike the other 
> > components of the epub file (such as the table of contents, footnotes, or 
> > other crossreferences using hyperref).
> >
> 
> tex4ht has a build in support for makeindex, but it is not really user
> friendly. I've create a support for imakeidx package with Xindy as an
> index processor. You can find it in the Helpers4ht bundle:
> 
> https://github.com/michal-h21/helpers4ht
> 
> It is not on CTAN, so you need to install it manually, I hope the
> instructions in the Install section will work for you. Detailed
> description of the usage can be found here:
> 
> https://tex.stackexchange.com/a/430819/2891
> 
> I've tried to adapt this process to your test file and here is my
> solution. I've modified your test file slightly:
> 
> -
> \documentclass[oneside]{book}
> 
> \ifdefined\HCode
>   \usepackage[xindy,noautomatic]{imakeidx}
> \else
>   \usepackage[]{imakeidx}
> \fi
> \usepackage{tex4ebook}
> \usepackage{xcolor}
> \usepackage[hyperindex=true]{hyperref}
> 
> \makeindex[intoc=true,name=index1,title=Index]
> \makeindex[intoc=true,name=index2,title=NochEinIndex]
> 
> \begin{document}
> 
> \tableofcontents
> 
> \chapter{Test}
> 
> This is a test.\index[index2]{Test 1}
> 
> This is another test.\index[index1]{Test 2}
> 
> \printindex[index1]
> \printindex[index2]
> 
> \end{document}
> --
> 
> The change here is that no automatic index generation is done with tex4ht.
> 
> The indexing support must be enabled in the configuration file, like
> myconfig.cfg:
> 
> ---
> \usepackage{indexing4ht}
> \Preamble{xhtml}
> \begin{document}
> \EndPreamble
> -
> 
> The Xindy then must be called manually. To ease this task, it is
> possible to use a build file. Like this, mybuild.mk4:
> 
> -
> Make:add("xindy", function(par)
>   par.idxfile = par.idxfile or par.input .. ".idx"
>   local modules = par.modules or {par.input}
>   local t = {}
>   for k,v in ipairs(modules) do
> t[#t+1] = "-M ".. v
>   end
>   par.moduleopt = table.concat(t, " ")
>   local xindy_call = "xindy -L ${language} -C ${encoding} ${moduleopt}
> ${idxfile}" % par
>   print(xindy_call)
>   return os.execute(xindy_call)
> end, { language = "english", encoding = "utf8"})
> 
> 
> if mode=="index" then
>   Make:htlatex {}
>   Make:xindy { idxfile="index1.idx"}
>   Make:xindy { idxfile="index2.idx"}
>   Make:htlatex {}
>   Make:htlatex {}
> elseif mode=="draft" then
>   Make:htlatex {}
> else
>   Make:htlatex {}
>   Make:htlatex {}
>   Make:htlatex {}
> end
> --
> 
> 
> The index generation can be then requested using:
> 
>  tex4ebook -m index -c myconfig.cfg -e mybuild.mk4 Test.tex
> 
> This should generate the index. As epub file doesn't contain pages,
> section numbers are used as pointers instead.
> 
> Best regards,
> Michal
>



[tex4ht] Epub index entries with umlauts (and other special characters)

2018-09-19 Thread Jürgen Hubert
Thanks for the help with getting a hyperlinked index in epub files! After some 
further discussions on the TeX Stack Exchange I was able to figure out a 
solution. The problem was that xindy-lisp.exe cannot cope with Umlauts in file 
names - you can read the details here, if you are interested:

https://tex.stackexchange.com/questions/451221/getting-xindy-to-run-from-a-directory-with-an-umlaut-in-its-path/451494

However, umlauts continue to bedevil me when making index entries. I have once 
again generated a sample tex file for showcasing the problem:

https://drive.google.com/open?id=1vrgnFB-UPOgMq0QLw2mWTMk8GZ3LjcWx

When I compile it with pdflatex + MakeIndex in MiKTeX, the index is created 
properly without any problems:

https://drive.google.com/open?id=1_g9ll3ganZM4DDyD3R1CkahwVYX8gjZz

However, when I try to compile it with the usual command:

tex4ebook -m index -c myconfig.cfg -e mybuild.mk4 Test2.tex

using the same myconfig.cfg and mybuild.mk4 as last time:

https://drive.google.com/open?id=1juflQcym-qvLheMEr26a0CtsbakFNr5K
https://drive.google.com/open?id=1TkxYOozHi_188g7FpwUZ0s_Zxnl-O_fq

the compiling process produces all sorts of error messages apparently centered 
on the entries with umlauts:

! Missing \endcsname inserted.
 
   \let 
l.9   \item \idxkeyword{Riesending-Schachth\"ohle}
  , \idxlocator{1}
? 

You can see the logfile here:

https://drive.google.com/open?id=1Q8tKD-yrl1yBV0Zpf0892pacBQGtpLzj

So... what am I still doing wrong?


Best regards,

- Jürgen Hubert



Re: [tex4ht] tex4ebook and imakeidx - no hyperlinked index

2018-09-17 Thread Jürgen Hubert
> Gesendet: Montag, 17. September 2018 um 10:41 Uhr
> Von: "Ulrike Fischer" 
> An: tex4ht@tug.org
> Betreff: Re: [tex4ht] tex4ebook and imakeidx - no hyperlinked index
>
> Am Mon, 17 Sep 2018 07:54:09 +0200 schrieb "Jürgen Hubert":
> 
> > Can't open perl script ""C:\Users\Jürgen\AppData\Local\Programs\MiKTeX
> > 2.9\scripts\xindy\xindy.pl"": No such file or directory Make4ht:
> > Fatal error. Command xindy returned exit code 2 
> > 
> > -- 
> > 
> > This has me stumped, since the xindy.pl script is, in fact,
> > located at precisely this location. Perhaps this has something to
> > do with the fact that the compiler lists the script within double
> > quotation marks ""?
> 
> I doubt it. 
> 
> If you installed miktex in multiuser mode than your xindy.pl is at
> the wrong location. It should be in the main installation tree (see
> https://sourceforge.net/p/miktex/mailman/message/35700705/). 
> 
> But "Local/Programms" sounds as if you installed in single user
> mode. If everything is up-to-date then I would suspect that the
> problem is the "ü" in the user name. 
> 
> But to test this you would have to install miktex again in another
> user account without ü in the name. ;-(
> 
> 
> What happens if you call xindy directly 
> 
> xindy --help

The same thing:

$ xindy --help
/cygdrive/c/Users/Jürgen/Google Drive/Writing/Deutsche Sagen/Sunken Castles 
Evil Poodles/LatexTests/Test/C:/Users/Jürgen/AppData/Local/Programs/MiKTeX 
2.9/scripts/xindy/../../xindy/modules: No such file or directory at 
C:\Users\Jürgen\AppData\Local\Programs\MiKTeX 2.9\scripts\xindy\xindy.pl line 
402.

For the record, this _is_ the location:

Jürgen@J▒rgen-PC /cygdrive/c/Users/Jürgen/AppData/Local/Programs/MiKTeX 
2.9/scripts/xindy
$ ls
texindy.pl xindy.pl

It would be enormously frustrating if the problem is the Umlaut in my user 
name, since that has bedeviled me a bunch of times during my attempts to 
re-install MiKTeX. Any suggestions for how to proceed?

Best regards,

- Jürgen



[tex4ht] Bold index entries

2019-05-07 Thread Jürgen Hubert
I've been using the tex4ht package for a while and I like it, but there's one 
minor issue when it comes to building a hyperlinked index that I haven't been 
able to solve.

I am using the following for my index setup:


\ifdefined\HCode
\usepackage[xindy,noautomatic]{imakeidx}
\else
\usepackage[]{imakeidx}
\fi
\usepackage{multibib}
\usepackage{tex4ebook}
\usepackage{xcolor}
\usepackage[hyperindex=true]{hyperref}


I am creating an ebook with a rather large index, and I want to make some index 
references bold to emphasize that this index. Thus, I am using

\index[topic]{dragon|textbf}

instead of

\index[topic]{dragon}

within the text. This works just fine when I use pdflatex. However, when I 
combine the ebook with the usual

tex4ebook -lm index -c myconfig.cfg -e mybuild.mk4 
Sunken_Castles_Evil_Poodles.tex

command, I get the following error:

! Undefined control sequence.
l. 114  \item dragon, \hyperindexformat {\textbf}{15}, \hyperpage{15}

Now, as far as I can tell, if I just press  on each instance the ebook 
still has a hyperlinked index with bold entries at the right places - but it is 
annoying to have to do this each and every time I compile. Does anyone know a 
way around this?

Best regards,

- Jürgen Hubert



Re: [tex4ht] Bold index entries

2019-05-07 Thread Jürgen Hubert
Sorry - I accidentally answered to Michael only when I found the solution. Here 
it is again, for the whole list:

As far as I can tell, the problem was that I was alternately generating PDF 
files with pdftex and epub files with the usual

tex4ebook -lm index -c myconfig.cfg -e mybuild.mk4 .tex

However, when compiling the epub file the compiler first attempts to read the 
existing *.ind index files (I have two, since I use two indices) before 
compiling them anew. And when attempting to read them, it comes across the 

! Undefined control sequence.
l. 114  \item dragon, \hyperindexformat {\textbf}{15}, \hyperpage{15}

error - the .ind files generated by pdflatex and tex4ebook use different file 
formats. If you use them in the opposite order, pdflatex simply overwrites the 
tex4ebook files without any error messages.

So now that I know what to look for, I simply have to remember to delete the 
*.ind files before compiling the epub file.

Best regards,

- Jürgen

> Gesendet: Mittwoch, 08. Mai 2019 um 03:36 Uhr
> Von: "Karl Berry" 
> An: jhub...@gmx.de
> Cc: tex4ht@tug.org
> Betreff: Re: [tex4ht] Bold index entries
>
> ! Undefined control sequence.
> l. 114\item dragon, \hyperindexformat {\textbf}{15}, \hyperpage{15}
> 
> It's hard to guess what the undefined control sequence is from that,
> but as an ugly workaround, it seems like either
> \def\hyperindexformat{}
> or
> \def\hyperpage{}
> could at least get rid of the error without changing anything else.
> 
> Also {\textbf}{15} doesn't look right. Unless the code somewhere has
> redefined \textbf (which I guess maybe it has), that gives an error:
> ! Argument of \textbf  has an extra }.
> 
> It needs to be just \textbf{15} for normal LaTeX to apply.
> 
> Just a couple of random thoughts :). --best, karl.
>



[tex4ht] Does tex4ht work with the "Volumes" package?

2019-07-17 Thread Jürgen Hubert
I am curious - has anyone here successfully tested tex4ht with the Volume 
package?

https://ctan.org/pkg/volumes?lang=en

This essentially allows you to split a single LaTeX document into separate 
volumes/files, keeping things like the index and table of contents consistent 
throughout.

While I don't need it right now, I can see a need a few years down the road 
when my ebook has become so large that it should be split up - and it's good to 
plan ahead.

Best regards,

- Jürgen Hubert



[tex4ht] imakeidx index question

2019-12-16 Thread Jürgen Hubert
Here is a strange phenomenon I've just discovered:

I am compiling an ebook with a hyperlinked index, using imakeidx. I am also 
giving subsubsections a counter that is separate from chapters, sections, and 
subsections - these represent individual stories within the larger book. This 
is done with

\counterwithout{subsubsection}{subsection}

Now, when the subsubsections have a higher-level subsection, like this:

2. Chapter

2.1 Section

2.1.1 Subsection

31 Story

then any index entries within  refer to "31" within the compiled epub 
document.

However, if I haven't used any preceding Subsection like this:

2. Chapter

2.2 Section

34 Story

then the index entry within  links back to "2.2" instead of "34".


Can anyone think of a workaround for this? I would really like keep a separate 
number for the individual stories, and use these as the base for index entries 
- but for many sections it just doesn't make sense to have subsections in the 
manuscript.

Best regards,

- Jürgen



Re: [tex4ht] imakeidx index question

2019-12-17 Thread Jürgen Hubert
I've put a sample setup with the same basic problem in this Google Drive folder:

https://drive.google.com/open?id=131oXr_4-VTni1VKwkjUXuiu9AdORvu7E

"1 Story" shows up correctly under the index "1", while "2 Story 2" shows up 
under the section header "2.1" because there is no preceding subsection header. 
Ideally, I want to have it show up under "2" without adding a new subsection 
header.

Best regards,

- Jürgen

> Gesendet: Dienstag, 17. Dezember 2019 um 13:06 Uhr
> Von: "Michal Hoftich" 
> An: "Jürgen Hubert" 
> Cc: tex4ht 
> Betreff: Re: [tex4ht] imakeidx index question
>
> Hi Jürgen,
> 
> > then the index entry within  links back to "2.2" instead of "34".
> > Can anyone think of a workaround for this? I would really like keep a 
> > separate number for the individual stories, and use these as the base for 
> > index entries - but for many sections it just doesn't make sense to have 
> > subsections in the manuscript.
> 
> I think we will need a full document to test that.
> 
> Best regards,
> Michal
>



Re: [tex4ht] imakeidx index question

2020-01-20 Thread Jürgen Hubert
(Sorry, forgot to reply to the list the first time...)


Thank you - and don't worry, I know how it is when work pressures and private 
projects collide. ;)

Unfortunately, this still doesn't seem to work:

https://drive.google.com/drive/folders/131oXr_4-VTni1VKwkjUXuiu9AdORvu7E?usp=sharing

When I compile the file with the usual

tex4ebook -lm index -c myconfig.cfg -e mybuild.mk4 Test.tex

it doesn't create any "topic.ind" file even though all index entries are for 
the "Topic" index. Instead, it builds a "place.ind" file for which the entries 
are simply wrong.

Best regards,

- Jürgen

> Gesendet: Freitag, 17. Januar 2020 um 17:28 Uhr
> Von: "Michal Hoftich" 
> An: "Jürgen Hubert" 
> Cc: tex4ht 
> Betreff: Re: [tex4ht] imakeidx index question
>
> Hi Jürgen,
>
> > So, any thoughts on my problem?
>
> sorry for the late reply, work keeps me abnormally busy. The indexing
> support in TeX4ht was redone last year, it is now possible to use
> Imakeidx package without any indexing4ht. I also found that it is much
> more robust to use links to each index entry instead of sections. Here
> are test files that seems to work. The build file uses Xindy, but it
> is possible to use Makeindex or Xindex instead.
>
> Best regards,
> Michal
>

> Gesendet: Freitag, 17. Januar 2020 um 17:28 Uhr
> Von: "Michal Hoftich" 
> An: "Jürgen Hubert" 
> Cc: tex4ht 
> Betreff: Re: [tex4ht] imakeidx index question
>
> Hi Jürgen,
> 
> > So, any thoughts on my problem?
> 
> sorry for the late reply, work keeps me abnormally busy. The indexing
> support in TeX4ht was redone last year, it is now possible to use
> Imakeidx package without any indexing4ht. I also found that it is much
> more robust to use links to each index entry instead of sections. Here
> are test files  that seems to work. The build file uses Xindy, but it
> is possible to use Makeindex or Xindex instead.
> 
> Best regards,
> Michal
>



Re: [tex4ht] imakeidx index question

2020-01-25 Thread Jürgen Hubert
Hello Michal,

> I should update make4ht in distributions soon, I've fixed lot of bugs
> since the last release. Meanwhile, you can try this updated version of
> mybuild.mk4:
> 
> 
> if mode=="index" then
> Make:htlatex {}
> Make:htlatex {} -- run htlatex againg to get correct links in index
> Make:xindy {idxfile="place.idx", indfile="place.ind"}
> Make:xindy {idxfile="topic.idx", indfile="topic.ind"}
> Make:htlatex {}
> Make:htlatex {}
> elseif mode=="draft" then
> Make:htlatex {}
> else
> Make:htlatex {}
> Make:htlatex {}
> Make:htlatex {}
> end
> 
> 
> It passes explicit names of the generated .ind files.

It does do that. Unfortunately, while both .ind files exist, the index entries 
have a value of "0" instead of the proper subsubsection...

https://drive.google.com/open?id=131oXr_4-VTni1VKwkjUXuiu9AdORvu7E

But maybe we should wait until the updated package becomes available before we 
try to solve this - it's probably not the best use of your time to try and come 
up with temporary fixes for an issue that isn't all that urgent right now.   ;)

On a somewhat linked note, the previous version of mybuild.mk4 had some 
xindy-related code you recommended to me:

https://tug.org/pipermail/tex4ht/2018q3/002065.html

-
Make:add("xindy", function(par)
  par.idxfile = par.idxfile or par.input .. ".idx"
  local modules = par.modules or {par.input}
  local t = {}
  for k,v in ipairs(modules) do
t[#t+1] = "-M ".. v
  end
  par.moduleopt = table.concat(t, " ")
  local xindy_call = "xindy -L ${language} -C ${encoding} ${moduleopt}
${idxfile}" % par
  print(xindy_call)
  return os.execute(xindy_call)
end, { language = "english", encoding = "utf8"})
-

While it is not necessary for compiling the epub file, pdflatex doesn't work 
without it (and I need to compile PDFs as well from the base .tex files). Is it 
okay if I just leave it in (it's not included in these test files right now), 
or does it interfere with the epub compiling process?

Best regards,

- Jürgen



Re: [tex4ht] imakeidx index question

2020-01-22 Thread Jürgen Hubert
Hello Michal,

> I can see the issue now. This was caused by a bug in make4ht indexing
> support. It used one .ind file to generate all indices. It should be
> fixed in the development version of make4ht now.

I've been using the 0.3c version (dated Nov 27) since January 17th. Presumably 
I need to write some of the file from this repository over that version?

http://svn.gnu.org.ua/viewvc/tex4ht/trunk/

Alternatively, if this fix becomes available via the usual package repositories 
accessible by MiKTex within the next month or two I can wait for a while - this 
is something I should fix before the ebook is published, but it's not urgent 
yet.   ;)

Best regards,

- Jürgen




Re: [tex4ht] imakeidx index question

2020-01-27 Thread Jürgen Hubert
Hello Michal

> Von: "Michal Hoftich" 

>
> Hi Jürgen,
> 
> > It does do that. Unfortunately, while both .ind files exist, the index 
> > entries have a value of "0" instead of the proper subsubsection...
> >
> > https://drive.google.com/open?id=131oXr_4-VTni1VKwkjUXuiu9AdORvu7E
> >
> > But maybe we should wait until the updated package becomes available before 
> > we try to solve this - it's probably not the best use of your time to try 
> > and come up with temporary fixes for an issue that isn't all that urgent 
> > right now.   ;)
> 
> The updated make4ht is included in TeX Live now. But the zero pages
> seems like an issue on TeX side.
> 
> 
> > While it is not necessary for compiling the epub file, pdflatex doesn't 
> > work without it (and I need to compile PDFs as well from the base .tex 
> > files). Is it okay if I just leave it in (it's not included in these test 
> > files right now), or does it interfere with the epub compiling process?
> >
> 
> the build file shouldn't be used by pdflatex at all, what kind of
> error do you get? You definitely shouldn't use this build file now, as
> it overwrites xindy command from make4ht.

For epub I get the following:

---
C:\Users\Computer\Google Drive\Writing\LaTeXTest\Test1>tex4ebook -lm index -e 
mybuild.mk4 Test.tex
[STATUS]  tex4ebook: Conversion started
[STATUS]  tex4ebook: Input file: Test.tex
This is LuaTeX, Version 1.11.2 (MiKTeX 2.9.7250 64-bit)
 restricted system commands enabled.

luaotfload | main : initialization completed in 1.070 seconds
This is LuaTeX, Version 1.11.2 (MiKTeX 2.9.7250 64-bit)
 restricted system commands enabled.

luaotfload | main : initialization completed in 1.081 seconds
This is LuaTeX, Version 1.11.2 (MiKTeX 2.9.7250 64-bit)
 restricted system commands enabled.

luaotfload | main : initialization completed in 1.089 seconds
This is LuaTeX, Version 1.11.2 (MiKTeX 2.9.7250 64-bit)
 restricted system commands enabled.

luaotfload | main : initialization completed in 1.094 seconds
1 Datei(en) kopiert.
1 Datei(en) kopiert.
1 Datei(en) kopiert.
1 Datei(en) kopiert.
1 Datei(en) kopiert.
1 Datei(en) kopiert.
1 Datei(en) kopiert.
1 Datei(en) kopiert.
HTML Tidy for Windows released on 25 March 2009
Der Befehl "zip" ist entweder falsch geschrieben oder
konnte nicht gefunden werden.
1 Datei(en) kopiert.
[STATUS]  tex4ebook: Conversion finished


For the PDF I get the following:


C:\Users\Computer\Google Drive\Writing\LaTeXTest\Test1>pdflatex Test.tex
This is pdfTeX, Version 3.14159265-2.6-1.40.20 (MiKTeX 2.9.7250 64-bit)
entering extended mode
(Test.tex
LaTeX2e <2019-10-01> patch level 3
("C:\Program Files\MiKTeX 2.9\tex/latex/koma-script\scrbook.cls"
Document Class: scrbook 2019/12/23 v3.28 KOMA-Script document class (book)
("C:\Program Files\MiKTeX 2.9\tex/latex/koma-script\scrkbase.sty"
("C:\Program Files\MiKTeX 2.9\tex/latex/koma-script\scrbase.sty"
("C:\Program Files\MiKTeX 2.9\tex/latex/graphics\keyval.sty")
("C:\Program Files\MiKTeX 2.9\tex/latex/koma-script\scrlfile.sty")))
("C:\Program Files\MiKTeX 2.9\tex/latex/koma-script\tocbasic.sty")
("C:\Program Files\MiKTeX 2.9\tex/latex/koma-script\scrsize11pt.clo")
("C:\Program Files\MiKTeX 2.9\tex/latex/koma-script\typearea.sty"))
("C:\Program Files\MiKTeX 2.9\tex/latex/chngcntr\chngcntr.sty")
("C:\Program Files\MiKTeX 2.9\tex/latex/lipsum\lipsum.sty"
("C:\Program Files\MiKTeX 2.9\tex/latex/l3kernel\expl3.sty"
("C:\Program Files\MiKTeX 2.9\tex/latex/l3kernel\expl3-code.tex"
("C:\Program Files\MiKTeX 2.9\tex/latex/l3kernel\l3deprecation.def"))
("C:\Program Files\MiKTeX 2.9\tex/latex/l3backend\l3backend-pdfmode.def"))
("C:\Program Files\MiKTeX 2.9\tex/latex/l3packages/xparse\xparse.sty")
("C:\Program Files\MiKTeX 2.9\tex/latex/lipsum\lipsum.ltd.tex"))
("C:\Program Files\MiKTeX 2.9\tex/latex/base\makeidx.sty")
("C:\Program Files\MiKTeX 2.9\tex/latex/xcolor\xcolor.sty"
("C:\Program Files\MiKTeX 2.9\tex/latex/graphics-cfg\color.cfg")
("C:\Program Files\MiKTeX 2.9\tex/latex/graphics-def\pdftex.def"))
("C:\Program Files\MiKTeX 2.9\tex/latex/hyperref\hyperref.sty"
("C:\Program Files\MiKTeX 2.9\tex/generic/ltxcmds\ltxcmds.sty")
("C:\Program Files\MiKTeX 2.9\tex/latex/iftex\iftex.sty")
("C:\Program Files\MiKTeX 2.9\tex/latex/pdftexcmds\pdftexcmds.sty"
("C:\Program Files\MiKTeX 2.9\tex/generic/infwarerr\infwarerr.sty"))
("C:\Program Files\MiKTeX 2.9\tex/generic/kvsetkeys\kvsetkeys.sty")
("C:\Program Files\MiKTeX 2.9\tex/generic/kvdefinekeys\kvdefinekeys.sty")
("C:\Program Files\MiKTeX 2.9\tex/generic/pdfescape\pdfescape.sty")
("C:\Program Files\MiKTeX 2.9\tex/latex/hycolor\hycolor.sty"
("C:\Program Files\MiKTeX 2.9\tex/latex/hycolor\xcolor-patch.sty"
("C:\Program Files\MiKTeX 2.9\tex/latex/oberdiek\hopatch.sty")))
("C:\Program Files\MiKTeX 2.9\tex/latex/letltxmacro\letltxmacro.sty")
("C:\Program Files\MiKTeX 2.9\tex/latex/auxhook\auxhook.sty")

Re: [tex4ht] imakeidx index question

2020-02-17 Thread Jürgen Hubert
> Von: "Michal Hoftich" 
> sorry for the late reply, I was bit exhausted in the last few weeks.
> In the meantime, tex4ht make4ht had been updated in both TeX Live and
> Miktex, so everything should work now. The attached zip file contains
> a TeX file, make4ht build file and generated Epub. It can be compiled
> using
> 
>  tex4ebook -e mybuild.mk4 -m index Test.tex
> 
> Does it work for you?

I can report success - both for the testfile _and_ my larger ebook file! Thank 
you so much!

If I am interpreting this correctly, this index system generates a numbered 
location for each \index entry, and then uses these numbers in the hyperlinked 
index. Since I've been adding a new index entry each time a certain phase shows 
up in each paragraph, this has led to some overly long index entries such as 
this:

walrider, 693, 695, 701, 708, 719, 734, 736, 742, 743, 747, 752, 763, 777, 792, 
794, 796, 798, 802, 804, 819, 828, 837, 840, 848, 855, 867, 877, 880, 915, 920, 
935, 946, 956, 960, 961, 983, 1003, 1006, 1009, 1012, 1017, 1021, 1029, 1030, 
2683

The index generated with pdflatex ignores multiple index instances on the same 
page, and shortens the entry further if the same word shows up on successive 
pages:

walrider, 49-61, 142

But this is purely a problem on my end - I just have to think differently for 
how to place index entries for epub files. But I thought I'd share this here so 
that others know what to expect.

Thanks again,

- Jürgen



Re: [tex4ht] imakeidx index question

2020-02-21 Thread Jürgen Hubert
Hello!

...one more question regarding this. As reported, compiling an epub file works 
with this test file, including generating an index.

However, I also need to be able to generate PDF files from the same .tex files, 
and when I attempt

 pdflatex Test.tex

I get a


! LaTeX Error: Missing \begin{document}.


error.

What am I doing wrong?

Best regards,

- Jürgen

> Gesendet: Freitag, 14. Februar 2020 um 17:07 Uhr
> Von: "Michal Hoftich" 
> An: "Jürgen Hubert" 
> Cc: tex4ht 
> Betreff: Re: Re: [tex4ht] imakeidx index question
>
> Hi Jürgen,
> 
> > For epub I get the following:
> 
> sorry for the late reply, I was bit exhausted in the last few weeks.
> In the meantime, tex4ht make4ht had been updated in both TeX Live and
> Miktex, so everything should work now. The attached zip file contains
> a TeX file, make4ht build file and generated Epub. It can be compiled
> using
> 
>  tex4ebook -e mybuild.mk4 -m index Test.tex
> 
> Does it work for you?
> 
> Best regards,
> Michal
>



Re: [tex4ht] imakeidx index question

2020-01-12 Thread Jürgen Hubert
So, any thoughts on my problem?

Best regards,

- Jürgen

> Gesendet: Dienstag, 17. Dezember 2019 um 20:59 Uhr
> Von: "Jürgen Hubert" 
> An: tex4ht@tug.org
> Betreff: Re: [tex4ht] imakeidx index question
>
> I've put a sample setup with the same basic problem in this Google Drive 
> folder:
> 
> https://drive.google.com/open?id=131oXr_4-VTni1VKwkjUXuiu9AdORvu7E
> 
> "1 Story" shows up correctly under the index "1", while "2 Story 2" shows up 
> under the section header "2.1" because there is no preceding subsection 
> header. Ideally, I want to have it show up under "2" without adding a new 
> subsection header.
> 
> Best regards,
> 
> - Jürgen
> 
> > Gesendet: Dienstag, 17. Dezember 2019 um 13:06 Uhr
> > Von: "Michal Hoftich" 
> > An: "Jürgen Hubert" 
> > Cc: tex4ht 
> > Betreff: Re: [tex4ht] imakeidx index question
> >
> > Hi Jürgen,
> > 
> > > then the index entry within  links back to "2.2" instead of "34".
> > > Can anyone think of a workaround for this? I would really like keep a 
> > > separate number for the individual stories, and use these as the base for 
> > > index entries - but for many sections it just doesn't make sense to have 
> > > subsections in the manuscript.
> > 
> > I think we will need a full document to test that.
> > 
> > Best regards,
> > Michal
> >
> 
>



Re: [tex4ht] imakeidx index question

2020-01-21 Thread Jürgen Hubert
Hello Michal,


> > it doesn't create any "topic.ind" file even though all index entries are 
> > for the "Topic" index. Instead, it builds a "place.ind" file for which the 
> > entries are simply wrong.
> 
> I forgot to mention that you need to disable the indexing4ht package,
> as it overwrites the index handling. You probably don't need to use
> the myconfig.cfg at all. Unless you have other configurations here.

So... compiling with the following?

tex4ebook -lm index -e mybuild.mk4 Test.tex

https://drive.google.com/drive/folders/131oXr_4-VTni1VKwkjUXuiu9AdORvu7E?usp=sharing

Unfortunately, the result seems to be the same. Unless I need to disable 
indexing4ht somewhere else, other than by not using myconfig.cfg.

Best regards,

- Jürgen



[tex4ht] imakeidx Umlaut problems in tex4ht

2020-05-16 Thread Jürgen Hubert
Hello everyone,

as I am close to finalizing my massive ebook manuscript (102K words so far), I 
have encountered another strange issue - apparently imakeidx doesn't sort index 
entries properly when they start with an Umlaut. Here is some minimal code:



\documentclass[oneside]{scrbook}

\ifdefined\HCode
\usepackage[noautomatic]{imakeidx}
\else
\usepackage[]{imakeidx}
\fi
\usepackage[hyperindex=true]{hyperref}

\makeindex[intoc=true,name=place,title=Places]

\begin{document}

\chapter{Testchapter}

Alterlingen\index[place]{Alterlingen}

Älterlingen\index[place]{Älterlingen}

Oberlingen\index[place]{Oberlingen}

Öberlingen\index[place]{Öberlingen}

Überlingen\index[place]{Überlingen}

Unterlingen\index[place]{Unterlingen}

\printindex[place]

\end{document}

--

When I compile this with pdflatex, I get the following index:

Alterlingen, 1

Oberlingen, 1

Unterlingen, 1

Älterlingen, 1
Öberlingen, 1
Überlingen, 1

Basically, the Umlaut index entries are listed at the very end of the index. 
Which is not quite technically correct, but close enough for an 
English-language publication ("let's put all those weird, foreign characters 
into their own corner!").

However, when I compile this code with tex4ebook, I get:

A

Alterlingen, 1

O

Oberlingen, 3
Öberlingen, 4
Älterlingen, 2
Überlingen, 5

U

Unterlingen, 6


In other words, _all_ index entries that start with an Umlaut are listed under 
"O" for some reason - which clearly shouldn't be the case.

Cheers,

- Jürgen



Re: [tex4ht] Fwd: Getting rid of breaks in footnotes

2020-07-10 Thread Jürgen Hubert
> Gesendet: Samstag, 04. Juli 2020 um 22:06 Uhr
> Von: "Michal Hoftich" 

> >Anyway, I can report success! Thank you very much! I had you in the 
> >Acknowledgements of the book already, but it's great that you were able to 
> >solve this issue so quickly this close before the finish line.   ;)
> >
> 
> That's great! It is really nice of you, I am really honored. It was luck 
> that I was still at home. I am going to hike in Southern Bohemian 
> mountains tomorrow, so I will be offline next few days.

I hope you had a nice vacation! And much better weather than the miserable rain 
we have up here at the North Sea...

Anyway, the book is now available at Amazon:

https://www.amazon.com/dp/B08CL2HS28/

Thanks for all your valuable support these past two years! Doing this would 
have been _much_ more of a struggle without the tex4ht package, but thanks to 
you and the package I was able to create both the print and the ebook versions 
in parallel.

Best regards,

- Jürgen



Re: [tex4ht] Fwd: Getting rid of breaks in footnotes

2020-07-04 Thread Jürgen Hubert
> Gesendet: Samstag, 04. Juli 2020 um 15:13 Uhr
> Von: "Michal Hoftich" 

>
> On Sat, Jul 04, 2020 at 07:50:41AM +0200, Jürgen Hubert wrote:
> >
> >Unfortunately, the problem persisted even after this change. I investigated 
> >further by manually editing the EPUB file with Calibre, and it turns out 
> >that the problem wasn't actually the  tags - it was the line 
> >break between "the" and "Devil". The empty spaces _also_ seem to be 
> >displayed in the popup.
> >
> >Yes, Amazon - one of the biggest companies in the world with massive amounts 
> >of IT resources - is unable to interpret HTML correctly with their "popup 
> >footnote" feature.
> >
> >
> 
> I am always amazed how bad ebook readers are. The only evolution that 
> happens is on the hardware side, stuff like backlighting, etc. But the 
> actual rendering is still awfull and nobody seems to have problem with 
> that. And then comes stuff like footnotes that are displayed as popups, 
> instead of, you know, as footnotes are displayed in books for last few 
> hundreds of years. 
> 
> And of course, even this awfull way is broken. I lost my hope in ebooks 
> long ago, but this is another level.

I actually think the pop-up footnotes are a fairly decent idea - the Kindle 
screen has a fairly limited size, and some of my footnotes can get rather 
lengthy. Viewing them as popups thus makes sense - you can read them if you 
want to, but they don't distract from the reading flow if you want to ignore 
them.

Anyway, I can report success! Thank you very much! I had you in the 
Acknowledgements of the book already, but it's great that you were able to 
solve this issue so quickly this close before the finish line.   ;)

Best regards,

- Jürgen



[tex4ht] Subsubsections do not show up in TOC

2022-02-22 Thread Jürgen Hubert
After I recently updated my LaTeX installation (which I hadn't done for more 
than a year), I suddenly had the problem that subsubsections no longer show up 
in the TOC of the EPUB file:

--

\documentclass[oneside]{scrbook}

\setcounter{secnumdepth}{3}
\setcounter{tocdepth}{3}
%

\begin{document}

This is a test.

\chapter{Chapter Test}

\section{Section Test}

\subsection{Subsection Test}

\subsubsection{SubSubsection Test}

\end{document}

---

When I compile this, I get the following messages:

tex4ebook EPUB_V01.tex

[STATUS]  tex4ebook: Conversion started
[STATUS]  tex4ebook: Input file: EPUB_V01.tex
[WARNING] tocid: char-def module not found
[WARNING] tocid: cannot fix section id's
This is pdfTeX, Version 3.141592653-2.6-1.40.24 (MiKTeX 22.1) (preloaded 
format=latex.fmt)
 restricted \write18 enabled.
entering extended mode
This is pdfTeX, Version 3.141592653-2.6-1.40.24 (MiKTeX 22.1) (preloaded 
format=latex.fmt)
 restricted \write18 enabled.
entering extended mode
This is pdfTeX, Version 3.141592653-2.6-1.40.24 (MiKTeX 22.1) (preloaded 
format=latex.fmt)
 restricted \write18 enabled.
entering extended mode
1 file(s) copied.
1 file(s) copied.
1 file(s) copied.
1 file(s) copied.
HTML Tidy for Windows released on 25 March 2009
1 file(s) copied.
[STATUS]  tex4ebook: Conversion finished


The end result is that the Chapter, Section, and Subsection show up in the TOC, 
but the Subsubsection does not. Since I was able to generate files with 
Subsubsections in the TOC in the past before the update, the logical conclusion 
seems to be that something went wrong during the update process. And the 
warnings

[WARNING] tocid: char-def module not found
[WARNING] tocid: cannot fix section id's

are also new.

Now, I was able to find the "char-def" module in a repository,

https://raw.githubusercontent.com/adityam/context-math/master/char-def.lua

I am unsure how to install it so that tex4ebook will find it.

Can anyone give me some advice on how to proceed?

Best regards,

- Jürgen Hubert



Re: [tex4ht] Subsubsections do not show up in TOC

2022-02-22 Thread Jürgen Hubert
> Gesendet: Dienstag, 22. Februar 2022 um 13:40 Uhr
> Von: "Michal Hoftich" 
> An: "Jürgen Hubert" 
> Cc: "tex4ht" 
> Betreff: Re: [tex4ht] Subsubsections do not show up in TOC
>
> Hi Jürgen,
> 
> 
> 
> On Tue, Feb 22, 2022 at 11:39 AM Jürgen Hubert  wrote:
> >
> > After I recently updated my LaTeX installation (which I hadn't done for 
> > more than a year), I suddenly had the problem that subsubsections no longer 
> > show up in the TOC of the EPUB file:
> >
> 
> I think the issue was caused by the TeX4ebook update two years ago. It
> explicitly uses the list of sectioning commands that should be
> included in the Epub TOC, and it doesn't include \subsubsection. I've
> changed that in the development version of TeX4ebook, so now it does.
> Unfortunately, I updated TeX4ebook on CTAN a few days ago, so it will
> take some time before the next release. You can install the
> development version to test if it fixes it for you.

Okay, thanks for the info - glad to know that it isn't just me! In the end, I 
decided to edit the issues manually with the Calibre Editor so that I could hit 
"Publish" at Amazon KDP today. But I'll make sure to test my build more 
regularly in the future - there is always a next book, after all.   ;)

Best regards,

- Jürgen



[tex4ht] Working examples of bibtex / multibib with tex4ebook?

2024-03-03 Thread Jürgen Hubert via tex4ht
I did it again - I've waited too long to update my LaTeX packages, and now my 
old files will no longer compile correctly. So now I have to carefully wade 
through my code and test anything.

One major problem is that I can no longer create a bibliography without 
throwing lots of

[ERROR]   htlatex: Compilation errors in the htlatex run
[ERROR]   htlatex: Filename LineMessage
[ERROR]   htlatex: ?870  Missing } inserted.

errors. But I think I'd like to analyze some further before I share some code 
samples here. Thus, I'd like to ask: Does anyone have any minimalist .tex files 
(including relevant build files) for bibtex - or even better, multibib - that 
they can successfully run with their installation without errors?

I could use them to test my situation further - perhaps my MiKTeX installation 
is the problem, rather than the code. I've already discovered another error 
where MiKTeX had updated to the iftex package 1.0f... but the actual 
compilation still used an older 0.7 version for some reason. And I want to make 
sure that there are no further problems like this before I share code.

Best regards,

- Jürgen Hubert



Re: [tex4ht] Working examples of bibtex / multibib with tex4ebook?

2024-03-04 Thread Jürgen Hubert via tex4ht
Okay, I've switched to BibLaTeX, and through some testing have managed to 
create EPUB files with bibliographies. So far, so good, although further 
testing will be necessary.

I did notice something interesting, though. I've been using the "alphabetic" 
style, since that was what I used with multibib:

\usepackage[style=alphabetic, backend=biber]{biblatex}

I have a number of .bib entries - websites, mostly - which do not have an 
author, but a key instead.

@misc{ AIV,
key = {Architekten und Ingenieurverein Berlin Brandenburg},
title = "{Schinkel-Wettbewerb 2005}",
howpublished = 
{\url{https://www.aiv-berlin-brandenburg.de/wp-content/uploads/2010/05/Dokumentation_SW_2005.pdf}},
note = {Accessed: 2022-10-31}
}

The bibliography entry in the pdf looks like this:

[Arc] Schinkel-Wettbewerb 2005. https://www.aiv-berlin-brandenburg.de/
  wp-content/uploads/2010/05/Dokumentation_SW_2005.pdf. Accessed:
  2022-10-31.

However, the tex4ebook entry looks like this:

[]Schinkel-Wettbewerb 2005. 
https://www.aiv-berlin-brandenburg.de/wp-content/uploads/2010/05/Dokumentation_SW_2005.pdf.
 Accessed: 2022-10-31.

It seems that when an alphabetic bibliography index has no author, pdflatex 
uses the first letters from the key instead - but tex4ebook does not want to 
do, and thus generates an "empty" key. This will also show up as "[]" in the 
location where the reference is cited.

This isn't a problem when you have numeric bibliography entries - only when the 
bibliography needs to pull letters from the entry itself.

One obvious solution is to manually replace those "key" entries with "author" 
entries in my .bib files. But I'm curious if there is another possible 
workaround.

Best regards,

- Jürgen


> Gesendet: Montag, 04. März 2024 um 09:30 Uhr
> Von: "Michal Hoftich" 
> An: "Jürgen Hubert" 
> Cc: tex4ht@tug.org
> Betreff: Re: [tex4ht] Working examples of bibtex / multibib with tex4ebook?
>
> Hi Jürgen,
> 
> > I did it again - I've waited too long to update my LaTeX packages, and now 
> > my old files will no longer compile correctly. So now I have to carefully 
> > wade through my code and test anything.
> 
> I can see that  there is no configuration file for multibib. Bibtex
> itself should work. I can try to debug multibib, but a testing file
> would be nice.
> 
> You can also try BibLaTeX and it is much more powerful than both
> bibtex and multibib.
> 
> Best regards,
> Michal
>