emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Johnny <yggdrasil@gmx.co.uk>
To: Tim Burt <tcburt@rochester.rr.com>
Cc: emacs-orgmode@gnu.org
Subject: Re: Wrapping of e-mail address in table when exporting to pdf through latex
Date: Sun, 12 Feb 2012 11:34:57 +0000	[thread overview]
Message-ID: <87k43suvxa.fsf@gmx.co.uk> (raw)
In-Reply-To: <m3bopqhdse.fsf@fluorine.burtket> (Tim Burt's message of "Thu, 26 Jan 2012 07:02:57 -0500")

Tim Burt <tcburt@rochester.rr.com> writes:

> Eric S Fraga <e.fraga@ucl.ac.uk> writes:
>> Johnny <yggdrasil@gmx.co.uk> writes:
>>> Hi,
>>> I have some e-mail addresses in a table that I want to export to pdf
>>> thorugh latex. However, the e-mail addresses do not wrap nicely (not at
>>> all) in the table, is there any way to make the latex export from org
>>> enable wrapping?
>>> Example:
>>>    #+ATTR_LaTeX: align=llp{2cm}
>>>   | ITEM        | Comment        | e-mail                       |
>>>   |-------------+----------------+------------------------------|
>>>   | Listed item | Some text here | this.email@shouldbe.wrapped  |
>>>   |             |                |                              |
>>> Thanks!
>> As you are alluding, this is more a latex problem than an org
>> one.  Getting an email address to wrap is difficult.  The only solution
>> I can think of is to suggest a hyphenation point in each email address
>> you have in the table.
>> You can suggest hyphenation points using "\-", as in:
>>   | Listed item | Some text here | this.email@\-shouldbe.wrapped |
>> This works, but is not pretty...  but I don't think you have much in the
>> way of alternative options!
>> HTH,
>> eric
> The hyperref package provides a LaTeX solution, the briefest of which is 
> the \url{} command (and the \nolinkurl{} variant).
>    #+ATTR_LaTeX: align=llp{2cm}
>   | ITEM             | Comment                   | e-mail                                  |
>   |------------------+---------------------------+-----------------------------------------|
>   | ~url~ cmd        | e-mail is a dead link     | \url{this.email@shouldbe.wrapped}       |
>   | ~nolinkurl~ cmd  | e-mail is just text       | \nolinkurl{this.email@shouldbe.wrapped} |
>   | ~mailto:~ syntax | e-mail is an mailto: link | mailto:this.email@shouldbe.wrapped      |
> *** Notes for the mailto syntax
> For the ~mailto:~ syntax to work the variable
> ~org-export-latex-href-format~ needs to use the ~url~ command instead of
> ~href~ (http://article.gmane.org/gmane.emacs.orgmode/44911/match=href+latex+link+url)
> : (setq org-export-latex-href-format "\url{%s}") 
> While I prefer the ~mailto:~ syntax as more the `orgmode way', there are
> two possible issues:
>  - config :: It requires a change to *all* LaTeX link exports
>  - display :: The ~mailto:~ string is also exported
> I do not know what other solutions are currently possible to resolve those
> issues.

I have now had the time to set this up to enable the "mailto:" syntax. I
agree that the export of the "mailto:" string as well would be nice to
suppress, but this is a minor quirk. Both \url and \nolinkurl are good
options as well to avoid that.

I also learned that the backslash in the setq must be escaped to avoid
raising an error, i.e. i put in my init.el:

: (setq org-export-latex-href-format "\\url{%s}") 

Many thanks!

      reply	other threads:[~2012-02-12 11:44 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-01-24 18:22 Johnny
2012-01-26  8:50 ` Eric S Fraga
2012-01-26 12:02   ` Tim Burt
2012-02-12 11:34     ` Johnny [this message]

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:

  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=87k43suvxa.fsf@gmx.co.uk \
    --to=yggdrasil@gmx.co.uk \
    --cc=emacs-orgmode@gnu.org \
    --cc=tcburt@rochester.rr.com \
    --subject='Re: Wrapping of e-mail address in table when exporting to pdf through latex' \


* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

Code repositories for project(s) associated with this inbox:


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