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

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.




-- 
Tim Burt
www.rketburt.org
"It is healthful to every sane man to utter the art within him;" -- GK Chesterton

  reply	other threads:[~2012-01-26 12:03 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-01-24 18:22 Wrapping of e-mail address in table when exporting to pdf through latex Johnny
2012-01-26  8:50 ` Eric S Fraga
2012-01-26 12:02   ` Tim Burt [this message]
2012-02-12 11:34     ` Johnny

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=m3bopqhdse.fsf@fluorine.burtket \
    --to=tcburt@rochester.rr.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=yggdrasil@gmx.co.uk \
    /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).