From: Takeshi Teshima <takeshi.diadochos@gmail.com>
To: emacs-orgmode@gnu.org
Subject: Latex export error: There's no line here to end, with an image with a caption
Date: Fri, 6 Jan 2017 17:32:44 +0900 [thread overview]
Message-ID: <c9a70f03-3ace-4113-ee3e-7032486b8f2c@gmail.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 2047 bytes --]
Hi all,
A happy new year!
I have a problem with org-export-to-latex.
# What happens
## [1]
When I try to export an org-mode file **that contains a figure with a
caption** with `#+OPTIONS: \n:t`, (See minimal example files)
to a pdf via latex-export, the exported latex file doesn't compile and I
get the following error:
```
LaTeX Error: There's no line here to end.
```
in the `*Org PDF LaTeX Output*` buffer. Thus this is an error from the
command line.
## [2]
So I go to the line of the .tex file that's specified in the error, and
the line always says:
``` latex
\end{figure}\\
```
## [3]
If I remove the double backslashes by hand, and compile the generated
.tex file from the command line, it produces a pdf correctly.
# My environment
I've checked this with:
[1] Org-mode version 8.3.6 (8.3.6-7-g4d7d52-elpa @ ~~~)
[2] Org-mode version 8.2.10 (release_8.2.10 @ ~~~)
[3] Org-mode version 9.0.3 (9.0.3-elpa @ ~~~)
, but the same errors occur.
(I normally use version 8. I know this is an old version. However, v9
has another problem with #+TITLE: lines. See
https://github.com/syl20bnr/spacemacs/issues/3246 for more details)
# Reproducing the error
## Files
Attached, please find the files for a minimum example.
- test.org
- test-2017-01-06-17-05-09.jpeg
## Procedure to reproduce:
1. Place the files in the same directory
2. $ emacs -q test.org
3. M-x org-latex-export-to-pdf
(Or instead of 2., your own emacs config will do)
# What I already found
- The caption is necessary to reproduce the error.
- The problem occurs with a single image.
- If I remove the double backslashes by hand, and compile the generated
.tex file, it compiles correctly.
- The problem doesn't occur with `#+OPTIONS: \n:nil` (which is kind of
trivial)
# Reference
A relevant thread can be found here:
https://lists.gnu.org/archive/html/emacs-orgmode/2016-09/msg00002.html
but I couldn't find a solution there.
Anyone has any ideas? Any idea to bypass this problem may be a lifesaver
for me.
[-- Attachment #2: test-2017-01-06-17-05-09.jpeg --]
[-- Type: image/jpeg, Size: 8246 bytes --]
[-- Attachment #3: test.org --]
[-- Type: text/plain, Size: 69 bytes --]
#+OPTIONS: \n:t
#+CAPTION: test
[[./test-2017-01-06-17-05-09.jpeg]]
next reply other threads:[~2017-01-06 8:32 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-01-06 8:32 Takeshi Teshima [this message]
2017-01-18 22:38 ` Latex export error: There's no line here to end, with an image with a caption Nicolas Goaziou
2017-01-19 3:01 ` Takeshi Teshima
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=c9a70f03-3ace-4113-ee3e-7032486b8f2c@gmail.com \
--to=takeshi.diadochos@gmail.com \
--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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.