Re: [tex4ht] bug with latest update to texlive using tex4ht with caption package

2020-03-17 Thread Michal Hoftich
Hi Nasser,

> Strange that caption package will cause such problem in tex4ht.
> I wonder what could cause this.

it seems that the Caption package had been updated recently, so the
TeX4ht support for it is broken. I expect that it probably redefines
some internal LaTeX macros. I will need to investigate this.

Best regards,
Michal


Re: [tex4ht] Help on mathjax V3 configuration. Syntax error

2020-03-15 Thread Michal Hoftich
Hi Nasser,

>
> Since you did not get an error, it must be you are using
> different version. So I just did full update of texlive 2019.
>
> Now, I do not get any error !  So it must be something got fixed
> in the update.
>
> >make4ht --version
> make4ht version v0.3d
>
> (base) >make4ht -ulm default -c ./nma_mathjax.cfg foo.tex
> [STATUS]  make4ht: Conversion started
> [STATUS]  make4ht: Input file: foo.tex
> [STATUS]  make4ht: Conversion finished
>
> I also noticed you added STATUS and -a option which is nice feature,
> thanks for that.
>
> So problem resolved now. No errors using mathjax V3. The conversion
> tool they setup worked OK.

Ah, you had probably quite old files. I guess this error was not on
make4ht, but more likely in TeX4ht core.

Best regards,
Michal


Re: [tex4ht] Help on mathjax V3 configuration. Syntax error

2020-03-15 Thread Michal Hoftich
Hi Nasser,


> 
> (/usr/local/texlive/2019/texmf-dist/tex/generic/tex4ht/html5.4ht)) (./foo.aux)
> ! Undefined control sequence.
> \\  ->\let \reserved@e
> \relax \let \reserved@f \relax \@ifstar {\let 
> \reserv...
>
> l.101 \EndPreamble
> ===


I don't get any error when I compile your mwe, it just doesn't work.
It works when I use the URL you pass in `\Configure{@HEAD}` to
\Configure{MathjaxSource}:

\Configure{MathjaxSource}{https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js}

I am bit surprised that I don't need to use \detokenize around TeX
macros in Mathjax configuration. I used some of your declared macros
and they seem to work.

Best regards,
Michal


Re: [tex4ht] Indices don't show up in the Table of Contents

2020-03-14 Thread Michal Hoftich
Hi Jürgen,

> When creating documents with indices with imakeidx and then generating a 
> table of contents with \tableofcontents , the indices show in the Table of 
> Contents in the PDF document - but not in the epub document.
>

This looks like a bug in TeX4ebook. I hope that I've fixed that in the
sources. But your fix works as well, which is nice.

Best regards,
Michal



Re: [tex4ht] \usepackage{showframe} error with tex4ht

2020-03-12 Thread Michal Hoftich
Hi Nasser,

> Workaround is simple, which is to bypass it explicitly in the code
> when using tex4ht
>
> \ifdefined\HCode
> \else
> \usepackage{showframe}
> \fi

I've added showframe to list of blocked packages. Thanks for the report.

Best regards,
Michal


Re: [tex4ht] indexing4ht and accented characters

2020-03-08 Thread Michal Hoftich
Hello LianTze,

> (Note that if \index{láboris} is changed to \index{laboris} then this can be 
> compiled with tex4book + xindy perfectly.)
>

indexing system provided by indexing4ht is a bit fragile. It is better
to use the native indexing support provided by TeX4ht. You don't need
to load indexing4ht at all, you just need to use one of supported
indexing commands (makeindex, xindy, xindex) in the .mk4 file. See
https://www.kodymirus.cz/make4ht/make4ht-doc.html#x1-37.1 for the
available options.

It is unfortunately  not possible to use them from Latexmk, because
these commands need to preprocess the .idx and .ind files.

I can compile your file correctly using the following build file:

Make:latexmk {}
Make:xindex {}
Make:htlatex {}

Best regards,
Michal



Re: [tex4ht] spanish navigation bar

2020-03-06 Thread Michal Hoftich
Hi Diego,


> How can I get  spanish navigation links or customize that?

try the following configuration file:


\Preamble{xhtml}
\Configure{crosslinks}{[}{]}{próximo}{previo}{previo-final}{portada}{final}{superior}{}
\begin{document}
\EndPreamble
---

>From the info file:

\Configure{crosslinks}.8

   #1  left delimiter
   #2  right delimiter
   #3  next
   #4  previous
   #5  previous-tail
   #6  front
   #7  tail
   #8  up

Compile your file using

make4ht -c configfilename.cfg filename.tex "xhtml,3"

Best regards,
Michal



Re: [tex4ht] about configuring where to load mathjax from when using tex4ht in mathjax mode.

2020-03-04 Thread Michal Hoftich
Hi Nasser,

> All the above should go to your .cfg file under the \Preamble tag.
>
> I also just compiled a large file with lots of math using V3 mathjax
> and so far I see no problems with the math. I also noticed mathjax is
> now faster than before !

I've updated TeX4ht sources to use MathJax 3, it seems to work nicely
and faster so far. I think the update will be available only in TL
2020, as updates are frozen already.

Best regards,
Michal


Re: [tex4ht] about configuring where to load mathjax from when using tex4ht in mathjax mode.

2020-03-03 Thread Michal Hoftich
Hi Nasser,

> I can't remember where this is hard-coded. I know it is in some system
> file in tex4ht.
>
> I think it will be best if there is an automatic way to override default
> setting of where mathjax is loaded from to avoid having to edit
> system files that belong to tex4ht. Or not add this line at all,
> and let the user add the line to load mathjax in their .cfg? Because
> if new version of mathjax is released, user can update to it
> immediately by editing their .cfg file.
>
> btw, there is now mathjax V 3.0, but I am still using mathjax V 2.7
> as some configs have changed and do not want to change yet, afraid it will
> break something. But from what I read, v 3.0 is supposed to be faster
> than V 2.7, so one day will try to switch.

the path to MathJax can be configured using \Configure{MathjaxSource}.
The default value is:

\Configure{MathjaxSource}
{https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/%
latest.js?config=TeX-AMS-MML_HTMLorMML}

You can change it to a relative path.

I can see that version 2.7.5 is hardcoded, so we may want to switch to
the newer version. Could you test it if it works with your code? I
think your documents are good test suite for edge cases :)

Best regards,
Michal


[tex4ht] [bug #451] r666 breaks pgfmanual

2020-03-02 Thread Michal Hoftich
Follow-up Comment #3, bug #451 (project tex4ht):

I've found the issue. We patch the `\usetikzlibrary` in `usepackage.4ht` for a
better externalization support. I changed the following lines to get it work:

-\renewcommand\usetikzlibrary[1]{%
-  \use:tikzlibrary{#1}%
-  \find:externalize#1external\@nil%
+\pend:defI\usetikzlibrary{\find:externalize##1external\@nil}%


___

Reply to this item at:

  

___
  Message sent via/by Puszcza
  http://puszcza.gnu.org.ua/



[tex4ht] [bug #451] r666 breaks pgfmanual

2020-03-01 Thread Michal Hoftich
Follow-up Comment #1, bug #451 (project tex4ht):

Do you have a smaller example? I can test the pgfmanual tomorrow, but the
following sample that loads the positioning library compiles without
compilation errors for me:

 
\documentclass[11pt]{article}

\ifdefined\HCode %This driver to tex4ht only. For tikz
   %\def\pgfsysdriver{pgfsys-dvisvgm4ht.def}
\fi 
\usepackage{tikz,graphicx,tikz-dependency}
\usetikzlibrary{fit}
\usetikzlibrary{positioning}
\begin{document}

\begin{tikzpicture}[baseline=(current bounding box.center)]
\coordinate[label =above:$0$,   label =below:{$u=0$}] (A) at (0,0);
\coordinate[label =above:$\pi$, label =below:{$u_x=0$}] (B) at (4,0);

\draw (A) -- node[above] {$u_t = k u_{xx} +c^2 u_x $}  node[below] {$f(x)$} ++
(B);
\end{tikzpicture} 
\end{document}


It doesn't produce correct SVG though, it needs the alternative TikZ driver
that is commented out.

The discussion why we patched the `\@onefilewithoptions` command can be found
here: https://puszcza.gnu.org.ua/bugs/?448 and here: 
https://github.com/latex3/latex2e/issues/280 


___

Reply to this item at:

  

___
  Message sent via/by Puszcza
  http://puszcza.gnu.org.ua/



[tex4ht] [bug #449] \ is not a nobreak space

2020-02-28 Thread Michal Hoftich
Follow-up Comment #10, bug #449 (project tex4ht):

Ah, that is bad. I think we should revert for now. I will put \:nbsp back.

___

Reply to this item at:

  

___
  Message sent via/by Puszcza
  http://puszcza.gnu.org.ua/



[tex4ht] [bug #449] \ is not a nobreak space

2020-02-26 Thread Michal Hoftich
Follow-up Comment #7, bug #449 (project tex4ht):

OK, I've introduced a new command \:ensp. It is used for \Configure{ }.

___

Reply to this item at:

  

___
  Message sent via/by Puszcza
  http://puszcza.gnu.org.ua/



Re: [tex4ht] htlatex - Biber ; error

2020-02-25 Thread Michal Hoftich
Hello Rachid,

> The MWE below is issued from:  
> https://tex.stackexchange.com/questions/346564/biblatex-biber-how-to-create-a-loop-to-printbibliography-year-after-year-from/346895?noredirect=1#comment1339562_346895
>
> It compiles with no errors when using : Latex —> Biber —> Latex.

I've posted a solution that works both for PDF and HTML on TeX.sx:
https://tex.stackexchange.com/a/529952/2891

Best regards,
Michal



Re: [tex4ht] imakeidx index question

2020-02-25 Thread Michal Hoftich
Hi Jürgen,

> > ! LaTeX Error: Missing \begin{document}.

I can see it now. There is \usepackage{makeidx}, change that to
\usepackage[]{imakeidx}. Teh makeidx package doesn't support updated
\makeindex syntax.

Best regards,
Michal



Re: [tex4ht] imakeidx index question

2020-02-22 Thread Michal Hoftich
Hi Jürgen,


>
> ! LaTeX Error: Missing \begin{document}.
>

maybe it is just caused by temporary files? I will be offline this
weekend, so I can investigate this only next week, unfortunately.

Best regards,
Michal



[tex4ht] [bug #449] \ is not a nobreak space

2020-02-21 Thread Michal Hoftich
Follow-up Comment #5, bug #449 (project tex4ht):

It seems that multiple enspaces after line break are discarded. So should I
add them? I am bit worried that it may break things.

___

Reply to this item at:

  

___
  Message sent via/by Puszcza
  http://puszcza.gnu.org.ua/



[tex4ht] [bug #449] \ is not a nobreak space

2020-02-19 Thread Michal Hoftich
Follow-up Comment #3, bug #449 (project tex4ht):

I' am afraid it isn't possible to use  , it collapses. It is
possible to use en space (), but I don't think it has any advantages
over nbsp, except that it allows line breaks.

___

Reply to this item at:

  

___
  Message sent via/by Puszcza
  http://puszcza.gnu.org.ua/



[tex4ht] [bug #448] Package patching in the document preamble is broken

2020-02-19 Thread Michal Hoftich
Follow-up Comment #5, bug #448 (project tex4ht):

Thanks, Karl. It is also necessary to update tex4ht.sty, as it provides
definition of \:AtEndOfPackage.

___

Reply to this item at:

  

___
  Message sent via/by Puszcza
  http://puszcza.gnu.org.ua/



[tex4ht] [bug #448] Package patching in the document preamble is broken

2020-02-18 Thread Michal Hoftich
Follow-up Comment #3, bug #448 (project tex4ht):

It seems to work, so I think you can commit it :) thanks :)

___

Reply to this item at:

  

___
  Message sent via/by Puszcza
  http://puszcza.gnu.org.ua/



[tex4ht] [bug #449] \ is not a nobreak space

2020-02-18 Thread Michal Hoftich
Follow-up Comment #1, bug #449 (project tex4ht):

Hi Karl,

I see. But the space generated by '\ ' is non-collapsible, so it is not an
ordinary space. It is possible to configure it to produce normal space using:

\Configure{ }{ },

but it causes issues in verbatim, for example. You will lose line indentation
with this configuration, which is not good.

___

Reply to this item at:

  

___
  Message sent via/by Puszcza
  http://puszcza.gnu.org.ua/



[tex4ht] [bug #448] Package patching in the document preamble is broken

2020-02-17 Thread Michal Hoftich
Follow-up Comment #1, bug #448 (project tex4ht):

I've added a possible solution to the sources. I need to test it a bit more,
so maybe we should wait before we update TL.

___

Reply to this item at:

  

___
  Message sent via/by Puszcza
  http://puszcza.gnu.org.ua/



Re: [tex4ht] imakeidx index question

2020-02-17 Thread Michal Hoftich
Hi Jürgen

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

I am really happy it works!

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

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

Yes, this is the method that TeX4ht used originally and seems to work
best. My method that used section numbers was fragile and needed
support from the index processor (so it had been supported only by
Xindy). This method is universal, but the downside is what you
describe - overly long index entries.

Best regards,
Michal



[tex4ht] [bug #448] Package patching in the document preamble is broken

2020-02-17 Thread Michal Hoftich
URL:
  

 Summary: Package patching in the document preamble is broken
 Project: tex4ht
Submitted by: michal_h21
Submitted on: Mon 17 Feb 2020 10:23:48 PM EET
Category: None
Priority: 5 - Normal
Severity: 5 - Normal
  Status: None
 Privacy: Public
 Assigned to: None
Originator Email: 
 Open/Closed: Open
 Discussion Lock: Any

___

Details:

I've found that the mechanism we use for package patching in the preamble
(using usepackage.4ht) is broken due to changes in the LaTeX kernel. This
means that document compilation fails when you use Fontspec font selection
commands now, for instance. I've reported this issue on LaTeX issue tracker:

https://github.com/latex3/latex2e/issues/280

The report contains more information and code samples.

It seems that it cannot be fixed, as the change was done due to another bug.
So we will need to find a workaround. Ulrike Fisher suggested to use the
Filehooks package, which seems to work, so I hope that I will be able to come
with a fix soon.




___

Reply to this item at:

  

___
  Message sent via/by Puszcza
  http://puszcza.gnu.org.ua/



Re: [tex4ht] imakeidx index question

2020-02-14 Thread Michal Hoftich
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
<>


[tex4ht] [bug #446] Accents are treated incorrectly

2020-02-14 Thread Michal Hoftich
Follow-up Comment #1, bug #446 (project tex4ht):

It I understand it correctly, the letters that are listed in the argument
after accent type are ignored. So pictures are created for all F characters,
but not for \hat u. I don't know why there are ignored characters just for
some accents, but these ignored characters obviously aren't handled correctly,
so I've just removed them from the sources.

Thanks for the report and sorry for a late reply.

___

Reply to this item at:

  

___
  Message sent via/by Puszcza
  http://puszcza.gnu.org.ua/



Re: [tex4ht] imakeidx index question

2020-01-27 Thread 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.

The sample file is attached.

Best regards,
Michal
<>


Re: [tex4ht] imakeidx index question

2020-01-23 Thread Michal Hoftich
Hi Jürgen,

> 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.   ;)

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.

Best regards,
Michal



[tex4ht] \LaTeX and \TeX logo in the HTML output

2020-01-22 Thread Michal Hoftich
Hi all,

I know there were some requests to use plain text output for \TeX and
\LaTeX commands in the past. Finally, I've implemented this as the
default version for the HTML output. The fancy version that try to
mimics their appearance in PDF using CSS can be requested using the
"fancylogo" option.

Best regards,
Michal


Re: [tex4ht] imakeidx index question

2020-01-22 Thread Michal Hoftich
Hi Jürgen,

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

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.

Best regards,
Michal



Re: [tex4ht] imakeidx index question

2020-01-21 Thread Michal Hoftich
Hi Jürgen,

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

Best regards,
Michal



Re: [tex4ht] imakeidx index question

2020-01-17 Thread Michal Hoftich
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


mybuild.mk4
Description: Binary data
\documentclass[oneside]{scrbook}

%\usepackage[utf8]{inputenc}
\usepackage{chngcntr}% http://ctan.org/pkg/chngcntr
\usepackage{lipsum}
\counterwithout{subsubsection}{subsection}

\ifdefined\HCode
\usepackage[noautomatic]{imakeidx}
\else
\usepackage[]{makeidx}
\fi
% \usepackage{tex4ebook}
\usepackage{xcolor}
\usepackage[hyperindex=true]{hyperref}
\usepackage{graphicx}

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

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

\begin{document}

\chapter{Testchapter}

\section{Testsection}

\subsection{Testsubsection}

\subsubsection{Story}

Test\index[topic]{Test}

\chapter{Testchapter 2}

\section{Testsection 2}

\subsubsection{Story 2}

Test\index[topic]{Test}

\printindex[topic]
\printindex[place]

\end{document}


Re: [tex4ht] disable dvipng on preexistent png images?

2020-01-17 Thread Michal Hoftich
Hi Giuseppe,

> After some upgrades, I've a problem during htlatex compiling.
> It seems that dvipng also wants convert already existing png images...
> Also, during the conversion I get this warning: dvipng warning: at (20,732) 
> unimplemented \special{em: graph icons/pcore/project_criterion.png,72bp,72bp} 
> ]
> on all png images.>

this issue was fixed in TeX4ht sources some time ago, but it seems
that Miktex still doesn't have correct files updated.
I think it can be fixed using this answer:
https://tex.stackexchange.com/q/517859/2891.

Best regards,
Michal


[tex4ht] [bug #444] Wrong MathML markup for functions?

2019-12-28 Thread Michal Hoftich
Follow-up Comment #3, bug #444 (project tex4ht):

I've found that this breaks MathML accents:


\documentclass{article}
\begin{document}

\[
\dot{\vec \omega}=\vec r\times\vec I\,.
\]

$\sin a$
\end{document}

I've just pushed fix to the soures.

___

Reply to this item at:

  

___
  Message sent via/by Puszcza
  http://puszcza.gnu.org.ua/



[tex4ht] [bug #447] biblatex 3.14

2019-12-20 Thread Michal Hoftich
Follow-up Comment #1, bug #447 (project tex4ht):

Hello Jürgen,

thank you for the report and especially the fix. I've updated the sources with
your proposed solution.

Best,
Michal

___

Reply to this item at:

  

___
  Message sent via/by Puszcza
  http://puszcza.gnu.org.ua/



[tex4ht] [bug #442] Bugs from cmidrule of booktabs

2019-12-17 Thread Michal Hoftich
Follow-up Comment #2, bug #442 (project tex4ht):

I've finally took a look at this issue, sorry for the delay. There are two
issues. The easier one can be fixed in the TeX4ht code. There was just wrong
CSS instruction that caused drawing of the line over the whole row that
contains the \cmidrule. It should be fixed in the sources now. The fix is also
in the attached .cfg file.

The secong issue is worse - it seems that each \cmidrule inserts separate row,
so even if the lines have correct width, they are not aligned vertically. I've
created Lua filter that should join rows created from one \cmidrule into one.

It seems to work on your sample document.

(file #331, file #332)
___

Additional Item Attachment:

File name: cmidrule.lua   Size:2 KB
File name: hej.cfgSize:0 KB


___

Reply to this item at:

  

___
  Message sent via/by Puszcza
  http://puszcza.gnu.org.ua/



Re: [tex4ht] imakeidx index question

2019-12-17 Thread Michal Hoftich
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] New options for the paragraph separation

2019-12-17 Thread Michal Hoftich
Hi Reinhard,


> I have no experience with ebooks.  Maybe the optional argument is a
> possible solution.  But can't this information be derived from the
> LaTeX file itself?  All you have to do is to determine whether the
> parskip package is loaded.

TeX4ht keeps the information about indentation in the generated file.
indented paragraphs have class "indent", not indented have class
"noindent". So it is easy to style them using CSS. The "p-indent"
option will make them indented, without vertical spaces.


>
> My favorite font is CharisSIL, not only because it's rendered
> perfectly in web browsers even at small resolutions but also because
> it's beautiful.  CharisSIL is an extension of Matthew Carter's
> "Bitstream Charter" font.  I wasn't aware of this beautiful font until
> Nelson Beebe delivered a TUGboat article using Bitstream Charter.

It is indeed nice. TeX4ht don't assume any fonts in the generated
files, but you can easily select fonts using CSS:

\Css{body{font-family: "Charis SIL", "Bitstream Charter", "New Century
Schoolbook", "Century Schoolbook", "Century Schoolbook L", Georgia,
serif}}

Best regards,
Michal


Re: [tex4ht] New options for the paragraph separation

2019-12-15 Thread Michal Hoftich
> For myself, I fully agree. Indented paragraphs on web pages just look
> weird/wrong to me. -k

Yes, they look weird on web. They are OK in ebooks. Anyway, I've
updated the sources, the spaces between paragraphs are used by
default, indenting can be requested using the "p-indent" option.

Best,
Michal


[tex4ht] New options for the paragraph separation

2019-12-13 Thread Michal Hoftich
Hi all,

by default, HTML files produced by TeX4ht  contain paragraphs
separated by both blank space and text indents. To select only one of
these paragraph separation methods, I've added two new options
available in the HTML output: "p-indent" and "p-space".

Personally, I would make the "p-space" behavior default, as I think it
is better to separate paragraphs by a space instead of a indent (on
the Web). The original behavior could be enabled with another option.

What do you think?

Best regards,
Michal


[tex4ht] [bug #226] Spurious elements in mathml output of \mathit, \mathrm, \mathbf etc

2019-11-27 Thread Michal Hoftich
Follow-up Comment #6, bug #226 (project tex4ht):

I've uploaded new make4ht version to CTAN. It contains new DOM filter:
mathmlfixes. It should fix issues with nested token elements in MathML. 

___

Reply to this item at:

  

___
  Message sent via/by Puszcza
  http://puszcza.gnu.org.ua/



[tex4ht] [bug #444] Wrong MathML markup for functions?

2019-11-26 Thread Michal Hoftich
Follow-up Comment #1, bug #444 (project tex4ht):

David Carlisle confirmed that this should be changed, so I've updated the
sources.

___

Reply to this item at:

  

___
  Message sent via/by Puszcza
  http://puszcza.gnu.org.ua/



[tex4ht] [bug #444] Wrong MathML markup for functions?

2019-11-25 Thread Michal Hoftich
URL:
  

 Summary: Wrong MathML markup for functions?
 Project: tex4ht
Submitted by: michal_h21
Submitted on: Mon 25 Nov 2019 04:15:54 PM EET
Category: None
Priority: 5 - Normal
Severity: 5 - Normal
  Status: None
 Privacy: Public
 Assigned to: None
Originator Email: 
 Open/Closed: Open
 Discussion Lock: Any

___

Details:

Hi all,

I've browsed the MathML specification and found that TeX4ht generates quite
different output than a recommended for functions, such as $\sin{x}$. 

The specification:


 
  sin 
   
  x 


TeX4ht:


 
sinx


The output of these two is visually different, our version produces larger
space between "sin" and "x". Should we change that? 




___

Reply to this item at:

  

___
  Message sent via/by Puszcza
  http://puszcza.gnu.org.ua/



Re: [tex4ht] [bug #226] Spurious elements in mathml output of \mathit, \mathrm, \mathbf etc

2019-11-25 Thread Michal Hoftich
Hi Bill,

>> The original issue of spurious  elements for longer texts can be fixed
>> using post-processing - make4ht provides common_domfilters extension, which
>> does  exactly this.
>>
>
> Can such post-processing be reliably robust?  (I doubt it.)
>

We have a DOM processing library in make4ht, which is quite powerful.
It can join several elements with the same name and same attributes to
one. We already use this code to join numbers in MathML, which are
produced as 12 by default. I

> I don't think that I really have anything new to say.  It's only that I think 
> this type of issue
> makes the case for profiled source documents.  I wrote a more detailed 
> comment with
> illustrations in LaTeX, ran it through tex4ht linked to MathJax, and posted 
> it here:
>
>   https://www.albany.edu/dept/math-stat/hammond/demos/mathitOverline.html
>
> where one sees MathJax cough on the *first* MathML error, which is having the 
> 'a' loose
> in an mrow.
>

Yes, we can say that the issues like this are often caused by wrong
user input, but they usually don't want to change their way.
Especially if it would mean to correct hundreds of already written
formulas. They also usually don't agree that their way is wrong. I
think we need to accept it, even if it means much more work and
headaches.

Best,
Michal


[tex4ht] [bug #226] Spurious elements in mathml output of \mathit, \mathrm, \mathbf etc

2019-11-22 Thread Michal Hoftich
Follow-up Comment #5, bug #226 (project tex4ht):

I've found an issue with this approach - the \PauseMathClass will prevent
correct tagging of nested structures. For example:

\mathit{\overline{a}+\overline{b}} 

This will result in  

b¯

The b character should be placed in  element. So I think we should revert
back to the use of . 

The original issue of spurious  elements for longer texts can be fixed
using post-processing - make4ht provides common_domfilters extension, which
does  exactly this.

___

Reply to this item at:

  

___
  Message sent via/by Puszcza
  http://puszcza.gnu.org.ua/



Re: [tex4ht] New make4ht version and documentation

2019-10-22 Thread Michal Hoftich
Hi all,

I've added a new logging mechanism to make4ht. It will hide most
information from the command line output by default, including output
from the executed commands. The loglevel can be selected using the
`-a` option. There are several levels: debug, info, status (default),
warning, error and fatal. The original make4ht behaviour, that prints
lot of information and also stops on errors in the LaTeX compilation
can be requested using the `debug` option:

  make4ht -a debug faulty.tex

Best regards,
Michal


[tex4ht] [bug #440] tabular generates invalid html due to trailing row

2019-10-22 Thread Michal Hoftich
Follow-up Comment #6, bug #440 (project tex4ht):

Great!

I've added this code as a new domfilter to make4ht. It is also used in the
`common_domfilters` extension. So with the soon to be released make4ht
version, you will just need to use

make4ht -f html5+common_domfilters filename.tex

This extension also fixes other issues, so it is usually a good idea to use
it.

___

Reply to this item at:

  

___
  Message sent via/by Puszcza
  http://puszcza.gnu.org.ua/



[tex4ht] [bug #442] Bugs from cmidrule of booktabs

2019-10-22 Thread Michal Hoftich
Follow-up Comment #1, bug #442 (project tex4ht):

Thanks for the report. I will look at this probably after I release the new
make4ht version, as it keeps me quite busy right now.

___

Reply to this item at:

  

___
  Message sent via/by Puszcza
  http://puszcza.gnu.org.ua/



[tex4ht] [bug #440] tabular generates invalid html due to trailing row

2019-10-17 Thread Michal Hoftich
Follow-up Comment #4, bug #440 (project tex4ht):

It seems that booktabs commands only add CSS declarations for the rows with
borders. I've updated the build file to check also the CSS, so it should be
OK. Here is a new version.

I will definitely made filter from this code, I will also include it to
`common_domfilters` extension.

(file #326)
___

Additional Item Attachment:

File name: build.lua  Size:2 KB


___

Reply to this item at:

  

___
  Message sent via/by Puszcza
  http://puszcza.gnu.org.ua/



[tex4ht] [bug #440] tabular generates invalid html due to trailing row

2019-10-16 Thread Michal Hoftich
Follow-up Comment #1, bug #440 (project tex4ht):

You can try the attached build file. It tries to remove all empty rows from
tables. It is not easily possible to detect empty rows at the moment when
tex4ht inserts starting tags for rows, I think. So the Lua post-processing
seems like a best solution. Execute it using

 make4ht -e build.lua filename.tex



(file #325)
___

Additional Item Attachment:

File name: build.lua  Size:1 KB


___

Reply to this item at:

  

___
  Message sent via/by Puszcza
  http://puszcza.gnu.org.ua/



[tex4ht] [bug #441] tex4ht+fontspec+textbf produces incorrectly nested html

2019-10-16 Thread Michal Hoftich
Follow-up Comment #1, bug #441 (project tex4ht):

Hi Alex, 

you are right, there is tag mismatch. Try the following .cfg file:

\Preamble{xhtml}
\Configure{textit}{\HCode{}\NoFonts}{\EndNoFonts\Tg}
\Configure{textbf}{\HCode{}\NoFonts}{\EndNoFonts\Tg}
\Configure{textsc}{\HCode{}\NoFonts}{\EndNoFonts\Tg}
\begin{document}
\EndPreamble


I've added the fix to tex4ht sources.

Best, 
Michal

___

Reply to this item at:

  

___
  Message sent via/by Puszcza
  http://puszcza.gnu.org.ua/



Re: [tex4ht] New make4ht version and documentation

2019-10-14 Thread Michal Hoftich
> This is caused by the font issue in Debian container that I mentioned
> in my previous email. I need to investigate it more, but it will take
> some time.

I've found that the issue was missing "lmodern" package in the Docker
container. It seems OK now.

Best,
Michal


Re: [tex4ht] New make4ht version and documentation

2019-10-11 Thread Michal Hoftich
Hi Nasser,

> When copying the compiling examples from the above page,
> the HTML shows the double quotes around the parameters
> which should be the normal  ", it shows them as a strange
> backquote instead ”.

This is caused by the font issue in Debian container that I mentioned
in my previous email. I need to investigate it more, but it will take
some time.

Best,
Michal



[tex4ht] New make4ht version and documentation

2019-10-11 Thread Michal Hoftich
Hi all,

I hope to release a new make4ht (and tex4ebook) versions soon. There
are some big news:

- I've updated the documentation. There is lot of new information,
fixed grammar, it has totally new structure. I still need to add one
final section about development of filters, extensions and output
formats.

- I've set up a Github action that compiles the documentation every
time I push an update and publishes it on my web:

https://www.kodymirus.cz/make4ht/make4ht-doc.html

I would be happy if anyone could take a look at it and find any errors
or things that are hard to understand. It has hypothes.is support, so
it is possible to add annotations directly on the web. We can also
chat on Matrix / Gitter:

https://matrix.to/#/!TPtwmiUBINdfBLVrmC:matrix.org
https://gitter.im/tex4ht/community?

One issue I found is that Debian's version of tex4ht contains some
wrong .htf files, because the code listings contains wrong characters
for {, } and some other chars.

- added support for reading of the input from the standard input. Just
use the "-" character instead of the filename

- I am considering reduction of the amount of the code written to the
terminal. I''ve setup LaTeX to use the batchmode and created parser
for detecting errors in the log file. The setting of the mode is
configurable, to return back to the original settings use

 filter_settings "htlatex" {interaction="errorstopmode"}

in a build file or  in the .make4ht configuration file. I've found
compilation in this case to be faster, but the log parsing takes some
time. I am still not decided if I like this change.

- new extensions:

  - preprocess_input: support for pre-processing of the input files
using Pandoc and Knitr. It can detect the file type and process it
accordingly. It supports Markdown, RMarkdown, Rtex, Rnw etc.

  - collapsetoc: useful for minitoces in multi page HTML files - it
created table of contents containing headers in the HTML file and top
level headers in the others. It is similar to TOCs used in
Readthedoces (https://papis.readthedocs.io/en/latest/configuration.html
for example)

- fixed lot of bugs in the ODT output
- fixed lot of other bugs

I would also like to apologize to everyone who sent me a mail during
summer and I haven't responded yet. I was somewhat overwhelmed by many
things and I am sometimes bad at responding when I am exhausted. I
hope to catch it all and respond in a near future.

Best regards,
Michal


[tex4ht] [bug #438] latin small letter a with grave

2019-10-10 Thread Michal Hoftich
Update of bug #438 (project tex4ht):

 Open/Closed:Open => Closed 


___

Reply to this item at:

  

___
  Message sent via/by Puszcza
  http://puszcza.gnu.org.ua/



[tex4ht] [bug #438] latin small letter a with grave

2019-09-29 Thread Michal Hoftich
Follow-up Comment #4, bug #438 (project tex4ht):

Yes, other accented letters worked, this is why I didn't know about this
issue. In my tests I used Czech letters, which worked well.

Thanks for your kind words, I am working hard on the new make4ht release.

___

Reply to this item at:

  

___
  Message sent via/by Puszcza
  http://puszcza.gnu.org.ua/



[tex4ht] [bug #438] latin small letter a with grave

2019-09-27 Thread Michal Hoftich
Follow-up Comment #2, bug #438 (project tex4ht):

It should be fixed by the most recent commit in make4ht. The issue was that
make4ht replaced characters for non-breaking spaces in the document by XML
entities, but the a grave character uses the same byte as the second component
in it's UTF-8 sequence. This resulted in invalid UTF-8 string.

___

Reply to this item at:

  

___
  Message sent via/by Puszcza
  http://puszcza.gnu.org.ua/



[tex4ht] [bug #438] latin small letter a with grave

2019-09-26 Thread Michal Hoftich
Follow-up Comment #1, bug #438 (project tex4ht):

Ah, you are right. This is issue with LuaXML that I thought that I fixed. But
obviously I didn't :(

___

Reply to this item at:

  

___
  Message sent via/by Puszcza
  http://puszcza.gnu.org.ua/



[tex4ht] I've set up tex4ht chat

2019-09-20 Thread Michal Hoftich
Hi all,

I've set up chat room for tex4ht on Matrix, with Gitter bridge:

https://matrix.to/#/!TPtwmiUBINdfBLVrmC:matrix.org?via=matrix.org
https://gitter.im/tex4ht/community?utm_source=share-link_medium=link_campaign=share-link

I think it should be possible to bridge it also to IRC, but I've never
used that. If anybody can  create  an IRC room, I will connect it
then.

I hope it can be useful for quick questions or for people who don't
want to subscribe to the mailing list or to the bug DB.

Best regards,
Michal


[tex4ht] [bug #437] unclosed \ifnum for \\* in longtable

2019-09-18 Thread Michal Hoftich
Follow-up Comment #3, bug #437 (project tex4ht):

Thanks for the confirming. I've pushed the fixed code to the source code repo.

___

Reply to this item at:

  

___
  Message sent via/by Puszcza
  http://puszcza.gnu.org.ua/



Re: [tex4ht] [bug #434] HTML mode is spewing some XML code

2019-08-26 Thread Michal Hoftich
Hi Bill,

>
> https://www.albany.edu/dept/math-stat/hammond/demos/tex4ht/hilmar.html

Thanks for this demo. You are right that there are some issues with
spaces. I've took a look at their support in tex4ht and found that
there is no support for \:, \! or \; in tex4ht sources. So I've added
them.  The widths of corresponding  elements is based on
fractions on this page:
https://chenfuture.wordpress.com/2008/03/22/math-spacing-and-length-units/.
The \quad should really be 1em, but \ should be much smaller than it
is right now, I've set it to 0.33 em.

Best regards,
Michal


Re: [tex4ht] make4ht -f odt bug

2019-08-23 Thread Michal Hoftich
Hello,

> MiKTeX gives the well-known bugs:
> "Java ... xtpipes ... " and also "tidy failed as well ...",
> but  TeXLive runs OK (no error or warning messages).

the ODT output for make4ht should work on Miktex. At least it used to
work some time ago, when I wrote code to locate the Xtpipes files. I
don't have access to Windows machine right now, so I cannot test what
went wrong myself. But another user tested her system and it compiled
on Miktex. I know there are several packages for tex4ht in Miktex,
maybe some of them is not installed on your system?

> However, when I try to open the  .odt files, Word says that
> something is wrong for both.

Regarding the attached ODT file, the ODFValidator [1] reports one
error - unexpected attribute "table:value-type". LibreOffice can still
open the file, but Word may be more strict in this regard. We removed
this attribute from tex4ht sources recently, I hope the fix is already
included in TL, but I am not sure.

The ODT file created using current tex4ht sources is attached. It
passes the ODF validation and LO opens it without issues.

Best regards,
Michal

[1] https://odfvalidator.org/


sample.odt
Description: application/vnd.oasis.opendocument.text


[tex4ht] [bug #433] Ligature fi becoming ø in avant garde

2019-08-16 Thread Michal Hoftich
Follow-up Comment #1, bug #433 (project tex4ht):

Thanks for the report. The 8-bit fonts can be sometimes a bit mess. Even if a
standard encoding is used, some characters, especially ligatures can be
non-standard, which results in such errors. tex4ht uses special files with
conversion tables between font characters and Unicode. These tables were
originally written by hand, so they may contain errors.

I've fixed the files using Htfgen [1], tool that can generate conversion
tables automatically. I've fixed lot of bugs and added new features to this
tool, so the updates for text fonts should be mostly automatic in the future.
Math fonts are a different story, as they often contain unique glyphs that are
not even in Unicode.

[1] https://github.com/michal-h21/htfgen

___

Reply to this item at:

  

___
  Message sent via/by Puszcza
  http://puszcza.gnu.org.ua/



[tex4ht] [bug #434] HTML mode is spewing some XML code

2019-08-13 Thread Michal Hoftich
Follow-up Comment #1, bug #434 (project tex4ht):

I don't think this is a bug. tex4ht now produces HTML5 in XML serialization by
default, another supported HTML doctype is XHTML. As post-processing that
involves XML tools  may be used by tex4ht, it is really not a good idea to
produce HTML files that are not well-formed XML at the same time.

___

Reply to this item at:

  

___
  Message sent via/by Puszcza
  http://puszcza.gnu.org.ua/



Re: [tex4ht] tex4ht Digest, Vol 114, Issue 2

2019-07-10 Thread Michal Hoftich
Dear Alexandre,

On Sat, Jul 6, 2019 at 1:23 PM Alexandre Roberts
 wrote:
> A few weeks ago I posted a query about using parnotes whose footnote 
> anchors/hooks use Arabic-style numerals in right-to-left Arabic script:
> https://tex.stackexchange.com/questions/495709/producing-odt-arabic-edition-with-apparatus-in-parnotes-via-tex4ht-customizing
> I am hoping to convert a large document into ODT/Word format in the next 
> couple weeks that uses such parnotes extensively, so if anyone has a 
> solution, I would be grateful not to have to type in all those numbers by 
> hand!

I was finally able to come with a solution. I've posted details as an
answer on TeX.sx, but also updated the tex4ht sources with a
\arabicdigits macro. It is available when you require Polyglossia or
Babel packages (it is not necessary to require the Arabic language).

Here is still the issue that Arabic with both Babel and Polyglossia
fails with tex4ht, this is something what we really should fix. I will
be on vacations next few weeks and mostly without access to a
computer, so it may take some time.

Best regards,
Michal


[tex4ht] [bug #430] Please support document class scrreprt with dblatex

2019-07-05 Thread Michal Hoftich
Follow-up Comment #1, bug #430 (project tex4ht):

Thanks for the report. I've added the support for Koma classes as well as
Memoir to the tex4ht sources. You can try to place the updated docbook.4ht to
the directory with your document to test it.

(file #318)
___

Additional Item Attachment:

File name: docbook.4htSize:165 KB


___

Reply to this item at:

  

___
  Message sent via/by Puszcza
  http://puszcza.gnu.org.ua/



Re: [tex4ht] Problem with tex4ht after latest update, adjustbox problem

2019-07-05 Thread Michal Hoftich
Hi Nasser,

> TL 2019 on linux. I did a diff and I see some new additions in
> html4.4ht related to adjustbox which looks like the cause of this
> problem.

I don't get any error with your test file. Maybe you have a older
version of adjustbox.4ht somewhere? From your log I can see that there
is no `\Configure{Adjsutbox}`, which is introduced in the current
adjustbox.4ht distributed in TL.

Best regards,
Michal


[tex4ht] [bug #429] htlatex: Does not delete intermediate files

2019-07-05 Thread Michal Hoftich
Follow-up Comment #4, bug #429 (project tex4ht):

You can use a simple wrapper around htlatex if you don't mind the issues I
described in my previous post. This version is for Unix based OSes:

#!/bin/bash
htlatex "$@"
base=${1%.tex}
rm $base.dvi
rm $base.idv
rm $base.lg
rm $base.tmp
# following files should be kept IMHO
# the log file can be usefull for error investigation
rm $base.log
# these files are reused between TeX runs, it is not a good idea to delete
them
rm $base.4tc
rm $base.4ct
rm $base.aux
rm $base.xref


I would say that deleting the dvi, idv, lg and tmp files should be quite safe,
as they are generated every time from the scratch and the subsequent
compilations don't depend on them. 

___

Reply to this item at:

  

___
  Message sent via/by Puszcza
  http://puszcza.gnu.org.ua/



[tex4ht] [bug #429] htlatex: Does not delete intermediate files

2019-07-03 Thread Michal Hoftich
Follow-up Comment #2, bug #429 (project tex4ht):

Hi Hilmar, as Karl and Nasser said, there is no cleanup performed by htlatex
or other tex4ht scripts by default. The auxilary files are in fact quite
important for the correct conversion, so it is not a good idea to delete them
after every compilation. For example some complex tables may need more than
three compilations by LaTeX to correctly resolve the structure, so you would
never get a correct result with removed aux files.


___

Reply to this item at:

  

___
  Message sent via/by Puszcza
  http://puszcza.gnu.org.ua/



[tex4ht] [bug #425] Conflicts between babel and new-accents

2019-06-06 Thread Michal Hoftich
Follow-up Comment #1, bug #425 (project tex4ht):

You are right, there should be \:CheckOption{new-accents}\if:Option\else
before \Configure{accent}. I've fixed this in the sources. The updated
unicode.4ht file is attached.

Thanks for the report.

(file #314)
___

Additional Item Attachment:

File name: unicode.4htSize:64 KB


___

Reply to this item at:

  

___
  Message sent via/by Puszcza
  http://puszcza.gnu.org.ua/



[tex4ht] [bug #426] htlatex mathjax option breaks references

2019-06-06 Thread Michal Hoftich
Follow-up Comment #1, bug #426 (project tex4ht):

This is something that is not easily solvable. The labels inside math are not
processed by LaTeX at all, so the labels are not saved. MathJax itself
supports some form of referencing, when \eqref command is found in the HTML
code. So one possible solution is to provide a custom command, that is written
as \eqref in the HTML. See this answer of mine:

https://tex.stackexchange.com/a/378359/2891

It also discuss another option, which is pre-processing of the TeX file, but
it is a bit more complicated. It is necessary to use a custom command to
reference to math, because if normal \ref was used, you would lose the
referencing support for tables, sections, etc.



___

Reply to this item at:

  

___
  Message sent via/by Puszcza
  http://puszcza.gnu.org.ua/



[tex4ht] [bug #423] \left and \right inside caption with label cause TeX capacity exceeded when used with hyperref

2019-05-29 Thread Michal Hoftich
Follow-up Comment #3, bug #423 (project tex4ht):

The problem is, you may want to expand some macros, while others not. It is
possible to disable all expansion, but you cannot automatically detect which
macros should be expanded and which not.

___

Reply to this item at:

  

___
  Message sent via/by Puszcza
  http://puszcza.gnu.org.ua/



[tex4ht] [bug #423] \left and \right inside caption with label cause TeX capacity exceeded when used with hyperref

2019-05-26 Thread Michal Hoftich
Follow-up Comment #1, bug #423 (project tex4ht):

Dear Joel,

this issue is caused by the nameref support, which is loaded automatically by
hyperref. Each caption, section title and similar stuff is then saved to the
auxilary file, in order to be available for the \nameref command. There can be
expansion issues when the contents are written to the auxilary file, as in
your case. 

I don't know if we can fix that on the tex4ht level - we could use something
like \detokenize command to write literal contents of the caption to the aux
file, but in this case you wouldn't save the current value of macros, which
you may want in some cases. 

On the document level, you can use the \protect command to disable expansion
of the command when it is written: 

\caption{$\protect\left(A\protect\right)$}

BTW, if you want to make an eBook, you may want to take a look at tex4ebook:
https://ctan.org/pkg/tex4ebook?lang=en




___

Reply to this item at:

  

___
  Message sent via/by Puszcza
  http://puszcza.gnu.org.ua/



Re: [tex4ht] Presentation at BachoTeX

2019-05-22 Thread Michal Hoftich
Hi all,

> I will go to BachoTeX this year, I will have a  presentation about
> TeX4ht. The registration is still open, I think, so if anybody wants
> to see that, or have a face to face conversation, it will be possible.

So BachoTeX is over :) I hope my presentation was interesting, I was
super nervous as every time I give a talk, this was also my first talk
in English. I also had a cold, but I lost my voice on the next day
after my presentation, luckily.

Anyway, here are my slides for  anyone interested:
http://www.gust.org.pl/bachotex/2019-pl/presentations/mhoftich-1-2019.pdf

I also published my first article in TUGBoat, it is mainly about
make4ht. Thanks Karl and Barbara for the proofreading, I was shocked
how many errors (even in code listings) I missed. The article appeared
in the last issue: https://tug.org/TUGboat/Contents/contents40-1.html.

I also met some tex4ht users, especially Wojtek, Deimi, Edgaras and
Reinhard, which was really nice and motivating. Thank you guys for all
the fun and interesting ideas.

So it was really nice conference and I hope to attend it again in the future.

Best regards,
Michal


Re: [tex4ht] How to best find cause of Illegal storage address?

2019-05-16 Thread Michal Hoftich
On Thu, May 16, 2019 at 6:29 PM Nasser M. Abbasi  wrote:
>
> >
> > This document has lots of Latex code generated by Maple,
> > which still use very old latex font commands, and that is why I
> > needed to use enabledeprecatedfontcommands. The strange thing,
> > it only failed with tex4ht and not with lualatex.

We had some clashes with Koma Script because of the old font commands,
so we added some code that should fix the problem. I think it would be
still useful if you could make a small example that shows this issue
someday. I agree that it is not an urgent issue, but it may still
cause problems in the future.

Best regards,
Michal


Re: [tex4ht] How to best find cause of Illegal storage address?

2019-05-16 Thread Michal Hoftich
Hi Nasser,

> --- error --- Illegal storage address
> Make4ht: Fatal error. Command tex4ht returned exit code 256
> 

Isn't it possible to make a smaller example? I think this error should
be related to the tex4ht.env processing, so it should happen even with
a smaller file. I think the used fonts and used command line options
are the most important.

Best regards,
Michal


Re: [tex4ht] Bold index entries

2019-05-07 Thread Michal Hoftich
Hi Jürgen,

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

Do you still use the workflow described here:
https://tug.org/pipermail/tex4ht/2018q3/002065.html?  I can get a
correct result using the code from my answer.

Best regards,
Michal



Re: [tex4ht] is it possible to use KaTex with tex4ht?

2019-05-07 Thread Michal Hoftich
Hi Nasser,


> Since tex4ht now supports mathjax mode, I was just wondering,
> if it is even possible to make tex4ht also support katex mode
> as well? i.e. compile the latex file so that the HTML
> generated uses Katex for math rendering instead of mathjax.

yes, it is possible to support KaTeX. Try the following configuration file:


\Preamble{xhtml,mathjax}
\Configure{MathjaxSource}{}
\Configure{@HEAD}{\HCode{
https://cdn.jsdelivr.net/npm/katex@0.10.1/dist/katex.min.css;
integrity="sha384-dbVIfZGuN1Yq7/1Ocstc1lUEm+AT+/rCkibIcC/OmWo5f0EA48Vf8CytHzGrSwbQ"
crossorigin="anonymous">\Hnewline
https://cdn.jsdelivr.net/npm/katex@0.10.1/dist/katex.min.js";
integrity="sha384-2BKqo+exmr9su6dir+qCw08N2ZKRucY4PrGQPPWU1A7FtlCGjmEGFqXCv5nyM5Ij"
crossorigin="anonymous">\Hnewline
https://cdn.jsdelivr.net/npm/katex@0.10.1/dist/contrib/auto-render.min.js";
integrity="sha384-kWPLUVMOks5AQFrykwIup5lo0m3iMkkHrD0uJ4H5cjeGihAutqP0yW0J6dpFiVkI"
crossorigin="anonymous"
onload="renderMathInElement(document.body);">\Hnewline
}}
\begin{document}
\EndPreamble


There is one downside: KaTeX supports even less LaTeX commands than
MathJax, not mentioning all custom commands you use in your documents.
So I can predict that you will have lot of troubles in trying to write
a support for your documents.
I am not sure it is worth the trouble, but you will see.

Best regards,
Michal


[tex4ht] [bug #422] error from pgflibraryfadings when adding tcolorbox with new tex4ht tikz driver. TL 2019

2019-05-03 Thread Michal Hoftich
Follow-up Comment #1, bug #422 (project tex4ht):

Hi Nasser.

this issue had been fixed by the current version of the dvisvgm4ht driver. It
should work for most documents now.

Best,
Michal

___

Reply to this item at:

  

___
  Message sent via/by Puszcza
  http://puszcza.gnu.org.ua/



Re: [tex4ht] Why tex4ht produces ", for \, instead of space in mathjax mode only?

2019-04-21 Thread Michal Hoftich
Hi Nasser,

this is caused by redefinition of commands that caused issues in the
TOC. I've changed that to redefine these commands only on the moment
something is being written to TOC, so they should work as usual in the
normal text. Try the attached mathjax-latex-4ht.4ht file.

Best regards,
Michal


mathjax-latex-4ht.4ht
Description: Binary data


Re: [tex4ht] BUG: xcolor tex4ht

2019-04-11 Thread Michal Hoftich
Hi Deimi,

I've found the issue - it was necessary to insert tex4ht hooks in
\AtBeginDocument. The sample on TeX.sx now works with the updated driver. I
haven't tested the results with TikZ manual yet.

Best,
Michal


Re: [tex4ht] BUG: xcolor tex4ht

2019-04-10 Thread Michal Hoftich
Hi Deimi,

>
> Does it help if you set:
> 1. 'dvilualatex' compiler instead of 'latex' (probably you'll need 
> \usepackage[T1]{fontenc} for TL2019)
> 2. \usepackage{luatex85} (for compatibility: pgfsys-dvips.def driver uses 
> \pdfsavepos macro, while in luatex it's \savepos)?


Thanks for the suggestion. The result seems to be same with all three
major engines. I am sure we will see more of such errors with TikZ
manual, as there is over 1000 figures.

Best,
Michal


Re: [tex4ht] BUG: xcolor tex4ht

2019-04-10 Thread Michal Hoftich
>
> Ah, there seems to be lot of issues. The compilation fails with fatal
> error, but most of the document had been generated, up to section "94
> Mathematical Expressions".


I've found that when I commented out all math-operator environments
containing "`" character in pgfmanual-en-math-parsing.tex, like:

\begin{math-operator}{{\char`\&}{\char`\&}}{infix}{and}

then the compilation runs. So it is necessary to fix this environment
definition in order to get the manual.

Best,
Michal


Re: [tex4ht] BUG: xcolor tex4ht

2019-04-10 Thread Michal Hoftich
> I would really appreciate that!  The main difficulty I have is that TeX4ht
> hooks into all kinds of macros which results in altered expansion behaviour
> which blows up all over the place.  For the xcolor problems I have found some
> workarounds, prior to your patches, which can be found on my tex4ht branch.
>
> https://github.com/hmenke/pgf/tree/tex4ht
>

Ah, there seems to be lot of issues. The compilation fails with fatal
error, but most of the document had been generated, up to section "94
Mathematical Expressions".

You definitely want to replace htlatex with make4ht in the Makefile.
It has much more features. I would add the following line to the
Makefile:

make4ht -u $(doc).tex "2"

I  would also remove the \CutAt command from the config file, as it
doesn't work correctly.

With the alternative driver mentioned in my TeX.sx answer, I can get
1144 SVG images. I don't think it is all, as some code samples lack
the images. Some samples seems wrong, for example the cover image. The
SVG conversion step is quite slow because of the huge number of
images. Because we experienced such slow compilations in the past,
I've created the `dvisvgm_hashes` extension for make4ht.
Unfortunately, it hangs for some reason, so I was not able to speed up
the compilation. I will need to explore this issue more.

It will be really necessary to create new configurations for  custom
commands used in the manual. in order to insert custom HTML code. Here
is some information how it can be done:

https://github.com/michal-h21/helpers4ht/wiki/tex4ht-tutorial

Some custom CSS will be necessary as well, but that can be added  when
everything works.

> Hm, that might or might not be the case.  Since the problem seems to be
> driver-dependent it indicates a PGF/TikZ problem, but I agree, it will be
> difficult to isolate.

It uses the dvips driver and dvisvgm for the conversion, all the
driver does is to add the tex4ht instruction that requires DVI to
image conversion. That part of the DVI file is then extracted as a new
page to a separate DVI file with a .idv extension, which is then
processed using dvisvgm.

Best regards,
Michal


Re: [tex4ht] BUG: xcolor tex4ht

2019-04-09 Thread Michal Hoftich
> Thank you very much.  Does that also fix the
> \AtBeginDocument{\definecolor{...}} issue?  Unfortunately the PGF/TikZ manual
> still doesn't build with TeX4ht, but that is not related to xcolor now.
>

It should fix that. The main issue was the color name anyway. But I am
sure there are other issues with the manual. I've tried to convert it
using tex4ht two years ago and failed, mainly because the compilation
was too slow on my machine. I think some issues can be fixed using the
dvisvgm4ht driver:

https://github.com/michal-h21/dvisvgm4ht

It seems to produce much better results  than the default driver.
Externalization should work too. I can help, but I am busy this week
with writing article for BachoTeX, next week should be better.


> That is the first time I see this problem.  Unfortunately, chemfig is an
> extremely complex package by itself, so I don't really know how those circles
> are drawn.  It must have to with that because if I just draw circles with 
> TikZ,
> no shift occurs.  If it is possible for you to create a MWE without chemfig,
> you can report it on the PGF/TikZ bugtracker.

I am sure that hunting for this bug would be quite difficult, it
really seems like a problem in chemfig.

Best,
Michal


Re: [tex4ht] BUG: xcolor tex4ht

2019-04-09 Thread Michal Hoftich
Hi Henri,

> There is a bug in tex4ht color support which causes a compilation
> error when the color name is same as a color scheme name. You would
> get the same error with \textcolor{rgb} for example. I hope to fix
> that tomorrow.

I hopefully fixed the issues. I've updated the sources, the updated
color.4ht and xcolor.4ht files are attached.

Btw, do you know what could cause the issue with circles moved
slightly to the right in this answer?:

https://tex.stackexchange.com/a/482913/2891

Best regards,
Michal


xcolor.4ht
Description: Binary data


color.4ht
Description: Binary data


Re: [tex4ht] BUG: xcolor tex4ht

2019-04-08 Thread Michal Hoftich
Hi Henri

>
> \documentclass{article}
> \usepackage{xcolor}
> \begin{document}
> \textcolor{gray!100}{Lorem ipsum.}
> \end{document}
>

There is a bug in tex4ht color support which causes a compilation
error when the color name is same as a color scheme name. You would
get the same error with \textcolor{rgb} for example. I hope to fix
that tomorrow.

Best regards,
Michal


Re: [tex4ht] underline math does not work in tex4ht when in mathjax mode

2019-04-08 Thread Michal Hoftich
Hi Nasser, Bill,

> This sounds like a good solution. I do not know if those in the know-how
> could implement this in ex4ht if it not too hard.
>
> I also do not know if I could do what you described using some configuration
> in my .cfg.

You can put this \Css command to your config file:

\Css{span.underline {border-bottom: 0.2ex solid black;text-decoration:none;}}

Thanks Bill for the idea.

Best regards,
Michal


Re: [tex4ht] underline math does not work in tex4ht when in mathjax mode

2019-04-06 Thread Michal Hoftich
Hi Nasser,

> Is this a mathjax issue itself or make4ht is not doing
> something right?

It is definitely MathJax issue, but I am not sure if they can fix
that. Only commands in math are being passed to MathJax, so it would
need to detect font properties of the surrounding text to detect if
the current text is underlined.

Best regards,
Michal


[tex4ht] Presentation at BachoTeX

2019-04-03 Thread Michal Hoftich
Hi all,

I will go to BachoTeX this year, I will have a  presentation about
TeX4ht. The registration is still open, I think, so if anybody wants
to see that, or have a face to face conversation, it will be possible.

Best regards,
Michal


Re: [tex4ht] about \dag and \ddag in tex4ht with mathjax

2019-04-03 Thread Michal Hoftich
Hi Nasser,


>
> My question is why \renewcommand did not work, I
> remember seeing something like this before, something
> to do with order how things are processed?
>

no, \renewcommand cannot  work as it is not preserved during the
conversion, so MathJax cannot see that. You must use the configuration
file.

> and is it possible to add the above configuration of
> dag and ddag to the official make4ht mathjax style file
> itself so it is there by default all the time instead
> of adding it to the .cfg file?

I think it is best to keep your private configuration file. You can
put the common command declarations to a standalone file, save it in
your local TEXMF tree and include it using the \input command.

Best regards,
Michal


[tex4ht] [bug #411] reversemarginpar is ignored

2019-03-25 Thread Michal Hoftich
Follow-up Comment #1, bug #411 (project tex4ht):

I've added a support for \reversemarginpar in the HTML format. It will produce
the "reversemarginapar" class, which can be styled using CSS. Modified version
of the CSS code is used by default, but the result is quite ugly. Better
solution is to use something like:


\Preamble{xhtml}
\Css{.reversemarginpar{float:left;width:10em;margin-left:-11em;font-size:0.8em;}}
\Css{.marginpar{margin-right:-11em,width: 10em;}}
\Css{body{margin-left:11em;max-width:55em;}}
\begin{document}
\EndPreamble

More code would be needed to support smaller screens.


The fix  will appear only in TL 2019. 


___

Reply to this item at:

  

___
  Message sent via/by Puszcza
  http://puszcza.gnu.org.ua/



Re: [tex4ht] several bugs and a query

2019-03-25 Thread Michal Hoftich
Dear Alex,

> Many thanks for this fix -- and for posting it ahead of time! It works 
> perfectly as far as I can tell.

I've just fixed the issue with footnote anchor in the same size as the
footnote text. I hope it was the last bigger issue :)

Best regards,
Michal


Re: [tex4ht] several bugs and a query

2019-03-19 Thread Michal Hoftich
Dear Alexandre,

> I just noticed that TeX Live 2018 has been frozen. I am hoping to submit a 
> Word document to a publisher before the end of the month. If there is a fix 
> for the superscript/subscript-in-footnotes bug before then, will there be 
> some way to patch my version of tex4ht before the 2019 release?

The changes should be available in TL 2019 pre-test. Alternatively,
you can use the ooffice.4ht file that I just generated from the
sources:
https://gist.github.com/michal-h21/46586a5fc24631feb528839863948aa5

It contains fix for the superscripts in footnotes and several other
changes from the last week -  see the ChangeLog:
https://tug.org/tex4ht/changelog.html

Best regards,
Michal



[tex4ht] [bug #412] tex4ht \Css code works using standard document class but has no effect using koma-script class

2019-03-15 Thread Michal Hoftich
Follow-up Comment #1, bug #412 (project tex4ht):

Hi Nasser,

I don't think it was a bug, it was just the fact that different elements were
used in configurations for Komascript and base classes. 

Anyway, since HTML5 provides  and  elements, the
configurations for floats, figures and captions will use these in the html5
output.


Best,
Michal

___

Reply to this item at:

  

___
  Message sent via/by Puszcza
  http://puszcza.gnu.org.ua/



Re: [tex4ht] ! Bad register code (65536)., \__regex_query_set:nnn ... \l__regex_curr_pos_int MATHJAX mode

2019-03-13 Thread Michal Hoftich
Hi Nasser,

> I know the problem is due to large size of the equation.
> Editor tells me it is 208,987 characters long so I have
> to remove it.   But the question is why this error in mathjax
> only?

Because l3regex is used to clean-up the math. There are spaces before
brackets and other issues othewise. MathJax doesn't seem to like that.
So it is best to keep equation size in some reasonable limits :)

Best regards,
Michal


Re: [tex4ht] %%~ expands to $TEXMFDIST

2019-03-11 Thread Michal Hoftich
Hi Karl,

> TL19, including this change, is currently being pretested --
> https://tug.org/texlive/pretest.html. If anyone has patches to be
> included, please let me know asap.

I've just installed TL19 pretest and it seems to work well. I was bit
worried about Lua 5.3, which has some backward incompatible changes,
but I haven't found anything wrong so far.

Best,
Michal


Re: [tex4ht] several bugs and a query

2019-02-18 Thread Michal Hoftich
Dear Alex,

I've been busy in the last week, so I was not able to take a look at
these issues yet. I hope that things will settle down soon, I will
start to process the issue queue then. No need to worry about the
number of issues.

Best regards,
Michal

> Just a follow-up about the bug reports/feature requests I sent out a week 
> ago. I realize I asked for a lot all at once, so I thought I would single out 
> a couple that are highest priority:
>
> 1. Superscript (and subscripts) not working in footnotes 
> (https://tex.stackexchange.com/questions/474005/superscript-not-working-in-footnotes-in-tex4ht-output).
>  This is the main one because it can't be fixed by find/replace. I use 
> superscript to refer to the "recto" and "verso" of folios in medieval 
> manuscripts (e.g., `folio 2\textsuperscript{r}` for the recto side of folio 
> 2), and I use subscript for line numbers when referring to manuscripts or 
> critical editions (e.g., `22\textsubscript{1-24}` for lines 1-24 of page 22). 
> Especially in the latter case, information is actually lost in the 
> conversion, since "221-24" means something quite different from "22, lines 
> 1-24".
>
> 2. Less important because it's about formatting rather than information, but 
> still problematic because it can't be fixed with find/replace, is the problem 
> of spuriously italicized (or boldface) footnote hooks 
> (https://tex.stackexchange.com/questions/474003/spuriously-italicized-footnote-hooks-in-tex4ht-output).
>
> The rest are less important. The section break issue can be fixed with 
> find/replace in MS Word (find ^b = Section break, replace it with nothing). 
> The section numbering issue is not an issue at all (I was confused). As for 
> formatting footnotes, that is certainly not urgent!
>
> I hope this helps. I would also like to express my gratitude to all who work 
> on and maintain tex4ht, which is a life-saver for those of us working with 
> publishers who are still in the Word world!
>
> Best wishes,
> Alex



Re: [tex4ht] several bugs and a query

2019-02-09 Thread Michal Hoftich
Dear Alex,

could you please add MWEs to questions where it is missing? It will
make it easier for us to replicate the issues. I hope to take a look
at all of this in next few days.

Best regards,
Michal


Re: [tex4ht] fyi, few problems with tex4ht and tables

2019-02-03 Thread Michal Hoftich
Hi Karl,

> https://tex.stackexchange.com/questions/472629/how-to-make-tex4ht-center-a-long-table-as-it-does-with-table
> https://tex.stackexchange.com/questions/472628/how-to-remove-lines-added-above-and-below-table-when-using-tex4ht
> https://tex.stackexchange.com/questions/472625/how-to-make-caption-be-centered-under-table-when-using-tex4ht
>
> I am not sure if these are "bugs" or not.

I've provided answers to these questions on TeX.sx. These were mainly
cosmetic fixes, so I wouldn't consider them exactly as bugs. There was
one minor issue in the longtable support which I fixed though.

There is another issue with longtable and captions:
https://tex.stackexchange.com/a/473045/2891 - I haven't fixed that in
the sources yet.

Best regards,
Michal


<    1   2   3   4   5   6   7   8   9   10   >