[tex4ht] [bug #146] index: div theindex is starting too late

2011-09-06 Thread Akim Demaille

Follow-up Comment #4, bug #146 (project tex4ht):

Dear CV,

Thanks for the answer.  Your latest proposal is much better, but there are
still flaws.

First of all, when the ist is using subsection*, the structure of the
generated HTML file is broken and hard to read because of all the noindent
stuff:


  h3 class=likesectionHeada id=x1-1000/aIndex/h3
  div class=index
!--l. 2--p class=noindent /p
h4 class=likesubsectionHeada id=x1-2000/aA/h4
p class=idxAA, a href=index-headings.html#x1-2 1/a/p
p class=idxAB, a href=index-headings.html#x1-3 2/a/p
p class=idxsp/p
h4 class=likesubsectionHeada id=x1-3000/aB/h4
p class=idx
  !--l. 8--
  p class=noindentBA, a href=index-headings.html#x1-4 3/a/p
  p class=idxBB, a href=index-headings.html#x1-5 4/a/p
  p class=idxsp/p
/p
!--l. 12--p class=noindent /p
h4 class=likesubsectionHeada id=x1-4000/aC/h4
p class=idx
  !--l. 13--
  p class=noindentCA, a href=index-headings.html#x1-6 5/a/p
  p class=idxCB, a href=index-headings.html#x1-7 6/a/p
/div
  /p

So really I think using subsection* is smart and consistent with the expected
output, but wrong for tex4ht, so I prefer an ist file as follows:

headings_flag 1
heading_prefix \textbf{\Large{}
heading_suffix }

which generates a more readable output (I can easily use a fresh macro
instead of textbfLarge to provide more configurability, like subsection* but
without all the messing around noindent; that's really not the point here):

h3 class=likesectionHeada id=x1-1000/aIndex/h3
div class=index
  !--l. 2--p class=noindent 
  span class=cmbx-12x-x-120A/span
  p class=idxAA, a href=index-headings.html#x1-2 1/a /p
  p class=idxAB, a href=index-headings.html#x1-3 2/a /p
  p class=idxsp/p
  span class=cmbx-12x-x-120B/span
  p class=idxBA, a href=index-headings.html#x1-4 3/a /p
  p class=idxBB, a href=index-headings.html#x1-5 4/a /p
  p class=idxsp/p
  span class=cmbx-12x-x-120C/span
  p class=idxCA, a href=index-headings.html#x1-6 5/a /p
  p class=idxCB, a href=index-headings.html#x1-7 6/a /p
  /div
/p

Yet, as you can see, the structure is still broken: div
class=indexp.../div/p.

Thanks again.

Attached another version of the tarball (index-headings-2011-09-06.tar.bz2),
with the current status of the files.


(file #110)
___

Additional Item Attachment:

File name: index-headings-2011-09-06.tar.bz2 Size:0 KB


___

Reply to this item at:

  http://puszcza.gnu.org.ua/bugs/?146

___
  Message posté via/par Puszcza
  http://puszcza.gnu.org.ua/



Re: [tex4ht] unbalanced parentheses

2011-09-06 Thread William F Hammond
I wrote:

 It's not the business of the typesetter to detect math errors, so it
 really shouldn't complain.  Unbalanced parentheses are not always an
 error, for sure.  Just a simple interval open at one end and closed at
 the other ... (1,2]

 Unbalanced containers are a serious obstacle for translating LaTeX or
 LaTeX-like math to presentation MathML.  So sane processing under a
 LaTeX profile for this purpose would enforce the use of things like,
 for your example, \left(1,2\right]

I should say a bit more about my viewpoint.  A mathematical expression
has a semantic tree structure that ideally should be reflected in markup
used to represent it.

A more complicated case is presented by an expression that is carried
to a new line in a display, say with the following under amsart:

\[ \begin{aligned}
  a =  (b \\
   +c)
\end{aligned}   \]

In this case there is incompatibility between the structure of the
mathematical expression tree and the markup tree.  (It could, however,
some day I suppose, be lamely modeled for markup using something like
the transparent content model of html5.)

Tex4ht will be happy with \left( .. \right. on row 1 and
\left. .. \right) on row 2, but that stretches mathematical semantics.

Another work-around is to enter '(' and ')' in the source in a way
that will cause the translator toward xml to deal with them as
unrelated operators -- again contrary to mathematical semantics, but I
don't know how to do that with tex4ht.

-- Bill




Re: [tex4ht] unbalanced parentheses

2011-09-06 Thread Karl Berry
  http://www.albany.edu/~hammond/private/1108.5305.tex
  http://www.albany.edu/~hammond/private/1108.5305.xhtml

Thanks.  I will try to look.

for your example, \left(1,2\right]

Well, \left...\right can change what the output looks like, not
necessarily desirably.  But I take your point in general, certainly.

Thanks,
k