Insert preamble code when one of two styles are in use
ehud.behar at posteo.net
ehud.behar at posteo.net
Tue Aug 22 14:14:21 UTC 2023
<pre>Suppose I create two styles.
When Style 1 is in use, I want the LyX editor to add to the preamble the
following code:
usepackage{x}
latex code for style 1
When style 2 is in use, I want to add to the preamble the following
code:
usepackage{x}
latex code for style 2
What I do now to achieve this is
Style Style1
LatexType Environment
LatexName style1
Preamble
usepackage{x}
latex code for style 1
EndPreamble
End
and
Style Style2
LatexType Environment
LatexName style2
DependsOn Style1 # <<<
Preamble
latex code for style 2
EndPreamble
End
but this is somewhat inefficient.
I am looking for a way to add the common line-of-code (usepackage{x}) in
this case when whichever style is used.
So if I use only Style2 in my document, the <latex code for style
1> is not inserted.
Any idea?</pre>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lyx.org/pipermail/lyx-users/attachments/20230822/03e58e0e/attachment.html>
More information about the lyx-users
mailing list