emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Wrapping of e-mail address in table when exporting to pdf through latex
@ 2012-01-24 18:22 Johnny
  2012-01-26  8:50 ` Eric S Fraga
  0 siblings, 1 reply; 4+ messages in thread
From: Johnny @ 2012-01-24 18:22 UTC (permalink / raw)
  To: emacs-orgmode

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!

-- 
Johnny

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

* Re: Wrapping of e-mail address in table when exporting to pdf through latex
  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
  0 siblings, 1 reply; 4+ messages in thread
From: Eric S Fraga @ 2012-01-26  8:50 UTC (permalink / raw)
  To: Johnny; +Cc: emacs-orgmode

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
-- 
: Eric S Fraga (GnuPG: 0xC89193D8FFFCF67D) in Emacs 24.0.90.1
: using Org-mode version 7.8.03 (release_7.8.03.237.g674bb)

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

* Re: Wrapping of e-mail address in table when exporting to pdf through latex
  2012-01-26  8:50 ` Eric S Fraga
@ 2012-01-26 12:02   ` Tim Burt
  2012-02-12 11:34     ` Johnny
  0 siblings, 1 reply; 4+ messages in thread
From: Tim Burt @ 2012-01-26 12:02 UTC (permalink / raw)
  To: Johnny; +Cc: emacs-orgmode

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

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

* Re: Wrapping of e-mail address in table when exporting to pdf through latex
  2012-01-26 12:02   ` Tim Burt
@ 2012-02-12 11:34     ` Johnny
  0 siblings, 0 replies; 4+ messages in thread
From: Johnny @ 2012-02-12 11:34 UTC (permalink / raw)
  To: Tim Burt; +Cc: emacs-orgmode

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!
-- 
Johnny

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

end of thread, other threads:[~2012-02-12 11:44 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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
2012-02-12 11:34     ` Johnny

Code repositories for project(s) associated with this 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).