John Hendy <jw.hendy <at> gmail.com> writes: > Just wondering about the rationale behind using *bold* markup for > \textbf{} in LaTeX export and to \alert{} in Beamer. Was this a > frequently voiced request? I'm sure I can dig into this somewhere and > change it, but if the majority prefers bold (not saying they do!), > should that be the default? > > I'd prefer bold, personally. I don't like red table column titles or in lists.
I had asked the same question a while back, and I received some quite amusing replies about \alert being "the Beamer way"... which I promptly ignored and implemented my own hack to customize the LaTeX command for beamer to use for *bold text* (pasted as a git patch below). I'm reading Marcin's recommendations carefully, since now, for the first time, I need to learn more about tweaking LaTeX's output. I'm not sure I agree with all of that line of thought, though. ~~ * Keeping that in mind, \alert{...} is /better/ than \textbf{...}, just like \emph{...} is better than \textit{...}: it is semantic, not visual markup. ~~ I can understand this rationale if the use case is to export from org to a LaTeX file, and then continue to work with the LaTeX file. In that case, you would want the exported LaTeX code to follow best practices and be "maintainable." I'd guess a more common use case for org export is to work exclusively with the org markup, and allow the exporter to use LaTeX as an intermediary, on the way to PDF. At least, this is how *I* use it; it doesn't really bother me if the LaTeX code produced by org uses semantic or visual markup. Where I need semantic markup (and I will, in my next article), I'll write the semantic markup in org. I guess I look at this in a way that FAUST [1] uses c++ as an intermediary. You write the signal-processing graph in FAUST's own purely-functional language, which the FAUST compiler translates into c++ (with a variety of headers and wrappers for VST, OSX audio units, SuperCollider plug-ins etc.). The resulting c++ is a mess, from the standpoint of reading and maintenance, but you're not supposed to maintain that code by hand. You're supposed to go back to the FAUST code to make changes. org --> LaTeX -- PDF FAUST --> c++ --> DSP plugin But, going a step further, if semantic markup is what you need, wouldn't it be better to define a \newcommand wrapper for \textbf, and then tell org to export *bold* using the wrapper? That would assume that you can customize the string org uses for *bold*, which you can't at present... so maybe my hack has some use after all. hjh [1] Functional AUdio STream language: http://faust.grame.fr/ >From 8ccbc7cad43b520067b8b29d4660fc99587995fd Mon Sep 17 00:00:00 2001 From: James Harkins <jamshar...@dewdrop-world.net> Date: Thu, 21 Feb 2013 09:51:02 +0800 Subject: [PATCH] hjh temp: add customize variable for bold/alert style --- lisp/ox-beamer.el | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/lisp/ox-beamer.el b/lisp/ox-beamer.el index dc427de..44c1c68 100644 --- a/lisp/ox-beamer.el +++ b/lisp/ox-beamer.el @@ -206,6 +206,12 @@ You might want to put e.g. \"allowframebreaks=0.9\" here." :group 'org-export-beamer :type '(string :tag "Outline frame options")) +(defcustom org-beamer-bold-macro "alert" + "LaTeX macro to insert for bold text (delimited by asterisks in the org source file). +The default \"alert\" renders as red text, normal weight. +Substitute \"textbf\" to obtain boldface." + :group 'org-export-beamer + :type '(string :tag "Bold macro")) ;;; Internal Variables @@ -334,7 +340,8 @@ Return overlay specification, as a string, or nil." "Transcode BLOCK object into Beamer code. CONTENTS is the text being bold. INFO is a plist used as a communication channel." - (format "\\alert%s{%s}" + (format "\\%s%s{%s}" + org-beamer-bold-macro (or (org-beamer--element-has-overlay-p bold) "") contents)) -- 1.7.9.5