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

2016-06-06 Thread Karl Berry
The path depends obviously on installation and the "%%~" for
$SELFAUTOPARENT seems not to work in miktex.

Well, maybe that is the crucial problem.  That %%~ that I had Eitan add
is the whole reason that tex4ht can be installable in TL.  Requiring a
hardwired installation path is not feasible ... thanks for all, k.


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] Bug identified: tex4ht to .odt (also identifying bugs in MiKTeX's setup)

2016-06-04 Thread Karl Berry
Thank you for the detailed report.  I hope we (Michal ...?) can
look into the tex4ht stuff.

As for the miktex bug:

the first command line above needs a space after "xhtml,":
1. htlatex test "xhtml, ooffice" "ooffice/! -cmozhtf" "-coo -cvalidate"
If you don't leave a space, MiKTeX's latex get confused, and can't run.

needs to be reported in whatever way miktex likes.  I don't think anyone
here has any particular knowledge of (or even uses) miktex.  I don't,
for sure.

Thanks again.  --karl



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

2016-06-04 Thread 吳聰敏
MWE (test.tex):

\documentclass{article}
\begin{document}
Hello World!

Some math: $\alpha$ and $\beta$
\end{document}

Commands:

1. htlatex test "xhtml,ooffice" "ooffice/! -cmozhtf" "-coo -cvalidate"
2. Use LibreOffice to open the test.odt.
   Save as .docx if you want to read it with Windows Word.

Running the first command will produce a test.odt, but if you open the file with
LibreOffice, you will see an error.

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"
Replace "%%~/texmf-dist/tex4ht/xtpipes/" with 
"c:\PROGRA~2\MIKTEX~1.9\tex4ht\xtpipes\

There are 12 instances for each to be replaced.
What we are doing here is to change directory format form TL to MiKTeX.
(If you use MiKTeX 64bit version, "c:\PROGRA~2\MIKTEX ..." should be 
"c:\PROGRA~1\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"

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

I guess it should be something like:  text:bullet-char="." >

Anyway, following line 90 of styles.xml, I change it to 

text:bullet-char="-" >

Save it back, and now there is no error when opening test.odt with LibreOffice.
I can also save the file as test.docx, and read it with Windows Word.

Hope this helps.

Tsong-Min Wu
National Taiwan University