emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* [BUG] cannot latex-export images linked to websites (error) [9.6.3 (N/A @ /gnu/store/5bhjhzyn6cnal35xad5x55f7b4hf2jcp-emacs-org-9.6.3/share/emacs/site-lisp/org-9.6.3/)]
@ 2023-04-16  7:45 Dr. Arne Babenhauserheide
  2023-04-16 12:23 ` Ihor Radchenko
  0 siblings, 1 reply; 3+ messages in thread
From: Dr. Arne Babenhauserheide @ 2023-04-16  7:45 UTC (permalink / raw)
  To: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 3201 bytes --]



Remember to cover the basics, that is, what you expected to happen and
what in fact did happen.  You don't know how to make a good report?  See

     https://orgmode.org/manual/Feedback.html#Feedback

Your bug report will be posted to the Org mailing list.
------------------------------------------------------------------------

When I try to export this org-mode snippet as PDF, I get errors:


#+caption: Schematic
[[https://www.draketo.de/wissen/essd-14-4811-2022-f02-web--cc-by.png][file:essd-14-4811-2022-f02-web--cc-by.png]]


Runaway argument?
{\begin {figure}[htbp] 
! Paragraph ended before \href@split was complete.
<to be read again> 
                   \par 
l.38 
     

LaTeX Warning: File `essd-14-4811-2022-f02-web--cc-by.png' not found on input l
ine 39.


! Package pdftex.def Error: File `essd-14-4811-2022-f02-web--cc-by.png' not fou
nd: using draft setting.

See the pdftex.def package documentation for explanation.
Type  H <return>  for immediate help.
 ...                                              
                                                  
l.39 ...dth]{essd-14-4811-2022-f02-web--cc-by.png}
                                                  

(/gnu/store/3rqj0gzglw46lw3prrd1pdzqzkw0d2nz-texlive-texmf-20210325/share/texmf
-dist/tex/latex/base/t1cmtt.fd)

! LaTeX Error: \caption outside float.

See the LaTeX manual or LaTeX Companion for explanation.
Type  H <return>  for immediate help.
 ...                                              
                                                  
l.40 \caption
             {Schematic}

Overfull \hbox (8.6822pt too wide) in paragraph at lines 39--41
[][] \T1/cmr/m/n/10.95 Schematic 
! Extra }, or forgotten \endgroup.
\@endfloatbox ...pagefalse \outer@nobreak \egroup 
                                                  \color@endbox 
l.41 \end{figure}
                 }
! Too many }'s.
\color@endbox ->\color@endgroup \egroup 
                                        
l.41 \end{figure}
                 }

! LaTeX Error: \begin{document} ended by \end{figure}.

See the LaTeX manual or LaTeX Companion for explanation.
Type  H <return>  for immediate help.
 ...                                              
                                                  
l.41 \end{figure}
                 }
! Extra \endgroup.
<recently read> \endgroup 
                          
l.41 \end{figure}
                 }
! Too many }'s.
l.41 \end{figure}}
                  

The cause seems to be that this is exported as a figure wrapped in a
\href — see the latex export part:


\href{https://www.draketo.de/wissen/essd-14-4811-2022-f02-web--cc-by.png}{\begin{figure}[htbp]

\includegraphics[width=.9\linewidth]{essd-14-4811-2022-f02-web--cc-by.png}
\caption{Schematic}
\end{figure}}



Best wishes,
Arne

Emacs  : GNU Emacs 29.0.60 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.30, cairo version 1.16.0)
Package: Org mode version 9.6.3 (N/A @ /gnu/store/5bhjhzyn6cnal35xad5x55f7b4hf2jcp-emacs-org-9.6.3/share/emacs/site-lisp/org-9.6.3/)

-- 
Unpolitisch sein
heißt politisch sein,
ohne es zu merken.
draketo.de

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 1125 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [BUG] cannot latex-export images linked to websites (error) [9.6.3 (N/A @ /gnu/store/5bhjhzyn6cnal35xad5x55f7b4hf2jcp-emacs-org-9.6.3/share/emacs/site-lisp/org-9.6.3/)]
  2023-04-16  7:45 [BUG] cannot latex-export images linked to websites (error) [9.6.3 (N/A @ /gnu/store/5bhjhzyn6cnal35xad5x55f7b4hf2jcp-emacs-org-9.6.3/share/emacs/site-lisp/org-9.6.3/)] Dr. Arne Babenhauserheide
@ 2023-04-16 12:23 ` Ihor Radchenko
  2024-01-15 12:53   ` Ihor Radchenko
  0 siblings, 1 reply; 3+ messages in thread
From: Ihor Radchenko @ 2023-04-16 12:23 UTC (permalink / raw)
  To: Dr. Arne Babenhauserheide; +Cc: emacs-orgmode

"Dr. Arne Babenhauserheide" <arne_bab@web.de> writes:

> When I try to export this org-mode snippet as PDF, I get errors:
>
>
> #+caption: Schematic
> [[https://www.draketo.de/wissen/essd-14-4811-2022-f02-web--cc-by.png][file:essd-14-4811-2022-f02-web--cc-by.png]]
> ...
> The cause seems to be that this is exported as a figure wrapped in a
> \href — see the latex export part:
>
>
> \href{https://www.draketo.de/wissen/essd-14-4811-2022-f02-web--cc-by.png}{\begin{figure}[htbp]
>
> \includegraphics[width=.9\linewidth]{essd-14-4811-2022-f02-web--cc-by.png}
> \caption{Schematic}
> \end{figure}}

Confirmed.
Thanks for reporting!

This specific scenario is not handled by ox-latex logic. You should
either remove caption or not use nested links here for now, until this
is fixed.

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [BUG] cannot latex-export images linked to websites (error) [9.6.3 (N/A @ /gnu/store/5bhjhzyn6cnal35xad5x55f7b4hf2jcp-emacs-org-9.6.3/share/emacs/site-lisp/org-9.6.3/)]
  2023-04-16 12:23 ` Ihor Radchenko
@ 2024-01-15 12:53   ` Ihor Radchenko
  0 siblings, 0 replies; 3+ messages in thread
From: Ihor Radchenko @ 2024-01-15 12:53 UTC (permalink / raw)
  To: Dr. Arne Babenhauserheide; +Cc: emacs-orgmode

Ihor Radchenko <yantar92@posteo.net> writes:

>> #+caption: Schematic
>> [[https://www.draketo.de/wissen/essd-14-4811-2022-f02-web--cc-by.png][file:essd-14-4811-2022-f02-web--cc-by.png]]
>> ...

Fixed, on main.
https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=38c6eb2b7

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2024-01-15 12:51 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-04-16  7:45 [BUG] cannot latex-export images linked to websites (error) [9.6.3 (N/A @ /gnu/store/5bhjhzyn6cnal35xad5x55f7b4hf2jcp-emacs-org-9.6.3/share/emacs/site-lisp/org-9.6.3/)] Dr. Arne Babenhauserheide
2023-04-16 12:23 ` Ihor Radchenko
2024-01-15 12:53   ` Ihor Radchenko

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).