On Fri, 16 May 2008 08:56:57 +0200 "Heidemeier Dr, Joachim" <[EMAIL PROTECTED]> wrote:
> Hi Martin, > unfortunately it doesn't work. Both on Windows (1.5.3) and on Linux (1.5.5) > the following layout failed. > ---- > Format 4 > CharStyle ChemFormula > LatexType Command > LatexName BPChem > PassThru 1 > LabelFont > Family Roman > Color Red > EndFont > > Preamble > \usepackage{BPChem} > EndPreamble > End > > --- > Error Message in both cases were: > Setting debug level to 1024 > Debugging `tclass' (Textclass files reading) > LyXSetStyle: parsing configuration... > Reading textclasses from `C:/Dokumente und > Einstellungen/heidemei/Anwendungsdaten/lyx15/textclass.lst' > Starting parsing of textclass.lst > line by line > .... > Reading input file [layouts/chem.inc] > LyX: Unknown ClassOption tag `PassThru' [around line 4 of file > [layouts/chem.inc]] > LyX: Unknown ClassOption tag `0' [around line 5 of file [layouts/chem.inc]] > Finished reading input file [layouts/chem.inc] > .... > End of parsing of textclass.lst > LyXSetStyle: configuration parsed. > lyx: Disabling LyX socket. > Is there a restricted attribute set for CharStyles in 1.5.x ? > BTW the 1.5 distribution does not contain a stdinsets.inc layout file. > TNX and greetings > -- > Dr. Joachim Heidemeier > c/o Umweltbundesamt FG II 2.2 > Tel.: +49340 2103-2780 > eMail: [EMAIL PROTECTED] Ah yes, this is a 1.6 feature. Sorry. - Martin > > -----Original Message----- > > From: Martin Vermeer [mailto:[EMAIL PROTECTED] > > Sent: Wednesday, May 14, 2008 4:31 PM > > To: Heidemeier Dr, Joachim > > Cc: lyx-devel@lists.lyx.org > > Subject: Re: prevent backslash Escaping backslashes in CharStyles > > > > On Wed, 14 May 2008 15:48:01 +0200 > > "Heidemeier Dr, Joachim" <[EMAIL PROTECTED]> wrote: > > > > > Triggered by a recent question in lyx-users I fiddled a > > little bit with the usage of the BPChem style from lyx. As > > BPChem is a single latex command I tried the definition of a > > Char Style: > > > > > > CharStyle ChemFormula > > > LatexType Command > > > LatexName BPChem > > > LabelFont > > > Family Roman > > > Color blue > > > EndFont > > > Preamble > > > \usepackage{BPChem} > > > EndPreamble > > > End > > > > > > I ran into the following problem: > > > > > > the argument to the \BPChem command might contain special > > characters (tex control words) like \_ or \^ for sub- or > > superscripts. When Lyx generates latex those backslashes will > > be escaped so that they became characters to be typesetted. > > Is there another possibility besides ERT to prevent those > > backslashes from beeing escaped during Latex generation? > > > > > > Thanks > > > > > > -- > > > Dr. Joachim Heidemeier > > > c/o Umweltbundesamt FG II 2.2 > > > Tel.: +49340 2103-2780 > > > eMail: [EMAIL PROTECTED] > > > > > > Have a look at stdinsets.inc in the layouts directory. I > > think what you need is the PassThru keyword. > > > > - Martin > >