From mboxrd@z Thu Jan 1 00:00:00 1970 From: Rasmus Subject: Re: Bug: \uline produced inside \section in latex export [8.2.5h (8.2.5h-30-gdd810b-elpa @ /home/user/.emacs.d/elpa/org-20140303/)] Date: Sat, 22 Mar 2014 21:06:33 +0100 Message-ID: <87y502roae.fsf@gmx.us> References: <87ior7qzua.fsf@slumpy.org> <87fvmbktzz.fsf@bzg.ath.cx> <87k3bmoe3o.fsf@gmail.com> <87ppleiqo6.fsf@bzg.ath.cx> <874n2qo4zh.fsf@gmail.com> <87ob0ysbh8.fsf@slumpy.org> <87vbv6mmrt.fsf@gmail.com> <874n2qcgcx.fsf@yahoo.fr> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:56705) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WRS9y-00047P-Q3 for emacs-orgmode@gnu.org; Sat, 22 Mar 2014 16:04:56 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WRS9s-0000J4-3N for emacs-orgmode@gnu.org; Sat, 22 Mar 2014 16:04:50 -0400 Received: from plane.gmane.org ([80.91.229.3]:50548) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WRS9r-0000Is-Sl for emacs-orgmode@gnu.org; Sat, 22 Mar 2014 16:04:44 -0400 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1WRS9q-000613-H0 for emacs-orgmode@gnu.org; Sat, 22 Mar 2014 21:04:42 +0100 Received: from 109.201.154.179 ([109.201.154.179]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 22 Mar 2014 21:04:42 +0100 Received: from rasmus by 109.201.154.179 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 22 Mar 2014 21:04:42 +0100 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: emacs-orgmode@gnu.org Nicolas Richard writes: > Nicolas Goaziou writes: >> It is technically possible to use \underline (hard-coded) in sections >> and \uline (or whatever is defined in`org-latex-text-markup-alist') >> everywhere else. >> >> Is there any downside to this proposal? > > Disclaimer : While I do use LaTeX, I rarely use the exporter, and never > underline in sections. > > (The shed should be green, obviously.) > > I don't know why \uline doesn't work, but while \underline works, it > does so with many warnings. I think the reason is that hyperref tries to > add the text to the PDF TOC (usually a pane in the pdf viewer), and that > supports very little to no formatting. > > Rasmus' suggestion seemed good, i.e. > \texorpdfstring{\uline{SECTION}}{SECTION} > > I'd go even a little further : assuming it makes sense to underline > within a section header, does it also make sense to propagate that > formatting to the toc and/or header of the document ? If not, I suggest > exporting as: > \section[not-so-plain text]{\uline{not-so-plain} \textbf{text}} This we cannot know before hand and for all cases. I cannot think of any case where you would use any kind of styling—other than math—in section titles. Yet others might and I think this suggestion is too strong of an "assumption". Perhaps it could be provided as an option. > Also I don't know why there was underlining in the first place. If we're > asking to underline all section titles, then it might make sense to > redefine e.g. \section to do so (packages titlesec might help). Yeah, that would be a better approach if the underlines are not one-off. . . Rasmus -- C is for Cookie