1

I try to convert the below document with htlatex and no options and it spits this error on me:

! LaTeX Error: Something's wrong--perhaps a missing \item.

There's no error if I remove the square brackets and their contents behind the description environment. There's another error, if I only include one item:

! Missing number, treated as zero.
<to be read again> 
                   \c:\end:itm 
l.7   \end{description}

Minimal example:

\documentclass{article}
\usepackage{expdlist}
\begin{document}                                               
  \begin{description}[\breaklabel\setleftmargin{1ex}]
    \item[test1]text1
    \item[test2]text2
  \end{description}
\end{document}
1

2 Answers 2

4

This looks like a bug.

Here is an ugly workaround:

\usepackage{expdlist}
\begin{document}     
  \ifx\HCode\UnDef
  \begin{description}[\breaklabel\setleftmargin{1ex}]
  \else
  \begin{description}
  \fi
    \item[test1]text1
    \item[test2]text2
  \end{description}
\end{document}

Update: https://puszcza.gnu.org.ua/bugs/index.php?155

Update 2. The bug is closed. Until the patch travels to your system, just add the file expdlist.4ht to your work directory with the following contents:

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% expdlist.4ht                          2011-11-20-04:55 %
% Copyright (C) 2007--2009       Eitan M. Gurari         %
%               2009--2011       TeX Users Group         %
%                                                        %
% This work may be distributed and/or modified under the %
% conditions of the LaTeX Project Public License, either %
% version 1.3c of this license or (at your option) any   %
% later version. The latest version of this license is   %
% in                                                     %
%   http://www.latex-project.org/lppl.txt                %
% and version 1.3c or later is part of all distributions %
% of LaTeX version 2005/12/01 or later.                  %
%                                                        %
% This work has the LPPL maintenance status "maintained".%
%                                                        %
% This Current Maintainer of this work                   %
% is the TeX4ht Project <[email protected]>.                %
%                                                        %
% If you modify this program your changing its signature %
% with a directive of the following form will be         %
% appreciated.                                           %
%            \message{signature}                         %
%                                                        %
%                                        [email protected]  %
%                             http://www.tug.org/tex4ht  %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\immediate\write-1{version 2011-11-20-04:55}
%
% This work may be distributed and/or modified under the
% conditions of the LaTeX Project Public License, either
% version 1.3c of this license or (at your option) any
% later version. The latest version of this license is in
%   http://www.latex-project.org/lppl.txt
% and version 1.3c or later is part of all distributions
% of LaTeX version 2005/12/01 or later.
%
% This work has the LPPL maintenance status "maintained".
%
% The Current Maintainer of this work
% is the TeX4ht Project <http://tug.org/tex4ht>.
%
% If you modify this program, changing the
% version identification would be appreciated.
%
%
% We just ignore optional arguments to description during ht run... 
%
\let\description@orig=\description
\def\description{\@ifnextchar[% ]
{\description@ht}{\description@orig}}
\def\description@ht[#1]{\description@orig}
\Hinput{expdlist}
\endinput
6
  • 1
    Ok, let's say it's a bug, is it tex4ht or expdlist?
    – cjorssen
    Nov 19, 2011 at 20:48
  • I guess tex4ht. I recently joined the team of tex4ht, so I promise to look at the bug asap :)
    – Boris
    Nov 19, 2011 at 20:54
  • @cjorssen I've closed the bug - see the update
    – Boris
    Nov 20, 2011 at 5:22
  • Thank you very much for this fast answer! I've put the file in /usr/share/texmf/tex/generic/tex4ht/ and ran sudo dpkg-reconfigure tex4ht-common to make it found. (on Debian) Putting the file in the same dir as the latex file had no effect, maybe because I'm running htlatex from another dir to separate the output. Nov 20, 2011 at 7:11
  • 1
    @Boris Thanks! There's still something I don't understand. What's the rule for the need of modifications to original macros in <package>.4ht. For example, \documentclass{article} \usepackage{enumitem} \begin{document} \begin{enumerate} \item Test \end{enumerate} Some text \begin{enumerate}[resume] \item Test \end{enumerate} \end{document} will work although enumitem.4ht does not redefine \enumerate to check for optional argument.
    – cjorssen
    Nov 20, 2011 at 9:51
1

This works without any problems. The formating can be controlled with \Css{...} declarations.

\documentclass{article}
\usepackage{expdlist,lipsum}

\begin{document}                                               


\def\enditem{}
\def\enditemone{\Tg</dd>}

\ConfigureList{description}
    {\Tg<dl>}
    {\enditem\Tg</dl>}
    {\enditem\Tg<dt>}
    {\Tg</dt>\Tg<dd>\let\enditem\enditemone}

  \begin{description}[\breaklabel\setleftmargin{1ex}]
    \item[test1]\lipsum[1]
    \item[test2]\lipsum[2]
  \end{description}

\end{document}

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .