[tex4ht] [bug #622] error with \footnote mark in \section*

2024-02-25 Thread Ulrike Fischer
URL:
  

 Summary: error with \footnote mark in \section*
 Project: tex4ht
Submitted by: u_fischer
Submitted on: Sun Feb 25 23:15:54 2024
Category: None
Priority: 5 - Normal
Severity: 5 - Normal
  Status: None
 Privacy: Public
 Assigned to: None
Originator Email: 
 Open/Closed: Open
 Discussion Lock: Any

___

Details:

The following document works fine with pdflatex but errors with make4ht:


\documentclass{article}
\begin{document}
\section*{abc\footnotemark}
\end{document}



! Use of \o:@xfootnotemark: doesn't match its definition.
\@ifnextchar ...eserved@d =#1\def \reserved@a {#2}
  \def \reserved@b
{#3}\futu...
l.178 \section*{abc\footnotemark}


(Note that this uses a starred section, with an unstarred \section it would
error in pdflatex too).





___

Reply to this item at:

  

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



[tex4ht] failure with "Illegal storage address" error

2023-10-22 Thread Ulrike Fischer
Hello all,

I have problems to create the html-documentation of hyperref with tex4ht. 

It fails sometimes at this step on windows 11 with a current texlive 2023:

(c:/texlive/2023/texmf-dist/tex4ht/ht-fonts/unicode/adobe/zapfding/pzdr.htf)
[1--- error --- Illegal storage address

t4ht.c (2018-07-04-14:25 kpathsea)
t4ht hyperref-doc
  -ewin32/tex4ht.env
(c:/texlive/2023/texmf-dist/tex4ht/base/unix/tex4ht.env)
Entering hyperref-doc.lg

When it works this place looks like this

(c:/texlive/2023/texmf-dist/tex4ht/ht-fonts/unicode/adobe/zapfding/pzdr.htf)
[1 file hyperref-doc.html
 file hyperref-doc.css
 file hyperref-doc.tmp
]
Execute script `hyperref-doc.lg'

t4ht.c (2018-07-04-14:25 kpathsea)
t4ht hyperref-doc
  -ewin32/tex4ht.env
(c:/texlive/2023/texmf-dist/tex4ht/base/unix/tex4ht.env)


After some investigation I found the following clues:

The error seems to have something to do with the length of pathes:
When I moved the failing document from the Documents folder into the shorter 
c:/home it worked. 

The error seems also to depend on the number of different fonts used and on 
their order. 
So the following fails but compiles if one moves the first use of \emph to the 
begin. 

\documentclass{article}
\usepackage[T1]{fontenc}%
\usepackage{lmodern}%
\renewcommand*{\ttdefault}{lmvtt}%
\usepackage{url}
\begin{document}
%\emph{blub} %compiles with this
\section{Preface}
\textsf{hyperref}

\texttt{hyperref}

\subsection{Restoring removed patches}
project, described at \url{http://xxx.lanl.gov/hypertex/}

{\footnotesize\url{https://ctan.org/tex-archive/support/hypertex/hypertex}}. 

\emph{ad hoc}
\textit{The  Web Companion}, where you will
{\footnotesize This is borrowed from an article by Arthur Smith.} 
\textbf{} 
\end{document}

It would be nice if that problem could be resolved, as it is not good if 
everything second upload to ctan the hyperref html manual is missing. 

Ulrike




Re: [tex4ht] [bug #477] Support for new LaTeX hook management

2023-10-04 Thread Ulrike Fischer
Hallo Michal,

> I've disabled the \DocumentMetadata command in tex4ht.sty. Thich change needs
> the development version of make4ht because in the stable version, tex4ht.sty
> is not loaded before \documentclass, where \DocumentMetadata should be used.
> The options passed to this command are saved in the \:DocumentMetadata
> command, so it should be possible to process them later.

> This change is necessary to prevent a fatal clash between LaTeX's tagging
> support and TeX4ht. 

Which fatal clash?  Do you have an example?

Ulrike



Re: [tex4ht] [bug #608] Adding hyperref package makes tex4ht change its split level order

2023-09-11 Thread Ulrike Fischer
> Follow-up Comment #1, bug #608 (project tex4ht):

> Thanks for the report. It seems to be caused by the Nameref package, which
> redefines the \@chapter command regardless of the fact if the document class
> provides it. We need to undefine it for the correct functioning of the
> page-splitting functionality.

hm. Right that is a bit odd. ;-)

I should probably change that and perhaps even use hooks instead of redefining.

Ulrike 




Re: [tex4ht] [bug #607] tex4ht with package hyperref and option destlabel creates no ancor

2023-08-21 Thread Ulrike Fischer
Sorry I didn't really follow, but in PDF the destlabel option of hyperref works 
with a two-pass compilation: 
at the first compilation, the destination in the PDF has the normal name (e.g. 
section.1), and when the \label is seen, hyperref stores into the aux the new 
name:

\hyper@newdestlabel{section.1}{special-sec-label}

At the second compilation, hyperref then replaces "section.1" by 
"special-sec-label".

I don't quite see why it should be difficult for tex4ht to use the info from 
the aux too.

Ulrike


Guten Tag, Michal Hoftich,

am Montag, 21. August 2023 um 11:19 schrieben Sie:

> Follow-up Comment #5, bug #607 (project tex4ht):

> The solution in the linked answer on TeX.sx is a base for the code that
> make4ht executes by default. I just fixed some errors and issues that I found
> in the meantime.

> On the TeX side, when we add any code to \label, it will always point under
> the section title. This is because of how HTML works. As soon as the section
> is closed, it inserts the  tag, and everything that follows, such as the
> destination anchor for the label, is displayed on another line. It could be
> possible to move the anchor to a section using Lua filters, but it would be
> slower.

> In PDF, it may be possible to insert the destination on the same line, because
> it doesn't insert an implicit line break with the end tag.

> ___

> Reply to this item at:

>   

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





Re: [tex4ht] [bug #477] Support for new LaTeX hook management

2023-04-19 Thread Ulrike Fischer


>> Well I know that rewriting such patches is hard, but this \document
>> redefinition looks very fragile. Sadly I can't make a concrete suggestion
>> how to change it as I have no idea what all the code is doing and what
>> should come before and after other things.

> Yes, it will be fragile, unfortunately. This is the code that loads
> .4ht files and then calls the original \document:

[...]

> It checks if the .cfg file was required, if it wasn't, it will call
> \Preamble, \begin{document}, and \EndPreamble. 

[...]

I know, I mean I checked the code and see the details. What I do not 
understand is the overall picture. 

So if you do a step back and remove in your mind all this 
redefinitions and assume a fresh, unchanged \document command. 

Which tasks do you have to do when you encounter \begin{document} and
which when you encounter \document? 
Which of them can you do with the normal hooks? 
Which of them can't you do and why not? What fails?

Ulrike



Re: [tex4ht] [bug #477] Support for new LaTeX hook management

2023-04-18 Thread Ulrike Fischer
>> while there certainly can/will be problems, this error here seems to be
>> unrelated to \DocumentMetadata. I get an error with make4ht also for this:
>>

> thanks for this example. You are right. It seems that packages added
> in \AddToHook{begindocument/before} or \AtBeginDocument are ignored
> too. It is strange because I thought .4ht files captured them, but
> they are not.

> I was able to fix these hooks issues by manually calling:

> \ifdefined\UseHook
> \UseHook {begindocument/before}
> \UseHook {begindocument}
> \RemoveFromHook{begindocument/before}
> \RemoveFromHook{begindocument}
> \fi

This won't fix the error with \DocumentMetadata as the 
testphase code loads there amsmath not with the standard hooks but in 
our own hook:

\tl_gput_right:Nn \@kernel@before@begindocument
  { \RequirePackage { amsmath } }
  
(which doesn't look right, but moving it to 
\@kernel@after@begindocument@before doesn't work either). 

We could probably load amsmath earlier, but naturally the problem 
could reappear with other packages or code.

> in redefinition of the \document command in tex4ht.sty. I wonder if it
> wouldn't break something else, as in the original version of
> \document, the begindocument hook is called much later, after setting
> various variables. It can break some things in theory. However, the
> variables are mainly related to line width and similar stuff, which
> don't matter much in the conversion process.


Well I know that rewriting such patches is hard, but this \document
redefinition looks very fragile. Sadly I can't make a concrete suggestion
how to change it as I have no idea what all the code is doing and what
should come before and after other things.

Ulrike



Re: [tex4ht] [bug #477] Support for new LaTeX hook management

2023-04-18 Thread Ulrike Fischer
Hello Michal,

> We will need to make some changes to TeX4ht sources to support the metadata
> block used before \documentclass, because TeX4ht is inactive at that moment,
> so it doesn't track loaded files. It caused problems with my tests, namely
> because it loaded the Amsmath package. There can be potentially much more
> problems.

while there certainly can/will be problems, this error here seems to be 
unrelated to \DocumentMetadata. I get an error with make4ht also for this:

\documentclass{article}

\AddToHook{begindocument/before}{\RequirePackage{amsmath}}

\begin{document}
abc
\end{document}


Ulrike



[tex4ht] bug with pagestyle headings

2022-07-07 Thread Ulrike Fischer



\documentclass{article}
\pagestyle{headings}

\begin{document}

\section{abc}

\end{document}

fails with 

! Missing \endcsname inserted.
 
   \\endcsname 
l.58 \section{abc}

It compiles again if one remove the \MakeUppercase from \sectionmark:

\makeatletter
\def\sectionmark#1{%
  \markright {{%
\ifnum \c@secnumdepth >\m@ne
  \thesection\quad
\fi
#1}}}
\makeatother  

Ulrike 



Re: [tex4ht] [bug #488] \over does not give the same result as equivalent \frac

2020-10-26 Thread Ulrike Fischer


> > you shouldn't use \over with latex. With amsmath you would also get a

> \over is supported in LaTeX, to the best of my knowledge (despite all
> the ensuing parsing pain). There is no warning without amsmath, and the
> output is correct.

> And that's good, because surely millions of LaTeX documents use it. -k

sure, \over works in latex and tex. But this is no longer enough in a
world where sources should be output to more than one format.
As the question here shows, the \over syntax is
difficult for converters.

See also https://tex.stackexchange.com/a/365332/2388

Ulrike



Re: [tex4ht] [bug #488] \over does not give the same result as equivalent \frac

2020-10-26 Thread Ulrike Fischer
> Details:

> {a \over b} does not give the same output as \frac{a}{b}, processed by htlatex

you shouldn't use \over with latex. With amsmath you would also get a
warning

Package amsmath Warning: Foreign command \over;
(amsmath)\frac or \genfrac should be used instead
(amsmath) on input line 16.


-- 
Mit freundlichen Grüßen
Ulrike Fischer




Re: [tex4ht] [bug #486] Strange error with minted

2020-10-09 Thread Ulrike Fischer
Guten Tag, Michal Hoftich,

am Donnerstag, 8. Oktober 2020 um 21:22 schrieben Sie:

>>
>>> I've found that the issue was caused by the Catchfile package. It added 
>>> quoted
>>> file to the list of used files. I've added fix for that.
>>
>>Is there a problem in the catchfile package itself?
>>At a first glance I didn't see a place where it would add quotes.
>>

> It uses the following macro:

> \def\CatchFile@CheckFileExists#1{%
>\IfFileExists{#1}{%
>  \expandafter\CatchFile@DefFile\@filef@und\@nil
>  \begingroup\expandafter\expandafter\expandafter\endgroup
>  \expandafter\ifx\csname @addtofilelist\endcsname\relax
>  \else
>\@addtofilelist\CatchFile@File
>  \fi
>}{%
>  \let\CatchFile@File\relax
>}%
> }%

> The quotes are added in \filef@und, which is set by \IfFileExists.

Hm. yes. I can change it in catchfile and use your fix instead. But
why are the quotes a problem? \@filelist can currently contains file
names with quotes also in other cases -- not really probable but
possible.


-- 
Mit freundlichen Grüßen
Ulrike Fischer





Re: [tex4ht] [bug #486] Strange error with minted

2020-10-08 Thread Ulrike Fischer


> I've found that the issue was caused by the Catchfile package. It added quoted
> file to the list of used files. I've added fix for that.

Is there a problem in the catchfile package itself?
At a first glance I didn't see a place where it would add quotes.



-- 
Mit freundlichen Grüßen
Ulrike Fischer




Re: [tex4ht] [bug #482] Can't load fonts with polyglossia

2020-09-01 Thread Ulrike Fischer
> TeX4ht files in Miktex are probably too old. I've sent a mail with an update
> to the Miktex maintainer, so it should be fixed soon hopefully.

While looking at this at tex.sx I saw in texlive a 

(\end occurred inside a group at level 1)

message in the log with make4ht (both with -l and without) with this 
document:

\documentclass{article}

\begin{document}
Hello world
\end{document}


-- 
Mit freundlichen Grüßen
Ulrike Fischer




Re: [tex4ht] [bug #481] Problem with Braces / Brackets in Maths equations using mk4ht latex->mathml

2020-08-21 Thread Ulrike Fischer




> I see. But I did not not write this latex. It seems to work OK in mathjax.

> This is how the latex came from a Mathematica newsletter which is emailed each
> week.

Yes I know. As I wrote: it sometimes work if you are lucky.

And people are lazy and so often try their luck and leave of the
braces. And then they complain when it doesn't work after some change
or when using another engine or workflow.

But the rule is: use braces unless you are very, very sure, that you 
know it works, and that is will continue to work, even if commands are 
changed internally. Which basically means you should only leave them out 
for stuff like x^2. 

See also 
https://tex.stackexchange.com/a/342272/2388
https://github.com/josephwright/beamer/issues/599


-- 
Mit freundlichen Grüßen
Ulrike Fischer





Re: [tex4ht] [bug #481] Problem with Braces / Brackets in Maths equations using mk4ht latex->mathml

2020-08-21 Thread Ulrike Fischer


> After changing the command and adding "mathml", now some
> of my latex files no longer compile.

> Please see this MWE

> \documentclass{article}
> \usepackage{amsmath}
> \begin{document}
> $n^\text{th}$
> \end{document}

$n^\text{th}$ is wrong, unsupported syntax. It works (sometimes) but only by 
chance. The correct latex input if you have more than one token in a 
superscript or subscript is to add additional braces:

\documentclass{article}
\usepackage{amsmath}
\begin{document}
$n^{\text{th}}$
\end{document}

With them your example compiles. 

-- 
Mit freundlichen Grüßen
Ulrike Fischer
mailto:ne...@nililand.de




Re: [tex4ht] error in rendering vertical bar and angle brackets

2020-05-18 Thread Ulrike Fischer



> Thank you, Ulrike, `fontenc` worked for me. But I would emphasize that
> `inputenc` *did* work with `xelatex`, suggesting that it is a problem, of
> sorts, with `text4ht`.

inputenc does nothing with xelatex, inputenc is a package for
pdflatex.

xelatex has a quite different font system. There your input should
simply work. You need \usepackage[T1]{fontenc} **only** for pdflatex.



-- 
Mit freundlichen Grüßen
Ulrike Fischer




Re: [tex4ht] error in rendering vertical bar and angle brackets

2020-05-18 Thread Ulrike Fischer
> Here is an example:

> ```
> \documentclass{article}
> \usepackage[utf8]{inputenc}
> \usepackage[notes]{biblatex-chicago}
> \addbibresource{biblatex-examples.bib}

> \begin{document}

> Hello |

> \end{document}
> ```

This is not related to tex4ht. You would get this in latex too. The
default fontencoding OT1 is a bit restricted and has chars in odd
places.

You need either \usepackage[T1]{fontenc} or should use a command like
\textbar.


-- 
Mit freundlichen Grüßen
Ulrike Fischer




Re: [tex4ht] [bug #464] ! Bad register code (65536). because no new line used in long math?

2020-05-10 Thread Ulrike Fischer



> it seems like issue in the LaTeX regular expression parser. We use it to fix
> some issues in the code that is passed to MathJax. Your code seems to be too
> long for that. Couldn't you break your huge equation into smaller pieces?

The regex code uses toks registers to store tokens, and access them
directly by number where the number is the position. luatex has only
65535 toks register. So regex will not be able to handle text longer
than 65535 character (if the match is at the end).



-- 
Mit freundlichen Grüßen
Ulrike Fischer




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

2018-09-17 Thread Ulrike Fischer
Am Mon, 17 Sep 2018 10:48:40 +0200 schrieb "Jürgen Hubert":

>> What happens if you call xindy directly 
>> 
>> xindy --help
> 
> The same thing:

which means that the problem is not tex4ht relatex and should be
taken to some other list.

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

If cygdrive and the prompt means that cygwin is involved: Make tests
without it. There is really no need to complicate things by using
non-windows tools. 

Open a normal windows cmd line or powershell and run xindy from
there.  Install a perl for windows if needed, e.g.
http://strawberryperl.com/. 


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

Well even in a perfect world where everyone and every OS use unicode
and utf8 an ü (like all other chars with accents) has *two* legal
representation (composed and decomposed) and so is problematic. 


-- 
Ulrike Fischer 
http://www.troubleshooting-tex.de/



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

2018-09-17 Thread Ulrike Fischer
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

?


-- 
Ulrike Fischer 
http://www.troubleshooting-tex.de/



Re: [tex4ht] problem with new dvisvgm 2.6, all svg fies have horizontal lines with no math showing.

2018-09-10 Thread Ulrike Fischer
Am Mon, 10 Sep 2018 00:37:12 -0500 schrieb Nasser M. Abbasi:

> The zip file in the above folder is large, about 250 MB.

Don't you have a small test suite? Which uses loops to test with
large numbers of math equations? Then you wouldn't have to dump such
large files on Michal and Martin. 


-- 
Ulrike Fischer 
http://www.troubleshooting-tex.de/



Re: [tex4ht] tex4ht gives amsmath Error: \tag not allowed here

2018-09-07 Thread Ulrike Fischer
Am Fri, 7 Sep 2018 10:29:48 +0200 schrieb Michal Hoftich:

> Hi Nasser,
> 
>> Ok, using equation instead of \[ \] does not produce error with tex4ht
> 
> Isn't \tag supposed to be used only with amsmath environments? I think
> you really shouldn't use it with \[ \]

No. Tracing the code

\documentclass{article}
\usepackage{amsmath}

\begin{document}
\tracingmacros=1
\[abc \tag{x}\]

\end{document}

you can see 

\[  ->\begin {equation*}

and 

\mathdisplay #1->\ifmmode \@badmath \else $$\def \@currenvir
{#1}\let \dspbrk@context \z@ \let \tag \tag@in@display  


So it is quite obvious that is should work in \[ \].


-- 
Ulrike Fischer 
https://www.troubleshooting-tex.de/



Re: [tex4ht] %%~ => $TEXMFDIST

2018-06-28 Thread Ulrike Fischer
Am Thu, 28 Jun 2018 21:22:03 GMT schrieb Karl Berry:

> 'm thinking it would be best, going forward, if tex4ht.env's %%~
> expanded to $TEXMFDIST instead of $SELFAUTOPARENT

I think in miktex this already happens. See Christian's comment here
https://github.com/MiKTeX/miktex/issues/30

-- 
Ulrike Fischer 
https://www.troubleshooting-tex.de/



Re: [tex4ht] [bug #394] Support for oolatex on Debian

2018-06-26 Thread Ulrike Fischer
Am Tue, 26 Jun 2018 14:35:12 +0200 schrieb Michal Hoftich:

> Thanks, that sounds nice. Bad news is that I've found that Miktex
> doesn't support any of these variables, so a different method to find
> the root directory must be used.

I didn't follow (or understand) which path you need to find but
kpsewhich -expand-var=$TEXMFDIST gives the main miktex root on my
system. 

If something else is missing I suggest to ask for it on the miktex
github tracker.

-- 
Ulrike Fischer 
https://www.troubleshooting-tex.de/



Re: [tex4ht] two versions of unicode.4ht

2016-08-03 Thread Ulrike Fischer
Hello Michal,

>> I found two versions of unicode.4ht in
>> 
>> \ht-fonts\iso8859\1 
>> 
>> one in
>> 
>>   D:exlive\2016exmf-distex4ht\ht-fonts\iso8859\1\charset\
>> 
>> the other in
>> 
>>   D:exlive\2016exmf-distex4ht\ht-fonts\iso8859\1\charset\uni\
>> 
>> Their content is not identical, the one in charset has two extra
>> lines:
>> 
>> '' ''  'fi'   ''
>> '' ''  'fl'   ''
>> 
>> I'm not quite sure if both are really from the texlive installation
>> -- perhaps one of them remained from a test I did to compare the
>> location with the one from miktex, but I mention it anyway just in
>> case. Also I would like to know which one is the correct one. 

> There is quite a lot of unicode.4hf versions generated from
> tex4ht-fonts-4hf.tex:

Yes I know. I'm not wondering about this.

But why do I have two in the iso8859/1/charset folder?

Only "iso8859/1" has a "uni" subfolder in the charset folder with an
additional unicode.4ht.

E.g. compare in your list iso88859/1 with iso8859/2:

2 versions here:

> tex4ht.dir/texmf/tex4ht/ht-fonts/iso8859/2/charset/unicode.4hf
> tex4ht.dir/texmf/tex4ht/ht-fonts/iso8859/2/html/charset/unicode.4hf

but 3 versions here:

> tex4ht.dir/texmf/tex4ht/ht-fonts/iso8859/1/charset/uni/unicode.4hf
 ^^^ odd
> tex4ht.dir/texmf/tex4ht/ht-fonts/iso8859/1/charset/unicode.4hf
> tex4ht.dir/texmf/tex4ht/ht-fonts/iso8859/1/html/charset/unicode.4hf





> It seems that issue someone had on TeX.sx with Miktex [1] is that wrong
> `unicode.4hf` file is used, it can't find the one in `unicode` dir and
> instead the one in `iso8859/1` is used, which results in file with
> declared `utf-8` encoding, but characters in `iso8859` encoding.

> I am not sure what is the issue here. It seems that the .4hf files are
> in correct places, but tex4ht can't find them.

That's a bug in miktex.

somehow the ! in e.g.

i~/tex4ht.dir/texmf/tex4ht/ht-fonts/unicode/!

is not correctly interpreted and doesn't work if the subfolder is
exactly one level down, so files in

texmf/tex4ht/ht-fonts/unicode/charset are not found, while
texmf/tex4ht/ht-fonts/unicode/charset/uni works.



-- 
Mit freundlichen Grüßen
Ulrike Fischer
mailto:ne...@nililand.de




[tex4ht] two versions of unicode.4ht

2016-08-03 Thread Ulrike Fischer
I found two versions of unicode.4ht in 

\ht-fonts\iso8859\1 

one in

  D:\texlive\2016\texmf-dist\tex4ht\ht-fonts\iso8859\1\charset\

the other in

  D:\texlive\2016\texmf-dist\tex4ht\ht-fonts\iso8859\1\charset\uni\

Their content is not identical, the one in charset has two extra
lines:

'' ''  'fi'   ''
'' ''  'fl'   ''

I'm not quite sure if both are really from the texlive installation
-- perhaps one of them remained from a test I did to compare the
location with the one from miktex, but I mention it anyway just in
case. Also I would like to know which one is the correct one. 



-- 
Ulrike Fischer 
http://www.troubleshooting-tex.de/



Re: [tex4ht] Bug identified: tex4ht to .odt (also identifying bugs in MiKTeX's setup)

2016-06-06 Thread Ulrike Fischer
Am Sat, 4 Jun 2016 11:21:28 +0800 schrieb 吳聰敏:


> Before describing where is this error from, I first discuss some bugs in 
> current MiKTeX's setup of tex4ht. The first set of bugs is about subdirectory 
> specfication.
> 
> Open tex4ht.env (in MiKTeX's subdirectory) with an editor, 
> 
> Replace "%%~/texmf-dist/tex4ht/bin/tex4ht.jar" with 
> "c:\PROGRA~2\MIKTEX~1.9\tex4ht\bin\tex4ht.jar"

I (re)reported the problem with the pathes in miktex
https://sourceforge.net/p/miktex/bugs/2322/ 

But it is really difficult to see how this should be handled at
best. The path depends obviously on installation and the "%%~" for
$SELFAUTOPARENT seems not to work in miktex.


> There is another bug in current MiKTeX system (2016.6),
> the first command line above needs a space after "xhtml,":
> 
> 1. htlatex test "xhtml, ooffice" "ooffice/! -cmozhtf" "-coo -cvalidate"

I reported it too https://sourceforge.net/p/miktex/bugs/2505/

> 
> If you don't leave a space, MiKTeX's latex get confused, and can't run.
> 
> Now back to the bug in tex4ht system.
> 
> After running the first command line, you will get test.odt.
> Open the file with LibreOffice, you will see an error message telling you 
> that something is wrong in styles.xml (line 94, column 128).
> 
> test.odt is a zip file. I unzip test.odt, and open styles.xml,
> my editor give the following message:
> 
> "Some characters were lost during the conversion"
> 
> I go to line 94, and check the end of line:
> 
> text:bullet-char="? >

With a current texlive 2016 and also with miktex (after correcting
the env) I get no error and line 94 ends looks this:

   



-- 
Ulrike Fischer 
http://www.troubleshooting-tex.de/



Re: [tex4ht] validity of tex4ht HTML-code output

2011-07-28 Thread Ulrike Fischer
Am Thu, 28 Jul 2011 00:19:57 -0700 schrieb Johannes Wilm:


 What I wonder though is what the state of the HTML that is being output
 really is. It seems to me specifically that:
 
 a. almost none of the p-tags are closed

Use the xhtml-Option I mentioned earlier. 

 b. an element that is used a lot are tspans which the W3C validation
 claims to not have heard about.

Make small, complete example that shows this how you got this
element.

-- 
Ulrike Fischer 



Re: [tex4ht] validity of tex4ht HTML-code output

2011-07-28 Thread Ulrike Fischer
Am Thu, 28 Jul 2011 01:24:04 -0700 schrieb Johannes Wilm:


 What I wonder though is what the state of the HTML that is being output
 really is. It seems to me specifically that:

 a. almost none of the p-tags are closed

 Use the xhtml-Option I mentioned earlier.

 Ah, yes that's probably what I should done to start out with. Now when I
 switch html for xhtml, it somehow breaks my SVG-fixing script. I didn't know
 that the html-option would produce partially invalid HTML, as it seems.

It doesn't produce invalid html, it produce html 4.01:

!DOCTYPE html PUBLIC -//W3C//DTD HTML 4.01 Transitional//EN

Which is different to xhtml which would get with the xhtml option

!DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Transitional//EN


 b. an element that is used a lot are tspans which the W3C validation
 claims to not have heard about.

http://www.w3.org/TR/SVG/text.html#TSpanElement

 I guess everything is currently changing, like

 bibtex - biblatex

bibtex is an application and biblatex a package.

The transition is more

bibtex + natbib or bibtex + jurabib or bibtex + some bib-style -
bibtex + biblatex or biber + biblatex.

 pdftex - luatex
 8 bit - utf-8
 PDF - EPUB

these are formats for very different purposes. pdf is a page
description format, while in ebook/web-formats text can be easily
refloated.

 PNG - SVG

PNG is a bitmap format, SVG a vector format. How would convert a
foto to a vector format?

 Kile - LyX

I will certainly never use LyX, and I don't any TeX/LaTeX/context
expert who considers such a step. 


-- 
Ulrike Fischer 



Re: [tex4ht] unicode and lualatex

2011-07-23 Thread Ulrike Fischer
WARNING: This e-mail has been altered by the NFIT virus/spamfilter.  Please see 
below for a record of the changes made.
. In case of problems consider contacting the sender or postmas...@nfit.au.dk

---Change report:

An attachment named xhluatex.bat was removed from this document as it
constituted a security hazard.  If you require this document, please contact
the sender and arrange an alternate means of receiving it.

Am Fri, 22 Jul 2011 21:47:32 -0700 schrieb Johannes Wilm:

 Hi,
 
 On the attached test file I tried to run
 *
 *
 *dvilualatex unicode.tex*
 *dvilualatex unicode.tex*
 *dvilualatex unicode.tex*
 *tex4ht -f/unicode.tex -cunihtf -utf8*
 
 I cannot figure out as what the characters are encoded in the output, but it
 doesn't seem to be utf8. Output has been attached.

Your main problem has nothing to do with tex4ht. While luatex can
handle utf8 *input* natively it has problems to output
non-ascii-chars without fontspec and unicode fonts on the output
side. 

Your document is using OT1-encoded fonts (which has 128 characters)
and so your non-ascii-chars are ending in nothingness. With
\usepackage[T1]{fontenc} result will be better but quite a lot chars
will be wrong (e.g. the german ß) 

In normal latex the inputenc/fontenc-combo manages the
input-output-translation, but you can't use inputenc with luatex.

Your best bet is something like this:

% -*- mode: TeX -*- -*- coding: UTF-8 -*-
\documentclass[11pt,a4paper]{book}
\usepackage[utf8]{luainputenc}

\begin{document}
\chapter{UTF-8}

The following characters should be converted to Unicode:

Spanish: áéíóúÁÉÍÓÚ
German: äöüÄÖÜ
Danish: æøåÆØÅ

\end{document}

Which gave for me on miktex an utf8 encoded html with this command
line 

xhluatex.bat unicode html,charset=utf-8 -cunihtf -utf8

and the attached xhluatex.bat (I hope .bat come through) (I had to
change it and my tex4ht.env compared to the standard versions, see
the discussion some weeks ago in the archive in the mailing list.)

I'm not quite sure yet about the correct html-option but it
doesn't matter for utf8-tests..


-- 
Ulrike Fischer