transpect / docx2tex

Converts Microsoft Word docx to LaTeX
BSD 2-Clause "Simplified" License
520 stars 48 forks source link

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

Open SamuelMarks opened 4 years ago

SamuelMarks commented 4 years ago

Snippet that was generated:

\textbf{REFERENCES}\begin{enumerate}[1]

\item[1] Schacknow PN, Samples JR. \textit{The glaucoma book a practical, evidence-based approach to patient care}. New York: Springer, 2010.

\end{enumerate}

(obviously I'm replacing this whole reference list with proper bibtex, but still thought to tell you this bug)

gimsieke commented 4 years ago

Thanks for reporting it. May we see the docx input? You can send it to letexml at le-tex dot de if it contains confidential information. I haven’t done a thorough analysis but I think that only a generated bibliography will be converted to a latex bibliography. In addition, we support Citavi. If you send us your input we can see whether it is possible to infer heuristically or by style name convention that a given section is a bibliography. What worries me a bit is that there’s just \textbf{REFERENCES} instead of a proper section heading in your output.

LupinoTech commented 4 years ago

The error is caused by some printable material ([1]) between \begin{enumerate} and the first \item . \begin{enumerate} doesn't use an optional argument in its plain definition. However, the enumerate package redefines the enumerate evironment in a way that it does. Please make sure the a \usepackage{enumerate} is written into the latex preamble if you want to utilize the optional argument of \begin{enumerate}.

mkraetke commented 4 years ago

As an aside, DOCX bibliographies are currently not supported by our docx2hub module. We support only Citavi bibliographies at this time.

mkraetke commented 4 years ago

The error is caused by some printable material ([1]) between \begin{enumerate} and the first \item . \begin{enumerate} doesn't use an optional argument in its plain definition. However, the enumerate package redefines the enumerate evironment in a way that it does. Please make sure the a \usepackage{enumerate} is written into the latex preamble if you want to utilize the optional argument of \begin{enumerate}.

docx2tex use the enumerate package for lists by default. I have to see the original docx file to analyze the issue.