From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tim Burt Subject: Re: Wrapping of e-mail address in table when exporting to pdf through latex Date: Thu, 26 Jan 2012 07:02:57 -0500 Message-ID: References: <87obttneo3.fsf@gmx.co.uk> <87zkdargoo.fsf@ucl.ac.uk> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from eggs.gnu.org ([140.186.70.92]:46199) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RqO2s-00054M-TO for emacs-orgmode@gnu.org; Thu, 26 Jan 2012 07:03:19 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RqO2f-0004JF-MT for emacs-orgmode@gnu.org; Thu, 26 Jan 2012 07:03:14 -0500 Received: from hrndva-omtalb.mail.rr.com ([71.74.56.123]:38461) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RqO2f-0004IZ-KH for emacs-orgmode@gnu.org; Thu, 26 Jan 2012 07:03:01 -0500 In-Reply-To: <87zkdargoo.fsf@ucl.ac.uk> (Eric S. Fraga's message of "Thu, 26 Jan 2012 08:50:15 +0000") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Johnny Cc: emacs-orgmode@gnu.org Eric S Fraga writes: > Johnny 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