Re: Question about document defaults and Lyx layouts
Jean-Marc Lasgouttes wrote: > > >>>>> "Pedro" == Pedro Sanchez <[EMAIL PROTECTED]> writes: > > Pedro> Thank you for your answer. I'd like to make two comments: > > Pedro> 1. This is more a suggestion than a problem. In talking about > Pedro> document defaults in LyX it would be good to have some way to > Pedro> figure out what those defaults are for each document type > Pedro> without having to actually print the document or look into the > Pedro> layout and class files. As an example, the defaults could be > Pedro> presented in parenthesis in the pull down menus. > > It is always possible to add that in the description of the textclass. > However, it would be more difficult for LyX to discover that. > So, what aren't the "default" statements in the layout files for? Aren't those supposed to tell LyX what the defaults are for each texclass so that there is no need to "discover" them? > Pedro> 2. I fixed the typo in my layout file and now the relevant > Pedro> section looks like this: > > Pedro> ClassOptions Other 12pt,openright,twoside End > > Pedro> However, LyX only takes the first option before the comma (12pt > Pedro> above). The others are ignored. Is this a bug? or is my syntax > Pedro> wrong? > > Try to enclose the options in quotes, like > > ClassOptions > Other "12pt,openright,twoside" > End > > However, if you create your own latex class, there is no need to > specify this at LyX level. These options should only be set in the > .cls file. > I prefer to do it like this because it provides feedback to the user about what the defaults of the texclass are. It wouldn't be necessary if all the default values defined in the layout file were visible under the menu Layout --> Document, but they are not, only a few of them. -- Pedro
Re: Question about document defaults and Lyx layouts
Thank you for your answer. I'd like to make two comments: 1. This is more a suggestion than a problem. In talking about document defaults in LyX it would be good to have some way to figure out what those defaults are for each document type without having to actually print the document or look into the layout and class files. As an example, the defaults could be presented in parenthesis in the pull down menus. 2. I fixed the typo in my layout file and now the relevant section looks like this: ClassOptions Other 12pt,openright,twoside End However, LyX only takes the first option before the comma (12pt above). The others are ignored. Is this a bug? or is my syntax wrong? Regards, -- Pedro Jean-Marc Lasgouttes wrote: > > > "psanchez" == psanchez <[EMAIL PROTECTED]> writes: > > psanchez> 1. There are some defaults I can't figure out fow to change. > psanchez> I want the default font to be "times," the default size to > psanchez> be "12," and the default pagestyle to be "fancy." What shall > psanchez> I write in the layout file to accomplish this? > > The idea is that you do nothing. If you use the settings "default", > then LyX will not use any particular option, and you will get 12pt > times font. > > psanchez> 2. The "Sides" and "Columns" defaults show up with the > psanchez> changed values but are not passed to my class file as > psanchez> options so at the end the changes do nothing. That is, the > psanchez> Layout-->Document menu shows "Sides=2" and "Columns=2" as > psanchez> requested by the layout file but the printed document (dvi > psanchez> or PS) is still onesided single column. So, how do I tell > psanchez> LyX that I want not just to show my defaults in the menu but > psanchez> to actually translate these into the "twoside" and > psanchez> "twocolumn" options for my class file? > > The settings in the layout file describe what the cls file defaults > are. This means that your myreport.cls file should contain the statement > \ExecuteOptions{twocolumn,twoside} > and then LyX will correctly not have to pass the parameters. > > psanchez> 3. How can I get the layout file to write something to the > psanchez> "Extra Options" field of the Layout-->Document menu? I > psanchez> thought the last statement in the attached file would do the > psanchez> trick, but it doesn't. I would extend the question to the > psanchez> "Float Placement" field also. > > You used ClasOption instead of ClassOptions. Looks like a typo to me. > > Hope this helps. > > JMarc
LyX fails to import this simple LaTeX file
LyX 1.0.3 totally fails to import this simple file. I don't even get the title and author! The file compiles fine with LaTeX. If the \usepackage{graphicx} is enabled things are even worse (lost of errors during "view dvi"). It also fails to recognize the [A short caption] option. Any ideas why? -- Pedro I. Sanchez \documentclass{article} %\usepackage{graphicx} \title{Test File} \author{The Author} \begin{document} \maketitle \begin{figure} \centering This should be \verb+\includegraphics{mygraphic}+ \caption[A short caption.]{A lng caption.} \end{figure} \end{document}
Re: TOF, Short Figure Captions?
It doesn't work. If I write "[My short figure description]" at the begining of the caption and mark this as TeX code LyX produces \caption{[My short figure description]This is a very long figure description that I don't want to show up in the TOF} So far it seems I have to export my file as LaTeX and do the editing manually. Really annoying! -- Pedro I. Sanchez Jean-Marc Lasgouttes wrote: > > >>>>> "Pedro" == Pedro Sanchez <[EMAIL PROTECTED]> writes: > > Pedro> When doing the caption for my figure floats, I want LyX to > Pedro> generate the following LaTeX code: > > Pedro> \caption[My short figure description]{This is a very long > Pedro> figure description that I don't want to show up in the TOF} > > Pedro> Is there a way to tell LyX about the "My short figure > Pedro> description" parameter? > > This is not possible currently. All you can do is write the caption as > you did and makd the macro name and brackets as TeX. > > JMarc
TOF, Short Figure Captions?
When doing the caption for my figure floats, I want LyX to generate the following LaTeX code: \caption[My short figure description]{This is a very long figure description that I don't want to show up in the TOF} Is there a way to tell LyX about the "My short figure description" parameter? -- Pedro I. Sanchez