Re: [tex4ht] [bug #278] Wrong mathml with $\langle$

2016-03-31 Thread Hans Georg Schaathun
On Thu, Mar 31, 2016 at 10:51:23AM -0700, William F Hammond wrote:
> I think the source is nonsense -- or, at best, ambiguous -- if translation
> to HTML with MathML is envisioned.  For example, is this an abuse of math
> because the user does not know about \textless or how to obtain U+2329?  If
> it's indeed intended as math, is this an attempt to use \langle (U+27E8) as
> an ordinary math symbol other than a group opener?  Or is it intended to be
> the empty group properly marked up with
> "\left\langle{}\right." ?

I am not sure if I should take the question personally, or generally.
But since my question probably triggered the issue, I'll put in two
pennies on each account :-)

My use of the \rangle/\langle is to bracket e-mail addresses, i.e.
$\langle$foo@bar.invalid$\rangle$.  I totally agree that this is crap
as semantic markup, but it typesets rather nicely.  

The use is a habit which predates the ubiquity of unicode, and I have
never bothered to identify the corresponding unicode character or checked 
if that would work directly in TeX.

I think it is safe to assume that someone who wants \textless without
knowing the macro, would use $<$ rather than $\langle$.

> It's not clear what a sensible translation should be.

I also do not know what a sensible translation should be, but two points
should be noted.  Firstly, TeX was never designed for semantic markup,
and enforcing new semantics on macroes is not a good idea if it can
be avoided.  Secondly, mathematical symbolism is neither static nor
universal, except for a very small core.  \rangle and \langle may not
be the most probably candidates to be redefined for an ad hoc purpose,
but given the number of mathematicians and many narrow branches of the
field, /someone/ is surely going to do just that at some point.

I do not know much MathML myself, but I would not be surprised if a
sensible and consistent translation is impossible.  I would not
mind giving up my own peculiar use of the macros when I need to make
an OpenOffice conversion.  However, there will be valid uses.

-- 
:-- Hans Georg


Re: [tex4ht] [bug #278] Wrong mathml with $\langle$

2016-03-31 Thread Michal Hoftich
> 
> On Thu, Mar 31, 2016 at 4:34 AM, Michal Hoftich  wrote:
> 
> This sample document:
> 
> -
> \documentclass{article}
> 
> \begin{document}
> 
> hello $\langle$
> \end{document}
> --
> 
> generates wrong mathml:
> 
> 
> I think the source is nonsense -- or, at best, ambiguous -- if translation to
> HTML with MathML is envisioned.  For example, is this an abuse of math because
> the user does not know about extless or how to obtain U+2329?  If it's 
> indeed
> intended as math, is this an attempt to use \langle (U+27E8) as an ordinary
> math symbol other than a group opener?  Or is it intended to be the empty 
> group
> properly marked up with
> "\left\langle{}\right." ?
> 

It is based on earlier message from today, where OP used it for encoding
brackets around email address. It could be seen (and I agree that it is)
as abusing of math mode, but this construct seems as quite common when I
googled it. As I am not a math expert, I am not sure whether is it
legitimate to use this in math or not. If it isn't and it is really just
dirty hack to get angles in text, then we maybe just should educate
users that it is wrong. But in this case we may get occasional bug
reports about invalid tex4ht output from users following advice on the
internet :)

Best regards,
Michal



