emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] Wrapping of e-mail address in table when exporting to pdf throug


From: Johnny
Subject: Re: [O] Wrapping of e-mail address in table when exporting to pdf through latex
Date: Sun, 12 Feb 2012 11:34:57 +0000
User-agent: Gnus/5.110018 (No Gnus v0.18) Emacs/23.3 (gnu/linux)

Tim Burt <address@hidden> writes:

> Eric S Fraga <address@hidden> writes:
>
>> Johnny <address@hidden> 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 | address@hidden  |
>>>   |             |                |                              |
>>>
>>> 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 | address@hidden |
>>
>> 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     | address@hidden       |
>   | ~nolinkurl~ cmd  | e-mail is just text       | address@hidden |
>   | ~mailto:~ syntax | e-mail is an mailto: link | mailto:address@hidden      
> |
>
> *** 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!
-- 
Johnny



reply via email to

[Prev in Thread] Current Thread [Next in Thread]