From: "Fraga, Eric" <e.fraga@ucl.ac.uk>
To: Emacs Org mode mailing list <emacs-orgmode@gnu.org>
Subject: very strange LaTeX error
Date: Fri, 20 Dec 2019 11:56:00 +0000 [thread overview]
Message-ID: <87immbp5ww.fsf@ucl.ac.uk> (raw)
Hello all,
this may not belong in this mailing list as it's arguably a LaTeX issue
but I'm having a problem exporting a table to PDF via LaTeX. I hope
somebody can help me out.
I've reduced my problem file to a small (hopefully minimal) example and
verified this with emacs -Q, using emacs 27.x which comes with org 9.3:
#+begin_src org
,* some results
,#+name: atable
|------------------------------------+----------+----------------------+-----|
| x | z1 | z2 | g |
|------------------------------------+----------+----------------------+-----|
| [0.0005, 0.05, 0.5] | 90000.0 | 0.05 | 0.0 |
| [0.000787451, 0.0575948, 0.5] | 110000.0 | 0.05759476698672508 | 0.0 |
|------------------------------------+----------+----------------------+-----|
#+end_src
If I export this to LaTeX, I get something that looks reasonable (elided):
#+begin_src latex
\documentclass{scrartcl}
\begin{document}
% packages deleted, none of which is used anyway in the following
\tableofcontents
\section{some results}
\label{sec:org4f5891c}
\begin{table}[hbtp]
\label{atable}
\centering
\begin{tabular}{lrrr}
\hline
x & z1 & z2 & g\\
\hline
[0.0005, 0.05, 0.5] & 90000.0 & 0.05 & 0.0\\
[0.000787451, 0.0575948, 0.5] & 110000.0 & 0.05759476698672508 & 0.0\\
\hline
\end{tabular}
\end{table}
\end{document}
#+end_src
I get errors like this when compiling with pdflatex:
#+begin_example
! Illegal unit of measure (pt inserted).
<to be read again>
,
l.18 [0.000787451, 0.0575948, 0.5]
& 110000.0 & 0.05759476698672508 & 0.0\\
! Missing = inserted for \ifdim.
<to be read again>
#+end_example
What am I doing wrong? If LaTeX cannot handle [...] in a table (it has
no problem with similar text in a normal paragraph), the LaTeX exporter
should do something about this. But I do not see why LaTeX should have
a problem in any case. Any pointers welcome!
Note: LaTeX does not complain about the first line in the table, only
the second (and following ones in the original org file from which I
took this code snippet).
Thank you.
--
Eric S Fraga via Emacs 27.0.50, Org release_9.3-34-g2eee3c
next reply other threads:[~2019-12-20 11:56 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-12-20 11:56 Fraga, Eric [this message]
2019-12-20 12:33 ` very strange LaTeX error Joost Kremers
2019-12-20 14:29 ` Stefan Nobis
2019-12-20 15:53 ` Fraga, Eric
2019-12-20 16:28 ` Stefan Nobis
2019-12-20 16:36 ` Fraga, Eric
2019-12-20 14:48 ` Fraga, Eric
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.orgmode.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87immbp5ww.fsf@ucl.ac.uk \
--to=e.fraga@ucl.ac.uk \
--cc=emacs-orgmode@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).