[tex4ht] [bug #277] make timestamps in HTML output optional

2016-03-31 Thread Karl Berry
Update of bug #277 (project tex4ht):

 Open/Closed:Open => Closed 

___

Follow-up Comment #5:

thanks.  i found several more uses of :today, and either configured them
similarly (off by default, timestamp option to enable) or just deleted them
(css files, a couple others where the code wasn't following the same pattern.
installed in tex4ht (r164) and tl (r40194).

the massive code duplication throughout the sources continues to be a big
headache.  sigh.


___

Reply to this item at:

  

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



Re: [tex4ht] [bug #276] avoid multiple runs of latex

2016-03-31 Thread Boris Veytsman
HGS> Date: Thu, 31 Mar 2016 10:17:46 +0200
HGS> From: Hans Georg Schaathun 


HGS> I have actually seen people doing exactly that as part of a Makefile
HGS> setup (using Bourne shell).  Personally, I never copied that setup.
HGS> It is a bit odd that I did not, since I do not doubt that it worked, 
HGS> and I usually do not mind a little bit of chewing gum and tape in my 
HGS> config :-)

HGS> I cannot remember where I saw it.  It has been at least a decade.

Here is a fragment of my typical Makefile (I beleive it is more than a
decade old :)

%.pdf:  %.tex 
pdflatex $<
- bibtex $*
pdflatex $<
while ( grep -q '^LaTeX Warning: Label(s) may have changed' $*.log) \
do pdflatex $<; done

-- 
Good luck

-Boris

Now I know someone out there is going to claim, "Well then, UNIX is intuitive,
because you only need to learn 5000 commands, and then everything else follows
from that! Har har har!"
(Andy Bates in comp.os.linux.misc, on "intuitive interfaces", slightly
defending Macs.)


[tex4ht] [bug #275] titlesec package slows down tex4ht

2016-03-31 Thread Michal Hoftich
Follow-up Comment #3, bug #275 (project tex4ht):

I've spent yesterday by hunting the slowdown, I've rewrote lot of titlesec in
custom .4ht file, but still haven't found the cause. There was lot of cases
where token registers or \edef commands which were feeded with some new
content in each section, but it is still slowing down. So it might be really
easier to just contact Javier :) 

___

Reply to this item at:

  

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



[tex4ht] [bug #278] Wrong mathml with $\langle$

2016-03-31 Thread Michal Hoftich
URL:
  

 Summary: Wrong mathml with $\langle$
 Project: tex4ht
Submitted by: michal_h21
Submitted on: Thu 31 Mar 2016 02:34:24 PM EEST
Category: None
Priority: 5 - Normal
Severity: 5 - Normal
  Status: None
 Privacy: Public
 Assigned to: None
Originator Email: 
 Open/Closed: Open
 Discussion Lock: Any

___

Details:

This sample document:

-
\documentclass{article}

\begin{document}

hello $\langle$
\end{document}
--

generates wrong mathml:

--
http://www.w3.org/1998/Math/MathML;  
display="inline" >
--

note the second `` tag, there should be closing tag instead. tex4ht
expects that there is some more math content following and it is then closed
using `\rangle`, which correctly insert closing ``. 




___

Reply to this item at:

  

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



Re: [tex4ht] Crossreferences/Labels in OpenOffice conversion

2016-03-31 Thread Michal Hoftich
Hi Georg

On Thu, Mar 31, 2016 at 10:37 AM, Hans Georg Schaathun
 wrote:
> Hi,
>
> I have some experience using tex4ht to produce web pages.
> Trying an OpenOffice conversion for the first time, I find
> that labels/crossreferences do not work.


> In fact, there are two errors.  Citations (using bibtex)
> show empty brackets in the text.  They are correct in the
> bibliography.  Secondly, captions start with just the colon
> without the preceding Figure/Table and number.
> Furthermore the abstract text is missing.

The `nik.cls` doesn't seem to be included in TL. I've found some
version on Google though, so I can compile your document. It seems
that it redefines some default commands and environments, abstract
among them, so it will probably need some custom configuration.

But it seems that real problem is use of
`$\langle$ge...@schaathun.net$\rangle$}` in the \author command, this
causes postprocessing with xtpipes to fail:

System call: java -classpath
/usr/local/texlive/2014/texmf-dist/tex4ht/bin/tex4ht.jar xtpipes -i
/usr/local/texlive/2014/texmf-dist/tex4ht/x
tpipes/ -o minimal-m2.4om minimal-m2.tmp
org.xml.sax.SAXParseException; lineNumber: 10; columnNumber: 34; The
element type "math:mrow" must be terminated by the matching end-tag
"".

The xml needs postprocessing with xtpipes in order to fix all
references. When I removed the angles around mail addresses, it
worked. even the abstract. The author block seems weird though.

>
> I compile with
>
> latex article
> bibtex article
> latex article
> latex article
> latex article
> htlatex article.tex "xhtml,ooffice,bib-,mathml-" " -cmozhtf" "-coo"

I think

latex  article
bibtex article
mk4ht oolatex article

would be more than enough :)

>
> This gives me an OpenOffice document which I can open in libreoffice,
> and it is acceptable except for the missing labels and abstract.
>
> If I remove the ooffice option for htlatex, I get a correct
> HTML page with all the labels as they should be, even with
> the hyperlinks as they should.
>
> Is there a simple fix for this?  Any pointers at all?
>
> If a minimal(ish) example is useful, there is one here:
>   http://kerckhoffs.schaathun.net/test/minimal.tex
>   http://kerckhoffs.schaathun.net/test/minimal.odt
>   http://kerckhoffs.schaathun.net/test/minimal.html

It seems that we need also bibtex files :)

Best regards,
Michal


[tex4ht] Crossreferences/Labels in OpenOffice conversion

2016-03-31 Thread Hans Georg Schaathun
Hi,

I have some experience using tex4ht to produce web pages.
Trying an OpenOffice conversion for the first time, I find
that labels/crossreferences do not work.

In fact, there are two errors.  Citations (using bibtex)
show empty brackets in the text.  They are correct in the
bibliography.  Secondly, captions start with just the colon
without the preceding Figure/Table and number.
Furthermore the abstract text is missing.

I compile with

latex article
bibtex article
latex article
latex article
latex article
htlatex article.tex "xhtml,ooffice,bib-,mathml-" " -cmozhtf" "-coo"

This gives me an OpenOffice document which I can open in libreoffice, 
and it is acceptable except for the missing labels and abstract.  

If I remove the ooffice option for htlatex, I get a correct
HTML page with all the labels as they should be, even with
the hyperlinks as they should.

Is there a simple fix for this?  Any pointers at all?

If a minimal(ish) example is useful, there is one here:
  http://kerckhoffs.schaathun.net/test/minimal.tex
  http://kerckhoffs.schaathun.net/test/minimal.odt
  http://kerckhoffs.schaathun.net/test/minimal.html

TIA,
-- 
:-- Hans Georg