Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

\noindent and list environments: class="ltx_noindent" in wrong <para> in some cases #994

Closed
siegfriedzoetzsche opened this issue May 9, 2018 · 1 comment
Labels
bug
Milestone

Comments

@siegfriedzoetzsche
Copy link

@siegfriedzoetzsche siegfriedzoetzsche commented May 9, 2018

Sometimes, the \noindent information seems to get lost in \items such as

\item A\par\noindent a

This seems to depend on whether such an \item is followed by a blank line or not.
I have seen this behaviour with {trivlist}, {itemize} and {enumerate}.

Examples:
No blank lines after \item (two class="ltx_noindent" missing one in the wrong <para>) :

\documentclass{article}
\begin{document}
\begin{trivlist}
\item A\par\noindent a
\item B\par b
\item C\par\noindent c
\end{trivlist}
\end{document}

Converted to:

[...]
<para xml:id="p1">
  <itemize>
    <item>
      <tags>
        <tag/>
      </tags>
      <para xml:id="p1.p1">
        <p>A</p>
      </para>
      <para xml:id="p1.p2">
        <p>a</p>
      </para>
    </item>
    <item>
      <tags>
        <tag/>
      </tags>
      <para class="ltx_noindent" xml:id="p1.p3">
        <p>B</p>
      </para>
      <para xml:id="p1.p4">
        <p>b</p>
      </para>
    </item>
    <item>
      <tags>
        <tag/>
      </tags>
      <para xml:id="p1.p5">
        <p>C</p>
      </para>
      <para xml:id="p1.p6">
        <p>c</p>
      </para>
    </item>
  </itemize>
</para>
[...]

Blank lines between \items but not before \end{trivlist} (one class="ltx_noindent" missing one in the correct <para>) :

\documentclass{article}
\begin{document}
\begin{trivlist}
\item D\par\noindent d

\item E\par e

\item F\par\noindent f
\end{trivlist}
\end{document}

Converted to:

[...]
<para xml:id="p1">
  <itemize>
    <item>
      <tags>
        <tag/>
      </tags>
      <para xml:id="p1.p1">
        <p>D</p>
      </para>
      <para class="ltx_noindent" xml:id="p1.p2">
        <p>d</p>
      </para>
    </item>
    <item>
      <tags>
        <tag/>
      </tags>
      <para xml:id="p1.p3">
        <p>E</p>
      </para>
      <para xml:id="p1.p4">
        <p>e</p>
      </para>
    </item>
    <item>
      <tags>
        <tag/>
      </tags>
      <para xml:id="p1.p5">
        <p>F</p>
      </para>
      <para xml:id="p1.p6">
        <p>f</p>
      </para>
    </item>
  </itemize>
</para>
[...]

Blank lines after every \item (looks good):

\documentclass{article}
\begin{document}
\begin{trivlist}
\item G\par\noindent g

\item H\par h

\item I\par\noindent i

\end{trivlist}
\end{document}

Converted to:

[...]
<para xml:id="p1">
  <itemize>
    <item>
      <tags>
        <tag/>
      </tags>
      <para xml:id="p1.p1">
        <p>G</p>
      </para>
      <para class="ltx_noindent" xml:id="p1.p2">
        <p>g</p>
      </para>
    </item>
    <item>
      <tags>
        <tag/>
      </tags>
      <para xml:id="p1.p3">
        <p>H</p>
      </para>
      <para xml:id="p1.p4">
        <p>h</p>
      </para>
    </item>
    <item>
      <tags>
        <tag/>
      </tags>
      <para xml:id="p1.p5">
        <p>I</p>
      </para>
      <para class="ltx_noindent" xml:id="p1.p6">
        <p>i</p>
      </para>
    </item>
  </itemize>
</para>
[...]
@dginev dginev added the bug label May 9, 2018
@dginev dginev added this to the LaTeXML-0.8.4 milestone May 9, 2018
@brucemiller
Copy link
Owner

@brucemiller brucemiller commented May 10, 2018

Ah, indeed, there's a bunch of implied \par in there. I think I've got it right, now. Thanks for the report.

@dginev dginev modified the milestones: LaTeXML-0.8.4, LaTeXML-0.8.3 May 11, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants