From mboxrd@z Thu Jan 1 00:00:00 1970 From: Truong Nghiem Subject: Re: Orgmode markups inside LaTeX fragments Date: Thu, 8 Mar 2012 10:55:19 -0500 Message-ID: References: <87wr6vb6q3.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([208.118.235.92]:56610) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S5fgz-0000b3-3S for emacs-orgmode@gnu.org; Thu, 08 Mar 2012 10:55:54 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1S5fgY-0005Dh-JW for emacs-orgmode@gnu.org; Thu, 08 Mar 2012 10:55:48 -0500 In-Reply-To: <87wr6vb6q3.fsf@gnu.org> 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: Bastien , emacs-orgmode@gnu.org Hi Bastien, My use-case is that I need to write a document that needs to be output to various styles (all using LaTeX). Each style may use a different class and set of packages. And each defines a different set of commands, with different syntax, to format the contents (they are not standard as \section, etc.) Of course I don't want to re-write the same contents for each style, so I defined a common command interface such that I could write the contents as \contentBlockOne{\textbf{Bold text}} and implemented the interface for each specific style. That has been working very well until I need to also output the contents to HTML. I thought it would be great to migrate the contents to orgmode, then export to LaTeX or HTML. But I need to re-use the common interface, so I defined orgmode macros to be able to write: {{{contentBlockOne(*Bold text*)}}} or {{{contentBlockOneBegin}}} *Bold text* {{{contentBlockOneEnd}}} The macros will be expanded to LaTeX commands or HTML markups accordingly. The problem is that orgmode markups inside LaTeX or HTML fragments are not converted. And I cannot use \textbf because it will not be translated to HTML. However, I've just discovered that while markups like *bold*, /italic/... are not converted, other markups like lists are. For example: \mycommand{*Bold* - Item 1 - Item 2 } is exported as \mycommand{\textbf{Bold} \begin{itemize} \item Item 1 \item Item 2 \end{itemize} } So it seems a bit inconsistent. If there is any solution or workaround for my problem, please let me know. Thanks, -- Truong Nghiem On Thu, Mar 8, 2012 at 7:46 AM, Bastien wrote: > Hi Truong, > > Truong Nghiem writes: > >> Is there any way to turn on orgmode markups inside LaTeX fragments for >> export? =A0For example, when I write >> =A0 =A0 \mycommand{*Bold text*} >> in an org file and export it to LaTeX, I would like to have >> =A0 =A0 \mycommand{\textbf{Bold text}} >> Currently it is exported as-is (verbatim): >> =A0 =A0 \mycommand{*Bold text*} > > There is no way to achieve this right now, and I think it would be > confusing to support mixed syntax. =A0But I'm open to better use-cases. > > Thanks, > > -- > =A0Bastien