From mboxrd@z Thu Jan 1 00:00:00 1970 From: James Harkins Subject: Re: Rationale for *text* -> \alert{text} for Beamer export? Date: Thu, 2 May 2013 02:48:41 +0000 (UTC) Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Return-path: Received: from eggs.gnu.org ([208.118.235.92]:55697) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UXjZr-0004Ka-TP for emacs-orgmode@gnu.org; Wed, 01 May 2013 22:49:01 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UXjZq-0008TI-9U for emacs-orgmode@gnu.org; Wed, 01 May 2013 22:48:59 -0400 Received: from plane.gmane.org ([80.91.229.3]:56026) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UXjZq-0008TE-3N for emacs-orgmode@gnu.org; Wed, 01 May 2013 22:48:58 -0400 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1UXjZo-0003uL-5S for emacs-orgmode@gnu.org; Thu, 02 May 2013 04:48:56 +0200 Received: from 113.109.206.29 ([113.109.206.29]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 02 May 2013 04:48:56 +0200 Received: from jamshark70 by 113.109.206.29 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 02 May 2013 04:48:56 +0200 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 John Hendy 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 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