Insert preamble code when one of two styles are in use
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? -- lyx-users mailing list lyx-users@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-users
Re: Remove the maketitle command
> you could use the TitleLaTeXName layout tag and set it to a dummy command Nice. Can you point me to where the "command" TitleLatexName is defined? Thanks very much. -- lyx-users mailing list lyx-users@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-users
Remove the maketitle command
In a lyx document, after inserting either title, author or date insets, lyx automatically puts a maketitle command after begin{document}. I want to have in my document a \title{} and an `\author{}` but I don't want the `\maketitle`. Is there any way to tell LyX not put it at all? (The other way is to do `\renewcommand{\maketitle}{}` but it does not affect the default behavior of LyX) -- lyx-users mailing list lyx-users@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-users
Re: Add parameter to the index entry
Sorry, I don't understand your question. -- lyx-users mailing list lyx-users@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-users
Re: Add parameter to the index entry
Sorry, I don't understand your question. -- lyx-users mailing list lyx-users@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-users
Add parameter to the index entry
I want to insert a "people" index into my document so that an index entry has the [people] "parameter" appended to it. Like this: \index[people]{Dirac, Paul} and \index[people]{Maxwell, James Clerk} So I want to make some changes to the index entry that is defined in the stdinsets.inc file. I tried to insert the following lines in my local layout but it gives me '\index{peopleDirac, Paul}' instead of '\index[people]{Dirac, Paul}': InsetLayout Index LabelString Idx Decorationclassic Font SizeSmall EndFont LabelFont Color indexlabel SizeSmall EndFont LatexParam people #< New MultiPar false CustomParsfalse ForcePlaintrue ContentAsLabeltrue PassThruChars @|! End Any idea how to achieve it? -- lyx-users mailing list lyx-users@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-users
Re: LatexParam before Argument
I actually adopted the "add a second argument" approach, but I like the first solution. Thanks very much! -- lyx-users mailing list lyx-users@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-users
LatexParam before Argument
I want to create the following latex code in my Lyx document: begin{myenv}{} [arg 1] code end{myenv} So I inserted this into the Local Layout: Style myenv LatexType Environment LatexName myenv LatexParam "{}" Argument 1 LabelString "entry 1" AutoInsert 1 LeftDelim "[" RightDelim "]" EndArgument End But turns out that LyX sweeps the order of "Argument" and "LatexParam", because what this local layout gives is begin{myenv} [arg 1]{} code end{myenv} Any idea how to solve it? Or a different approach to get the code I want? A screenshot is here [1]. Links: -- [1] https://gcdnb.pbrd.co/images/x59ATebvzVOr.png -- lyx-users mailing list lyx-users@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-users
Re: Insert an empty line in beamer
Thanks for this piece of information! I've never tried beamer-article so I didn't know there is a meaning to content which is outside of a frame. -- lyx-users mailing list lyx-users@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-users
Re: Insert an empty line in beamer
I now realized that this problem is only when the document language is set to Hebrew. In the link you can see a screen shot of the problem. https://gcdnb.pbrd.co/images/hqN0FDHQNahA.png I am still looking for a solution with better legibility that an ERT code as here: https://gcdnb.pbrd.co/images/0lwkrvZmqst1.png -- lyx-users mailing list lyx-users@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-users
Re: Insert an empty line in beamer
Kind of. Inside a frame, it puts the cursor outside the last \end{frame} line and suggests me to insert a new frame with a new frame title etc. If not inside a frame (which is non sense in beamer) it does create an empty line. -- lyx-users mailing list lyx-users@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-users
Re: Insert an empty line in beamer
Kind of. Inside a frame, it puts the cursor outside the last \end{frame} line and suggests me to insert a new frame with a new frame title etc. If not inside a frame (which is non sense in beamer) it does create an empty line. -- lyx-users mailing list lyx-users@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-users
Re: Insert an empty line in beamer
Kind of. Inside a frame, it puts the cursor outside the last \end{frame} line and suggests me to insert a new frame with a new frame title etc. If not inside a frame (which is non sense in beamer) it does create an empty line. -- lyx-users mailing list lyx-users@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-users
Insert an empty line in beamer
I want to print the following in my beamer document: " First line Second line " The beamer lyx doc class allows the user to insert empty line in the Standard layout. But even if insert more than 2 empty lines between "First line" and "Second line" in lyx, still there is no any empty line (or more correctly a \par command between them) in the generated latex file. Any idea how to insert a (real) empty line in the editor? What I do now is I insert an empty line with an ERT box. -- lyx-users mailing list lyx-users@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-users
Re: Create a shortcut to insert the frames separator for beamer documents
Just created it. The message pane says "Unknown function. Warning: unknown command definition 'newframe' Are you sure it is this name for the function? -- lyx-users mailing list lyx-users@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-users
Create a shortcut to insert the frames separator for beamer documents
I want to create a shortcut to insert the short thin red line that separates frames when the document class is Beamer. I know how to create shortcuts, I just don't know the name of the "function" that actually inserts this red line. In the lyx file this red line is called "Separator plain". If you really think of it, I don't know the function name because I also don't know how to insert it from the menus, so you are welcome to tell me how to do that as well. -- lyx-users mailing list lyx-users@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-users
Syncing skim with LyX
I am using macOS and until now, after compiling the lyx file (to tex and then) to a pdf file, the output was opened by the default pdf viewer (macOS Preview, on my computer). I want to use the pdf viewer "Skim" to open the compiled pdf, with mainly the advantage that there are no page jumps after making changes to the document. What are the steps needed to change this in LyX in order to implement skim as the pdf viewer? The closest thing I came across until now is appendix C in the User manual, section File Handling, and section 3 in the customization manual, "The Preferences dialog". It was a first reading and I haven't grasped everything, but at the moment I am not sure if my answer is covered there at all. Therefore my question is if those are the places to look at all, and if someone can maybe redirect me to a short guide for that?-- lyx-users mailing list lyx-users@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-users
Re: margin figure's label counter
Sorry! Fixing a typo: Float Type marginfigure #<--, not "figure" GuiName MarginFigure AllowsWide0 AllowsSideways0 Placement none Extension lof NumberWithin figure Style plain ListName "List of Figures" IsPredefined 1 UsesFloatPkg 0 RefPrefix fig End --- Original Message --- On Saturday, July 16th, 2022 at 9:07 PM, Ehud Behar via lyx-users wrote: > Sure. I wrote a short version to de-clutter the question. > > Actually I am writing the lyx code in local layout, but in the future it will > be added by means of a module file. > > Here is the complete Style declation: > > Float > Type figure > GuiName MarginFigure > AllowsWide 0 > AllowsSideways 0 > Placement none > Extension lof > NumberWithin figure > Style plain > ListName "List of Figures" > IsPredefined 1 > UsesFloatPkg 0 > RefPrefix fig > End > > Thanks > > --- Original Message --- > On Saturday, July 16th, 2022 at 9:04 PM, Jean-Marc Lasgouttes > lasgouttes.lyx@free.fr wrote: > > > > > Le 16/07/2022 à 22:00, Ehud Behar via lyx-users a écrit : > > > > > No, it completely removes and overrides the existing figure from > > > stdfloats.inc. I want to have both figure and margin figure. > > > > I would need a complete example to proceed. The best is to create a > > document and add your layout code in Document>Settings|Local layout. > > > > JMarc > > -- > > lyx-users mailing list > > lyx-users@lists.lyx.org > > http://lists.lyx.org/mailman/listinfo/lyx-users > > -- > lyx-users mailing list > lyx-users@lists.lyx.org > http://lists.lyx.org/mailman/listinfo/lyx-users -- lyx-users mailing list lyx-users@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-users
Re: margin figure's label counter
Sure. I wrote a short version to de-clutter the question. Actually I am writing the lyx code in local layout, but in the future it will be added by means of a module file. Here is the complete Style declation: Float Type figure GuiName MarginFigure AllowsWide0 AllowsSideways0 Placement none Extension lof NumberWithin figure Style plain ListName "List of Figures" IsPredefined 1 UsesFloatPkg 0 RefPrefix fig End Thanks --- Original Message --- On Saturday, July 16th, 2022 at 9:04 PM, Jean-Marc Lasgouttes wrote: > Le 16/07/2022 à 22:00, Ehud Behar via lyx-users a écrit : > > > No, it completely removes and overrides the existing figure from > > stdfloats.inc. I want to have both figure and margin figure. > > > I would need a complete example to proceed. The best is to create a > document and add your layout code in Document>Settings|Local layout. > > > JMarc > -- > lyx-users mailing list > lyx-users@lists.lyx.org > http://lists.lyx.org/mailman/listinfo/lyx-users -- lyx-users mailing list lyx-users@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-users
Re: margin figure's label counter
No, it completely removes and overrides the existing figure from stdfloats.inc. I want to have *both* figure and margin figure. --- Original Message --- On Saturday, July 16th, 2022 at 8:51 PM, Jean-Marc Lasgouttes wrote: > Le 16/07/2022 à 21:47, Jean-Marc Lasgouttes a écrit : > > > Hello, > > > > Did you try "NumberWithin none" like other floats in layouts/stdfloats.inc? > > > I would also use "Type figure" to convey that your marginfigure is just > a figure. > > JMarc > -- > lyx-users mailing list > lyx-users@lists.lyx.org > http://lists.lyx.org/mailman/listinfo/lyx-users -- lyx-users mailing list lyx-users@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-users
Re: margin figure's label counter
Just tried it. It effectively sets the new Style a counter of its own, indifferent to what is the chapter or section or any other parent counter. That is: Margin figure 1, margin figure 2 in chapter 1, margin figure 3 in chapter 2 etc. --- Original Message --- On Saturday, July 16th, 2022 at 8:47 PM, Jean-Marc Lasgouttes wrote: > Le 16/07/2022 à 21:03, Ehud Behar via lyx-users a écrit : > > > I want to define a new float in my document - margin figure. > > > > I defined a new float using a module file with a Style: > > > > Float > > Type marginfigure > > GuiName MarginFigure > > NumberWithin figure # < > > RefPrefix fig > > more commands etc. > > End > > > > The document class is book, and inside chapter 1, as you can see in the > > attached image, I inserted a regular figure, followed by a margin > > figure. The margin figure counter in the editor is 1.1.1, since it is in > > chapter one, and it inherited the first number inside the figure counter. > > > > I want the margin figure to have the label 1.2 (which logically makes > > more sense if you treat figure and marginfigure on an equal footing). > > > > What amendments should I make to the Style to get it changed the way I want? > > > Hello, > > Did you try "NumberWithin none" like other floats in layouts/stdfloats.inc? > > To be frank, I thought I knoew how this stuff wors, but it seems that > many things happened since that time :) > > JMarc > -- > lyx-users mailing list > lyx-users@lists.lyx.org > http://lists.lyx.org/mailman/listinfo/lyx-users -- lyx-users mailing list lyx-users@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-users
margin figure's label counter
I want to define a new float in my document - margin figure. I defined a new float using a module file with a Style: Float Type marginfigure GuiName MarginFigure NumberWithin figure # < RefPrefix fig more commands etc. End The document class is book, and inside chapter 1, as you can see in the attached image, I inserted a regular figure, followed by a margin figure. The margin figure counter in the editor is 1.1.1, since it is in chapter one, and it inherited the first number inside the figure counter. I want the margin figure to have the label 1.2 (which logically makes more sense if you treat figure and marginfigure on an equal footing). What amendments should I make to the Style to get it changed the way I want?-- lyx-users mailing list lyx-users@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-users