* breaking URLs
@ 2011-07-15 20:21 Henri-Paul Indiogine
2011-07-18 8:57 ` Bastien
0 siblings, 1 reply; 5+ messages in thread
From: Henri-Paul Indiogine @ 2011-07-15 20:21 UTC (permalink / raw)
To: emacs-org
Greetings!
My goal is to export an orgmode file to LaTeX and then compile to PDF.
My orgmode file contains many URLs. What is the best way to have them
break? A simple URL in the orgmode file will not break. if I place
the URL in \url{my url} it is exported as
\url{[[my url]] [[my url]]} however the URL is nicely split to the
next line in the pdf.
if I use \href{my url} then the LaTeX file does not compile and gives
the following error message:
ERROR: pdfTeX error (ext1): \pdfendlink cannot be used in vertical mode.
--- TeX said ---
\close@pdflink ->\Hy@endcolorlink \pdfendlink
Any advise?
Thanks,
Henri-Paul
--
Henri-Paul Indiogine
Email: hindiogine@gmail.com
Skype: hindiogine
Website: http://people.cehd.tamu.edu/~sindiogine
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: breaking URLs
2011-07-15 20:21 breaking URLs Henri-Paul Indiogine
@ 2011-07-18 8:57 ` Bastien
2011-07-18 16:18 ` Henri-Paul Indiogine
0 siblings, 1 reply; 5+ messages in thread
From: Bastien @ 2011-07-18 8:57 UTC (permalink / raw)
To: Henri-Paul Indiogine; +Cc: emacs-org
Hi Henri-Paul,
Henri-Paul Indiogine <hindiogine@gmail.com> writes:
> My goal is to export an orgmode file to LaTeX and then compile to PDF.
>
> My orgmode file contains many URLs. What is the best way to have them
> break? A simple URL in the orgmode file will not break. if I place
> the URL in \url{my url} it is exported as
>
> \url{[[my url]] [[my url]]} however the URL is nicely split to the
> next line in the pdf.
I would welcome ideas/code to have more flexibility wrt the way urls
are handled by the LaTeX exporter.
> if I use \href{my url} then the LaTeX file does not compile and gives
> the following error message:
>
>
> ERROR: pdfTeX error (ext1): \pdfendlink cannot be used in vertical
> mode.
This looks like a LaTeX related problem, and I'm not export enough to
help here. I hope someone will be able to give you further advice.
Thanks,
--
Bastien
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: breaking URLs
2011-07-18 8:57 ` Bastien
@ 2011-07-18 16:18 ` Henri-Paul Indiogine
2011-07-26 11:24 ` Bastien
0 siblings, 1 reply; 5+ messages in thread
From: Henri-Paul Indiogine @ 2011-07-18 16:18 UTC (permalink / raw)
To: Bastien; +Cc: emacs-org
Hi Bastien!
2011/7/18 Bastien <bzg@altern.org>:
>> the URL in \url{my url} it is exported as
>>
>> \url{[[my url]] [[my url]]} however the URL is nicely split to the
>> next line in the pdf.
>
> I would welcome ideas/code to have more flexibility wrt the way urls
> are handled by the LaTeX exporter.
If there would be a way of having the URL in orgmode be exported to
LaTeX as \url{my url} without the square brackets and the repetition
that would be all that is necessary for me. I have no idea why the
LaTeX exporter add the brackets and duplicates the link.
>> ERROR: pdfTeX error (ext1): \pdfendlink cannot be used in vertical
>> mode.
>
> This looks like a LaTeX related problem, and I'm not export enough to
> help here. I hope someone will be able to give you further advice.
Yes, that is a LaTeX issue. I do not know the "hyperref" package well
enough to understand that problem.
Thanks,
Henri-Paul
--
Henri-Paul Indiogine
Curriculum & Instruction
Texas A&M University
TutorFind Learning Centre
Email: hindiogine@gmail.com
Skype: hindiogine
Website: http://people.cehd.tamu.edu/~sindiogine
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: breaking URLs
2011-07-18 16:18 ` Henri-Paul Indiogine
@ 2011-07-26 11:24 ` Bastien
2011-07-26 17:13 ` Bastien
0 siblings, 1 reply; 5+ messages in thread
From: Bastien @ 2011-07-26 11:24 UTC (permalink / raw)
To: Henri-Paul Indiogine; +Cc: emacs-org
Henri-Paul Indiogine <hindiogine@gmail.com> writes:
> Hi Bastien!
>
> 2011/7/18 Bastien <bzg@altern.org>:
>>> the URL in \url{my url} it is exported as
>>>
>>> \url{[[my url]] [[my url]]} however the URL is nicely split to the
>>> next line in the pdf.
>>
>> I would welcome ideas/code to have more flexibility wrt the way urls
>> are handled by the LaTeX exporter.
>
> If there would be a way of having the URL in orgmode be exported to
> LaTeX as \url{my url} without the square brackets and the repetition
> that would be all that is necessary for me. I have no idea why the
> LaTeX exporter add the brackets and duplicates the link.
You want to customize `org-export-latex-href-format'.
This variable used to make two "%s" mandatory, to insert both the link
and its path. You can now use only one "%s" if you want, since latest
git commit.
(setq org-export-latex-href-format "\url{%s}")
will do what you want.
Thanks for bringing this up!
--
Bastien
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: breaking URLs
2011-07-26 11:24 ` Bastien
@ 2011-07-26 17:13 ` Bastien
0 siblings, 0 replies; 5+ messages in thread
From: Bastien @ 2011-07-26 17:13 UTC (permalink / raw)
To: Henri-Paul Indiogine; +Cc: emacs-org
Bastien <bzg@altern.org> writes:
> (setq org-export-latex-href-format "\url{%s}")
Of course this should be:
(setq org-export-latex-href-format "\\url{%s}")
Best,
--
Bastien
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2011-07-26 17:13 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-07-15 20:21 breaking URLs Henri-Paul Indiogine
2011-07-18 8:57 ` Bastien
2011-07-18 16:18 ` Henri-Paul Indiogine
2011-07-26 11:24 ` Bastien
2011-07-26 17:13 ` Bastien
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).