Nicolas Richard <theonewiththeevill...@yahoo.fr> writes: > Nicolas Goaziou <n.goaz...@gmail.com> 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