Re: RC1: Why there is no binary for Winsows
Hi, I think that the Windows versions have stability problems especially if you are using a 64 bit windows OS on which Lyx runs under WOW. Hope they compile a 64 bit version. Gilad
lyx 2rc1 prefs2prefs
Hi, I want to report a problem with 2rc1. I have made a trouble-free installation of the source tarball on Mandriva linux 2010.0. [emason@acacia .lyx]$ uname -a Linux acacia.cmima.csic.es 2.6.31.14-desktop-1mnb #1 SMP Wed Nov 24 10:42:07 EST 2010 x86_64 Intel(R) Core(TM) i7 CPU 920 @ 2.67GHz GNU/Linux But when I try to start lyx I get the following: [emason@acacia .lyx]$ Traceback (most recent call last): File /usr/local/share/lyx/scripts/prefs2prefs.py, line 192, in module main(sys.argv) File /usr/local/share/lyx/scripts/prefs2prefs.py, line 168, in main (update, newline) = c(lines[i]) File /opt/share/lyx/scripts/prefs2prefs_prefs.py, line 54, in language_use_babel val = m.group(1) AttributeError: 'NoneType' object has no attribute 'group' filetools.cpp(991): Could not run file conversion script prefs2prefs.py. LyXRC.cpp(395): Unable to convert /home/emason/.lyx/preferences to format 1 Warning: Could not read configuration file Error while reading the configuration file preferences. Please check your installation. I had a previous lyx (1.6.8) installation, which I removed using make clean. Grateful for any suggestions, Evan
Re: lyx 2rc1 prefs2prefs
Le 10/03/2011 15:24, Evan Mason a écrit : File /opt/share/lyx/scripts/prefs2prefs_prefs.py, line 54, in language_use_babel val = m.group(1) AttributeError: 'NoneType' object has no attribute 'group' What is your python version? JMarc
Re: lyx 2rc1 prefs2prefs
Jean-Marc Lasgouttes lasgouttes at lyx.org writes: Le 10/03/2011 15:24, Evan Mason a écrit : File /opt/share/lyx/scripts/prefs2prefs_prefs.py, line 54, in language_use_babel val = m.group(1) AttributeError: 'NoneType' object has no attribute 'group' What is your python version? JMarc [emason@acacia float_CUS]$ python --version Python 2.6.4 Evan
Re: lyx 2rc1 prefs2prefs
On Thursday 10 March 2011 14:24:18 Evan Mason wrote: Hi, I want to report a problem with 2rc1. I have made a trouble-free installation of the source tarball on Mandriva linux 2010.0. [emason@acacia .lyx]$ uname -a Linux acacia.cmima.csic.es 2.6.31.14-desktop-1mnb #1 SMP Wed Nov 24 10:42:07 EST 2010 x86_64 Intel(R) Core(TM) i7 CPU 920 @ 2.67GHz GNU/Linux But when I try to start lyx I get the following: [emason@acacia .lyx]$ Traceback (most recent call last): File /usr/local/share/lyx/scripts/prefs2prefs.py, line 192, in module main(sys.argv) File /usr/local/share/lyx/scripts/prefs2prefs.py, line 168, in main (update, newline) = c(lines[i]) File /opt/share/lyx/scripts/prefs2prefs_prefs.py, line 54, in language_use_babel val = m.group(1) AttributeError: 'NoneType' object has no attribute 'group' filetools.cpp(991): Could not run file conversion script prefs2prefs.py. LyXRC.cpp(395): Unable to convert /home/emason/.lyx/preferences to format 1 Warning: Could not read configuration file Error while reading the configuration file preferences. Please check your installation. I had a previous lyx (1.6.8) installation, which I removed using make clean. Grateful for any suggestions, Evan The script was expecting to found a line starting with \language_use_babel and found none. If this is the normal procedure the idea is to test for it. Thank you for the report. :-) -- José Abílio
Re: lyx 2rc1 prefs2prefs
On Thursday 10 March 2011 15:34:26 José Matos wrote: /home/emason/.lyx/preferences OK, now that I read the code I see that test is there. One question, is there a line in your preference file that starts with \language_use_babel? What is its content? Regards, -- José Abílio
Re: lyx 2rc1 prefs2prefs
José Matos jamatos at lyx.org writes: On Thursday 10 March 2011 15:34:26 José Matos wrote: /home/emason/.lyx/preferences OK, now that I read the code I see that test is there. One question, is there a line in your preference file that starts with \language_use_babel? What is its content? Regards, The line is: \language_use_babel false I had switched off babel in my previous lyx installation (1.6.8) in order to use the agutext document class. I guess I can try changing it to true in 'preference' and see what happens. Thanks, Evan
Re: lyx 2rc1 prefs2prefs
On Thursday 10 March 2011 15:44:56 Evan Mason wrote: The line is: \language_use_babel false I had switched off babel in my previous lyx installation (1.6.8) in order to use the agutext document class. I guess I can try changing it to true in 'preference' and see what happens. No need to change it, your use case is reasonable. I suspect that if you remove the quotes () around false the script will work. Or at least it will work past that point, more correctly. ;-) Thanks, Evan -- José Abílio
REVTeX4 Again
I'm still having problems converting an Article class document (with footnotes and citations) to a REVTeX4 (\documentclass[12pt,aps,prb,preprint]{revtex4}) document, where there are no footnotes, but citations and comments appear together in endnotes. I selected REVTeX4 and put the options 12pt,aps,prb,preprint into the Custom field. But even trying to convert the simplest test document in the Article class, I can't see how to get page numbers into a citation (using the text after puts the page numbers into the body text, rather than the endnote entry). Also, if I cite the same article a second time, with page numbers this time, I need the citation to appear as endnote 2, like this: 1 cited article 2 See Ref. 1, pp.2--4 To see the format I'm striving for, one could go to http://ajp.aapt.org/resource/1/ajpias/v79/i3/p261_s1 and download the pdf of the short Dirac article. (no need for the two- column at this point) I'd really like to do the conversion from within LyX, because there will be further editing which will be hard for me to manage if I have to make those edits directly on the LaTeX file. Any help or suggestions would be appreciated. Bruce
Re: lyx 2rc1 prefs2prefs
No need to change it, your use case is reasonable. I suspect that if you remove the quotes () around false the script will work. Or at least it will work past that point, more correctly. Thanks, Evan Indeed removing the quotes seems to have worked. Thanks a lot, Evan
Re: Side Caption Insets for Memoir
Dear LyX Developers and Users, I'm trying to create custom insets and environments for the document class features. One environment that has me stumped though, is how to create an inset for the memoir sidecaption feature. The sidecaption environment allows you to typeset the caption of your figure in the margin (similar to the way that the Tufte handout and book classes work), and the style guide for this class calls for their use. This is how an example in LaTeX would work. So I need to RTFM a little more often. After a bit of head scratching, I've been able to create a workable Side Caption style. You simply place it inside of the figure or table float and then use the Opt inset to add the caption. Very smooth and easy to use, and I'm quite happy. Here's the definition I used: Style Side_Caption CategorySpecial_Commands Margin Static LatexType Environment LatexName sidecaption NextNoIndent1 TopSep 0.5 ParSep 0.5 BottomSep 0.5 Align Block AlignPossible Block, Left, Right, Center LabelType No_Label HTMLTag sidecaption HTMLItemp RequiredArgs1 End I've had a questions come up, though: I'm not very happy telling a user to go to Insert Short Title in order to add a caption. This seems confusing, from a usability standpoint. I would prefer to have a custom inset that they can add that says Custom:Side_Caption. Is there any way to create a custom opt inset? Even after RTFMing, I was not able to find one. Thoughts would be appreciated. Cheers, Rob
Epigraph for Memoir
Dear LyX-Developers, So, after working on the Side Caption style, I got excited and thought that I would try and make an epigraph style for memoir and my custom class. The epigraph command allows the enterprising author to add a quotation to their document prior to the start of the chapter (see page 249 of the memoir manual). It takes arguments: \epigraph{text}{source} Here is my layout definition that would enable this for the memoir class: Style Epigraph CategorySpecial_Commands Margin Static LatexType command LatexName lyxepigraph RequiredArgs1 NextNoIndent1 LeftMargin MMM RightMargin MMM TopSep 0.5 ParSep 0.5 BottomSep 0.5 Align Block AlignPossible Block, Left, Right, Center LabelType No_Label HTMLTag epigraph HTMLItemp Font Family Roman Shape Italic EndFont Preamble \newcommand{\lyxepigraph}[2]{\epigraph{#2}{#1}} End Preamble End The preamble line is necessary because LyX places required arguments added through the opt inset before paragraph text. The memoir epigraph command takes first the paragraph text and then the source. Like in the case of the last example, is there a way to create a custom opt inset that could have Epigraph Source for the label and could be added from Insert Custom Epgraph Source. I wasn't able to find a readily obvious answer. Cheers, Rob
Re: Title placement and font size
How can I set the title placement on the first page of my article and its font size? I have some requirements from a workshop that wants the title to start at 3.49 cm from the top of the page and in 14pt font. For handle chapter titles you can use titlesec package. I don't know if handle title of article. Marcelo
Re: Title placement and font size
On Thursday 10 March 2011 14:36:00 Marcelo Acuña wrote: How can I set the title placement on the first page of my article and its font size? I have some requirements from a workshop that wants the title to start at 3.49 cm from the top of the page and in 14pt font. For handle chapter titles you can use titlesec package. I don't know if handle title of article. Marcelo This is just one man's opinion, but I never use the document class's features for the front matter. I just use custom environments and ERT (embedded LaTeX) to place all elements of the front matter -- the title, the author, the cover image, the copyright page, the dedication and acknowledgements, the here's how you use this book, the about the author, etc. The way I see it, every element of the frontmatter is a one-off thing, and one-off things are ideal for fingerpainting. Once I get into the mainmatter, I'm just the opposite -- no ERT, all environments and character styles, because consistence is the name of the game in the mainmatter. SteveT Steve Litt Recession Relief Package http://www.recession-relief.US Twitter: http://www.twitter.com/stevelitt
Re: Title placement and font size
This is just one man's opinion, but I never use the document class's features for the front matter. I just use custom environments and ERT (embedded LaTeX) to place all elements of the front matter -- the title, the author, the cover image, the copyright page, the dedication and acknowledgements, the here's how you use this book, the about the author, etc. The way I see it, every element of the frontmatter is a one-off thing, and one-off things are ideal for fingerpainting. I actually go one step further. I crate all of the frontmatter using a matching stylesheet in Scribs. I then add the material using PDFpages. To that end, I also disable the \maketitle macro so that I can still use \author, \title, etc. and have all of my headers and footers look correct. \renewcommand{\maketitle}{}
Re: Title placement and font size
On Thursday 10 March 2011 15:05:03 Rob Oakes wrote: This is just one man's opinion, but I never use the document class's features for the front matter. I just use custom environments and ERT (embedded LaTeX) to place all elements of the front matter -- the title, the author, the cover image, the copyright page, the dedication and acknowledgements, the here's how you use this book, the about the author, etc. The way I see it, every element of the frontmatter is a one-off thing, and one-off things are ideal for fingerpainting. I actually go one step further. I crate all of the frontmatter using a matching stylesheet in Scribs. I then add the material using PDFpages. To that end, I also disable the \maketitle macro so that I can still use \author, \title, etc. and have all of my headers and footers look correct. \renewcommand{\maketitle}{} Pretty slick! I'm gonna do that from now on (diable maketitle, not necessarily build frontmatter in Scribus). The thing is, every eBook I sell is personalized with the customer's name, so it has to be built on the spot, and I'm not sure I want to have that dependent on Scribus as well as LyX/LaTeX. Thanks for the great idea! SteveT Steve Litt Recession Relief Package http://www.recession-relief.US Twitter: http://www.twitter.com/stevelitt
two theorems right after another
Sorry, if this question has been asked a million times already. I don't know how to search for it in the archive. It's probably a simple thing. I want to add a theorem environment and right after that another one. However, whenever I just hit return to enter to the next line, and select Theorem from the drop down list in Lyx, nothing changes, there is no Theorem 2 or something like that. When I hit return again, there is still only one theorem. What can I do? Best Randolf
Re: two theorems right after another
On 03/10/2011 04:25 PM, Randolf Altmeyer wrote: Sorry, if this question has been asked a million times already. I don't know how to search for it in the archive. It's probably a simple thing. I want to add a theorem environment and right after that another one. However, whenever I just hit return to enter to the next line, and select Theorem from the drop down list in Lyx, nothing changes, there is no Theorem 2 or something like that. When I hit return again, there is still only one theorem. What can I do? I always enter a blank line in between them. Make that blank line in the standard environment, and put in, say, an ERT %, and it will be fine. Or you could prove the first result... -- David L. Johnson You will say Christ saith this and the apostles say this; but what canst thou say? -- George Fox.
Re: two theorems right after another
Randolf Altmeyer randolf.altmeyer at googlemail.com writes: It's probably a simple thing. I want to add a theorem environment and right after that another one. However, whenever I just hit return to enter to the next line, and select Theorem from the drop down list in Lyx, nothing changes, there is no Theorem 2 or something like that. When I hit return again, there is still only one theorem. In the environment list, look for the Separator environment and stick one between the theorems. Paul
Re: REVTeX4 Again
On 10/03/2011 11:05 AM, Bruce Pourciau wrote: I'm still having problems converting an Article class document (with footnotes and citations) to a REVTeX4 (\documentclass[12pt,aps,prb,preprint]{revtex4}) document, where there are no footnotes, but citations and comments appear together in endnotes. I selected REVTeX4 and put the options 12pt,aps,prb,preprint into the Custom field. But even trying to convert the simplest test document in the Article class, I can't see how to get page numbers into a citation (using the text after puts the page numbers into the body text, rather than the endnote entry). Yes, the behavior you mention is intended; text after is meant to appear in the text. If you want a page range to appear in your bibliography you would enter that info in your .bib file as in: @ARTICLE{Dirac1928a, author = {Dirac, P. A. M.}, title = {The Quantum Theory of the Electron}, journal = {Proc. R. Soc. Lond. A}, year = {1928}, volume = {117}, pages = {610--624}, number = {778} } Also, if I cite the same article a second time, with page numbers this time, I need the citation to appear as endnote 2, like this: 1 cited article 2 See Ref. 1, pp.2--4 (normally you would always have page numbers for an article, but maybe you mean a book) One way to do this would be just to have an endnote with the text See Ref. [cite ref 1], pp.2--4 in it. Otherwise, you could use Bibtex to do it for you. Assume you had a book, and you refer to different chapters of the book. The usual approach is to have multiple @INBOOK entries in your .bib file with cross-references to a @BOOK entry: @BOOK{Meier1984, booktitle = {Optical Orientation}, year = {1984}, editor = {F. Meier and B.~P. Zakharchenya} } @INBOOK{Dyakonov1984, author = {M.~I. D'yakonov and V.~I. Perel'}, year = {1984}, chapter = {2}, pages = {15--71}, crossref = {Meier1984} } @INBOOK{Pikus1984, author = {G.~E. Pikus and A.~N. Titkov}, year = {1984}, chapter = {3}, pages = {73--131}, crossref = {Meier1984} } etc. Notice the crossref field. It allows Bibtex to fetch additional bibliographic information from the parent, the actual book. If you reference a number (2, or more) of different chapters from the same book, Bibtex will automatically insert the book as entry 1. in your list of references and will have entries like 1. The book. 2. In Ref. 1, pp. 15--71. 3. In Ref. 1, pp. 73--131. Of course you can also refer to the book directly, too. To see the format I'm striving for, one could go to http://ajp.aapt.org/resource/1/ajpias/v79/i3/p261_s1 and download the pdf of the short Dirac article. (no need for the two-column at this point) I'd really like to do the conversion from within LyX, because there will be further editing which will be hard for me to manage if I have to make those edits directly on the LaTeX file. Any help or suggestions would be appreciated. Bruce -- Julien
Re: REVTeX4 Again
On Mar 10, 2011, at 4:37 PM, Julien Rioux wrote: On 10/03/2011 11:05 AM, Bruce Pourciau wrote: I'm still having problems converting an Article class document (with footnotes and citations) to a REVTeX4 (\documentclass[12pt,aps,prb,preprint]{revtex4}) document, where there are no footnotes, but citations and comments appear together in endnotes. I selected REVTeX4 and put the options 12pt,aps,prb,preprint into the Custom field. But even trying to convert the simplest test document in the Article class, I can't see how to get page numbers into a citation (using the text after puts the page numbers into the body text, rather than the endnote entry). Yes, the behavior you mention is intended; text after is meant to appear in the text. If you want a page range to appear in your bibliography you would enter that info in your .bib file as in: @ARTICLE{Dirac1928a, author = {Dirac, P. A. M.}, title = {The Quantum Theory of the Electron}, journal = {Proc. R. Soc. Lond. A}, year = {1928}, volume = {117}, pages = {610--624}, number = {778} } Also, if I cite the same article a second time, with page numbers this time, I need the citation to appear as endnote 2, like this: 1 cited article 2 See Ref. 1, pp.2--4 (normally you would always have page numbers for an article, but maybe you mean a book) One way to do this would be just to have an endnote with the text See Ref. [cite ref 1], pp.2--4 in it. Otherwise, you could use Bibtex to do it for you. Assume you had a book, and you refer to different chapters of the book. The usual approach is to have multiple @INBOOK entries in your .bib file with cross-references to a @BOOK entry: @BOOK{Meier1984, booktitle = {Optical Orientation}, year = {1984}, editor = {F. Meier and B.~P. Zakharchenya} } @INBOOK{Dyakonov1984, author = {M.~I. D'yakonov and V.~I. Perel'}, year = {1984}, chapter = {2}, pages = {15--71}, crossref = {Meier1984} } @INBOOK{Pikus1984, author = {G.~E. Pikus and A.~N. Titkov}, year = {1984}, chapter = {3}, pages = {73--131}, crossref = {Meier1984} } etc. Notice the crossref field. It allows Bibtex to fetch additional bibliographic information from the parent, the actual book. If you reference a number (2, or more) of different chapters from the same book, Bibtex will automatically insert the book as entry 1. in your list of references and will have entries like 1. The book. 2. In Ref. 1, pp. 15--71. 3. In Ref. 1, pp. 73--131. Of course you can also refer to the book directly, too. To see the format I'm striving for, one could go to http://ajp.aapt.org/resource/1/ajpias/v79/i3/p261_s1 and download the pdf of the short Dirac article. (no need for the two-column at this point) I'd really like to do the conversion from within LyX, because there will be further editing which will be hard for me to manage if I have to make those edits directly on the LaTeX file. Any help or suggestions would be appreciated. Bruce -- Julien Thank you, Julien. That's very helpful. But iyour description makes it seem like there's no way to make these formatting changes from within LyX, starting from a document already formatted in the Article class. Is that right? If I were starting in LyX with a document in the class [12pt,aps,prb,preprint]{revtex4}, could one make that document follow the formatting you have described above, from within LyX? Bruce
Change Section Style using a Module
Hi, Am working on my thesis using the book Document Class in Lyx. Everything in the book Class works for me except the style of the sections and subsections, i need to change the size from Large to Normal, also i want a different space between the section and the text following. I've been reading about the modules and i think its the best way to make the changes that i want, i tried the following code: #\DeclareLyXModule{ThesisStyle} #DescriptionBegin #Change Section Style #DescriptionEnd Format 11 Style Section Category Section MarginDynamic LabelTypeCounter LabelCountersection TocLevel 1 LatexType Command LatexName section NeedProtect 1 NextNoIndent 1 LabelSep xxx ParSkip 0.4 TopSep1.3 BottomSep 0.7 ParSep0.7 Align Left OptionalArgs 1 Font Series Bold SizeNormal EndFont End The code changes the font size in Lyx but doesn't change anything in the PDF. Any help would be greatly appreciated. Thanks, Raúl
Re: REVTeX4 Again
On 10/03/2011 5:58 PM, Bruce Pourciau wrote: Thank you, Julien. That's very helpful. But iyour description makes it seem like there's no way to make these formatting changes from within LyX, starting from a document already formatted in the Article class. Is that right? If I were starting in LyX with a document in the class [12pt,aps,prb,preprint]{revtex4}, could one make that document follow the formatting you have described above, from within LyX? Bruce I am not sure I understand. How do you enter your citations in your document? Bibtex requires some extra care, but when you do a view PDF, LyX will perform the necessary extra steps for you. So yes you can do these changes within LyX and with any document class. I wasn't very clear in that I didn't mention how LyX uses Bibtex: At the end of your document, you would insert a BibTex database inset (using the insert menu in Lyx). You need a .bib file, which is a database of bibliographic data in the specific bibtex format. Then, throughout your text you insert citations using the insert menu. Cheers, Julien
Re: RC1: Why there is no binary for Winsows
Hi, I think that the Windows versions have stability problems especially if you are using a 64 bit windows OS on which Lyx runs under WOW. Hope they compile a 64 bit version. Gilad
lyx 2rc1 prefs2prefs
Hi, I want to report a problem with 2rc1. I have made a trouble-free installation of the source tarball on Mandriva linux 2010.0. [emason@acacia .lyx]$ uname -a Linux acacia.cmima.csic.es 2.6.31.14-desktop-1mnb #1 SMP Wed Nov 24 10:42:07 EST 2010 x86_64 Intel(R) Core(TM) i7 CPU 920 @ 2.67GHz GNU/Linux But when I try to start lyx I get the following: [emason@acacia .lyx]$ Traceback (most recent call last): File /usr/local/share/lyx/scripts/prefs2prefs.py, line 192, in module main(sys.argv) File /usr/local/share/lyx/scripts/prefs2prefs.py, line 168, in main (update, newline) = c(lines[i]) File /opt/share/lyx/scripts/prefs2prefs_prefs.py, line 54, in language_use_babel val = m.group(1) AttributeError: 'NoneType' object has no attribute 'group' filetools.cpp(991): Could not run file conversion script prefs2prefs.py. LyXRC.cpp(395): Unable to convert /home/emason/.lyx/preferences to format 1 Warning: Could not read configuration file Error while reading the configuration file preferences. Please check your installation. I had a previous lyx (1.6.8) installation, which I removed using make clean. Grateful for any suggestions, Evan
Re: lyx 2rc1 prefs2prefs
Le 10/03/2011 15:24, Evan Mason a écrit : File /opt/share/lyx/scripts/prefs2prefs_prefs.py, line 54, in language_use_babel val = m.group(1) AttributeError: 'NoneType' object has no attribute 'group' What is your python version? JMarc
Re: lyx 2rc1 prefs2prefs
Jean-Marc Lasgouttes lasgouttes at lyx.org writes: Le 10/03/2011 15:24, Evan Mason a écrit : File /opt/share/lyx/scripts/prefs2prefs_prefs.py, line 54, in language_use_babel val = m.group(1) AttributeError: 'NoneType' object has no attribute 'group' What is your python version? JMarc [emason@acacia float_CUS]$ python --version Python 2.6.4 Evan
Re: lyx 2rc1 prefs2prefs
On Thursday 10 March 2011 14:24:18 Evan Mason wrote: Hi, I want to report a problem with 2rc1. I have made a trouble-free installation of the source tarball on Mandriva linux 2010.0. [emason@acacia .lyx]$ uname -a Linux acacia.cmima.csic.es 2.6.31.14-desktop-1mnb #1 SMP Wed Nov 24 10:42:07 EST 2010 x86_64 Intel(R) Core(TM) i7 CPU 920 @ 2.67GHz GNU/Linux But when I try to start lyx I get the following: [emason@acacia .lyx]$ Traceback (most recent call last): File /usr/local/share/lyx/scripts/prefs2prefs.py, line 192, in module main(sys.argv) File /usr/local/share/lyx/scripts/prefs2prefs.py, line 168, in main (update, newline) = c(lines[i]) File /opt/share/lyx/scripts/prefs2prefs_prefs.py, line 54, in language_use_babel val = m.group(1) AttributeError: 'NoneType' object has no attribute 'group' filetools.cpp(991): Could not run file conversion script prefs2prefs.py. LyXRC.cpp(395): Unable to convert /home/emason/.lyx/preferences to format 1 Warning: Could not read configuration file Error while reading the configuration file preferences. Please check your installation. I had a previous lyx (1.6.8) installation, which I removed using make clean. Grateful for any suggestions, Evan The script was expecting to found a line starting with \language_use_babel and found none. If this is the normal procedure the idea is to test for it. Thank you for the report. :-) -- José Abílio
Re: lyx 2rc1 prefs2prefs
On Thursday 10 March 2011 15:34:26 José Matos wrote: /home/emason/.lyx/preferences OK, now that I read the code I see that test is there. One question, is there a line in your preference file that starts with \language_use_babel? What is its content? Regards, -- José Abílio
Re: lyx 2rc1 prefs2prefs
José Matos jamatos at lyx.org writes: On Thursday 10 March 2011 15:34:26 José Matos wrote: /home/emason/.lyx/preferences OK, now that I read the code I see that test is there. One question, is there a line in your preference file that starts with \language_use_babel? What is its content? Regards, The line is: \language_use_babel false I had switched off babel in my previous lyx installation (1.6.8) in order to use the agutext document class. I guess I can try changing it to true in 'preference' and see what happens. Thanks, Evan
Re: lyx 2rc1 prefs2prefs
On Thursday 10 March 2011 15:44:56 Evan Mason wrote: The line is: \language_use_babel false I had switched off babel in my previous lyx installation (1.6.8) in order to use the agutext document class. I guess I can try changing it to true in 'preference' and see what happens. No need to change it, your use case is reasonable. I suspect that if you remove the quotes () around false the script will work. Or at least it will work past that point, more correctly. ;-) Thanks, Evan -- José Abílio
REVTeX4 Again
I'm still having problems converting an Article class document (with footnotes and citations) to a REVTeX4 (\documentclass[12pt,aps,prb,preprint]{revtex4}) document, where there are no footnotes, but citations and comments appear together in endnotes. I selected REVTeX4 and put the options 12pt,aps,prb,preprint into the Custom field. But even trying to convert the simplest test document in the Article class, I can't see how to get page numbers into a citation (using the text after puts the page numbers into the body text, rather than the endnote entry). Also, if I cite the same article a second time, with page numbers this time, I need the citation to appear as endnote 2, like this: 1 cited article 2 See Ref. 1, pp.2--4 To see the format I'm striving for, one could go to http://ajp.aapt.org/resource/1/ajpias/v79/i3/p261_s1 and download the pdf of the short Dirac article. (no need for the two- column at this point) I'd really like to do the conversion from within LyX, because there will be further editing which will be hard for me to manage if I have to make those edits directly on the LaTeX file. Any help or suggestions would be appreciated. Bruce
Re: lyx 2rc1 prefs2prefs
No need to change it, your use case is reasonable. I suspect that if you remove the quotes () around false the script will work. Or at least it will work past that point, more correctly. Thanks, Evan Indeed removing the quotes seems to have worked. Thanks a lot, Evan
Re: Side Caption Insets for Memoir
Dear LyX Developers and Users, I'm trying to create custom insets and environments for the document class features. One environment that has me stumped though, is how to create an inset for the memoir sidecaption feature. The sidecaption environment allows you to typeset the caption of your figure in the margin (similar to the way that the Tufte handout and book classes work), and the style guide for this class calls for their use. This is how an example in LaTeX would work. So I need to RTFM a little more often. After a bit of head scratching, I've been able to create a workable Side Caption style. You simply place it inside of the figure or table float and then use the Opt inset to add the caption. Very smooth and easy to use, and I'm quite happy. Here's the definition I used: Style Side_Caption CategorySpecial_Commands Margin Static LatexType Environment LatexName sidecaption NextNoIndent1 TopSep 0.5 ParSep 0.5 BottomSep 0.5 Align Block AlignPossible Block, Left, Right, Center LabelType No_Label HTMLTag sidecaption HTMLItemp RequiredArgs1 End I've had a questions come up, though: I'm not very happy telling a user to go to Insert Short Title in order to add a caption. This seems confusing, from a usability standpoint. I would prefer to have a custom inset that they can add that says Custom:Side_Caption. Is there any way to create a custom opt inset? Even after RTFMing, I was not able to find one. Thoughts would be appreciated. Cheers, Rob
Epigraph for Memoir
Dear LyX-Developers, So, after working on the Side Caption style, I got excited and thought that I would try and make an epigraph style for memoir and my custom class. The epigraph command allows the enterprising author to add a quotation to their document prior to the start of the chapter (see page 249 of the memoir manual). It takes arguments: \epigraph{text}{source} Here is my layout definition that would enable this for the memoir class: Style Epigraph CategorySpecial_Commands Margin Static LatexType command LatexName lyxepigraph RequiredArgs1 NextNoIndent1 LeftMargin MMM RightMargin MMM TopSep 0.5 ParSep 0.5 BottomSep 0.5 Align Block AlignPossible Block, Left, Right, Center LabelType No_Label HTMLTag epigraph HTMLItemp Font Family Roman Shape Italic EndFont Preamble \newcommand{\lyxepigraph}[2]{\epigraph{#2}{#1}} End Preamble End The preamble line is necessary because LyX places required arguments added through the opt inset before paragraph text. The memoir epigraph command takes first the paragraph text and then the source. Like in the case of the last example, is there a way to create a custom opt inset that could have Epigraph Source for the label and could be added from Insert Custom Epgraph Source. I wasn't able to find a readily obvious answer. Cheers, Rob
Re: Title placement and font size
How can I set the title placement on the first page of my article and its font size? I have some requirements from a workshop that wants the title to start at 3.49 cm from the top of the page and in 14pt font. For handle chapter titles you can use titlesec package. I don't know if handle title of article. Marcelo
Re: Title placement and font size
On Thursday 10 March 2011 14:36:00 Marcelo Acuña wrote: How can I set the title placement on the first page of my article and its font size? I have some requirements from a workshop that wants the title to start at 3.49 cm from the top of the page and in 14pt font. For handle chapter titles you can use titlesec package. I don't know if handle title of article. Marcelo This is just one man's opinion, but I never use the document class's features for the front matter. I just use custom environments and ERT (embedded LaTeX) to place all elements of the front matter -- the title, the author, the cover image, the copyright page, the dedication and acknowledgements, the here's how you use this book, the about the author, etc. The way I see it, every element of the frontmatter is a one-off thing, and one-off things are ideal for fingerpainting. Once I get into the mainmatter, I'm just the opposite -- no ERT, all environments and character styles, because consistence is the name of the game in the mainmatter. SteveT Steve Litt Recession Relief Package http://www.recession-relief.US Twitter: http://www.twitter.com/stevelitt
Re: Title placement and font size
This is just one man's opinion, but I never use the document class's features for the front matter. I just use custom environments and ERT (embedded LaTeX) to place all elements of the front matter -- the title, the author, the cover image, the copyright page, the dedication and acknowledgements, the here's how you use this book, the about the author, etc. The way I see it, every element of the frontmatter is a one-off thing, and one-off things are ideal for fingerpainting. I actually go one step further. I crate all of the frontmatter using a matching stylesheet in Scribs. I then add the material using PDFpages. To that end, I also disable the \maketitle macro so that I can still use \author, \title, etc. and have all of my headers and footers look correct. \renewcommand{\maketitle}{}
Re: Title placement and font size
On Thursday 10 March 2011 15:05:03 Rob Oakes wrote: This is just one man's opinion, but I never use the document class's features for the front matter. I just use custom environments and ERT (embedded LaTeX) to place all elements of the front matter -- the title, the author, the cover image, the copyright page, the dedication and acknowledgements, the here's how you use this book, the about the author, etc. The way I see it, every element of the frontmatter is a one-off thing, and one-off things are ideal for fingerpainting. I actually go one step further. I crate all of the frontmatter using a matching stylesheet in Scribs. I then add the material using PDFpages. To that end, I also disable the \maketitle macro so that I can still use \author, \title, etc. and have all of my headers and footers look correct. \renewcommand{\maketitle}{} Pretty slick! I'm gonna do that from now on (diable maketitle, not necessarily build frontmatter in Scribus). The thing is, every eBook I sell is personalized with the customer's name, so it has to be built on the spot, and I'm not sure I want to have that dependent on Scribus as well as LyX/LaTeX. Thanks for the great idea! SteveT Steve Litt Recession Relief Package http://www.recession-relief.US Twitter: http://www.twitter.com/stevelitt
two theorems right after another
Sorry, if this question has been asked a million times already. I don't know how to search for it in the archive. It's probably a simple thing. I want to add a theorem environment and right after that another one. However, whenever I just hit return to enter to the next line, and select Theorem from the drop down list in Lyx, nothing changes, there is no Theorem 2 or something like that. When I hit return again, there is still only one theorem. What can I do? Best Randolf
Re: two theorems right after another
On 03/10/2011 04:25 PM, Randolf Altmeyer wrote: Sorry, if this question has been asked a million times already. I don't know how to search for it in the archive. It's probably a simple thing. I want to add a theorem environment and right after that another one. However, whenever I just hit return to enter to the next line, and select Theorem from the drop down list in Lyx, nothing changes, there is no Theorem 2 or something like that. When I hit return again, there is still only one theorem. What can I do? I always enter a blank line in between them. Make that blank line in the standard environment, and put in, say, an ERT %, and it will be fine. Or you could prove the first result... -- David L. Johnson You will say Christ saith this and the apostles say this; but what canst thou say? -- George Fox.
Re: two theorems right after another
Randolf Altmeyer randolf.altmeyer at googlemail.com writes: It's probably a simple thing. I want to add a theorem environment and right after that another one. However, whenever I just hit return to enter to the next line, and select Theorem from the drop down list in Lyx, nothing changes, there is no Theorem 2 or something like that. When I hit return again, there is still only one theorem. In the environment list, look for the Separator environment and stick one between the theorems. Paul
Re: REVTeX4 Again
On 10/03/2011 11:05 AM, Bruce Pourciau wrote: I'm still having problems converting an Article class document (with footnotes and citations) to a REVTeX4 (\documentclass[12pt,aps,prb,preprint]{revtex4}) document, where there are no footnotes, but citations and comments appear together in endnotes. I selected REVTeX4 and put the options 12pt,aps,prb,preprint into the Custom field. But even trying to convert the simplest test document in the Article class, I can't see how to get page numbers into a citation (using the text after puts the page numbers into the body text, rather than the endnote entry). Yes, the behavior you mention is intended; text after is meant to appear in the text. If you want a page range to appear in your bibliography you would enter that info in your .bib file as in: @ARTICLE{Dirac1928a, author = {Dirac, P. A. M.}, title = {The Quantum Theory of the Electron}, journal = {Proc. R. Soc. Lond. A}, year = {1928}, volume = {117}, pages = {610--624}, number = {778} } Also, if I cite the same article a second time, with page numbers this time, I need the citation to appear as endnote 2, like this: 1 cited article 2 See Ref. 1, pp.2--4 (normally you would always have page numbers for an article, but maybe you mean a book) One way to do this would be just to have an endnote with the text See Ref. [cite ref 1], pp.2--4 in it. Otherwise, you could use Bibtex to do it for you. Assume you had a book, and you refer to different chapters of the book. The usual approach is to have multiple @INBOOK entries in your .bib file with cross-references to a @BOOK entry: @BOOK{Meier1984, booktitle = {Optical Orientation}, year = {1984}, editor = {F. Meier and B.~P. Zakharchenya} } @INBOOK{Dyakonov1984, author = {M.~I. D'yakonov and V.~I. Perel'}, year = {1984}, chapter = {2}, pages = {15--71}, crossref = {Meier1984} } @INBOOK{Pikus1984, author = {G.~E. Pikus and A.~N. Titkov}, year = {1984}, chapter = {3}, pages = {73--131}, crossref = {Meier1984} } etc. Notice the crossref field. It allows Bibtex to fetch additional bibliographic information from the parent, the actual book. If you reference a number (2, or more) of different chapters from the same book, Bibtex will automatically insert the book as entry 1. in your list of references and will have entries like 1. The book. 2. In Ref. 1, pp. 15--71. 3. In Ref. 1, pp. 73--131. Of course you can also refer to the book directly, too. To see the format I'm striving for, one could go to http://ajp.aapt.org/resource/1/ajpias/v79/i3/p261_s1 and download the pdf of the short Dirac article. (no need for the two-column at this point) I'd really like to do the conversion from within LyX, because there will be further editing which will be hard for me to manage if I have to make those edits directly on the LaTeX file. Any help or suggestions would be appreciated. Bruce -- Julien
Re: REVTeX4 Again
On Mar 10, 2011, at 4:37 PM, Julien Rioux wrote: On 10/03/2011 11:05 AM, Bruce Pourciau wrote: I'm still having problems converting an Article class document (with footnotes and citations) to a REVTeX4 (\documentclass[12pt,aps,prb,preprint]{revtex4}) document, where there are no footnotes, but citations and comments appear together in endnotes. I selected REVTeX4 and put the options 12pt,aps,prb,preprint into the Custom field. But even trying to convert the simplest test document in the Article class, I can't see how to get page numbers into a citation (using the text after puts the page numbers into the body text, rather than the endnote entry). Yes, the behavior you mention is intended; text after is meant to appear in the text. If you want a page range to appear in your bibliography you would enter that info in your .bib file as in: @ARTICLE{Dirac1928a, author = {Dirac, P. A. M.}, title = {The Quantum Theory of the Electron}, journal = {Proc. R. Soc. Lond. A}, year = {1928}, volume = {117}, pages = {610--624}, number = {778} } Also, if I cite the same article a second time, with page numbers this time, I need the citation to appear as endnote 2, like this: 1 cited article 2 See Ref. 1, pp.2--4 (normally you would always have page numbers for an article, but maybe you mean a book) One way to do this would be just to have an endnote with the text See Ref. [cite ref 1], pp.2--4 in it. Otherwise, you could use Bibtex to do it for you. Assume you had a book, and you refer to different chapters of the book. The usual approach is to have multiple @INBOOK entries in your .bib file with cross-references to a @BOOK entry: @BOOK{Meier1984, booktitle = {Optical Orientation}, year = {1984}, editor = {F. Meier and B.~P. Zakharchenya} } @INBOOK{Dyakonov1984, author = {M.~I. D'yakonov and V.~I. Perel'}, year = {1984}, chapter = {2}, pages = {15--71}, crossref = {Meier1984} } @INBOOK{Pikus1984, author = {G.~E. Pikus and A.~N. Titkov}, year = {1984}, chapter = {3}, pages = {73--131}, crossref = {Meier1984} } etc. Notice the crossref field. It allows Bibtex to fetch additional bibliographic information from the parent, the actual book. If you reference a number (2, or more) of different chapters from the same book, Bibtex will automatically insert the book as entry 1. in your list of references and will have entries like 1. The book. 2. In Ref. 1, pp. 15--71. 3. In Ref. 1, pp. 73--131. Of course you can also refer to the book directly, too. To see the format I'm striving for, one could go to http://ajp.aapt.org/resource/1/ajpias/v79/i3/p261_s1 and download the pdf of the short Dirac article. (no need for the two-column at this point) I'd really like to do the conversion from within LyX, because there will be further editing which will be hard for me to manage if I have to make those edits directly on the LaTeX file. Any help or suggestions would be appreciated. Bruce -- Julien Thank you, Julien. That's very helpful. But iyour description makes it seem like there's no way to make these formatting changes from within LyX, starting from a document already formatted in the Article class. Is that right? If I were starting in LyX with a document in the class [12pt,aps,prb,preprint]{revtex4}, could one make that document follow the formatting you have described above, from within LyX? Bruce
Change Section Style using a Module
Hi, Am working on my thesis using the book Document Class in Lyx. Everything in the book Class works for me except the style of the sections and subsections, i need to change the size from Large to Normal, also i want a different space between the section and the text following. I've been reading about the modules and i think its the best way to make the changes that i want, i tried the following code: #\DeclareLyXModule{ThesisStyle} #DescriptionBegin #Change Section Style #DescriptionEnd Format 11 Style Section Category Section MarginDynamic LabelTypeCounter LabelCountersection TocLevel 1 LatexType Command LatexName section NeedProtect 1 NextNoIndent 1 LabelSep xxx ParSkip 0.4 TopSep1.3 BottomSep 0.7 ParSep0.7 Align Left OptionalArgs 1 Font Series Bold SizeNormal EndFont End The code changes the font size in Lyx but doesn't change anything in the PDF. Any help would be greatly appreciated. Thanks, Raúl
Re: REVTeX4 Again
On 10/03/2011 5:58 PM, Bruce Pourciau wrote: Thank you, Julien. That's very helpful. But iyour description makes it seem like there's no way to make these formatting changes from within LyX, starting from a document already formatted in the Article class. Is that right? If I were starting in LyX with a document in the class [12pt,aps,prb,preprint]{revtex4}, could one make that document follow the formatting you have described above, from within LyX? Bruce I am not sure I understand. How do you enter your citations in your document? Bibtex requires some extra care, but when you do a view PDF, LyX will perform the necessary extra steps for you. So yes you can do these changes within LyX and with any document class. I wasn't very clear in that I didn't mention how LyX uses Bibtex: At the end of your document, you would insert a BibTex database inset (using the insert menu in Lyx). You need a .bib file, which is a database of bibliographic data in the specific bibtex format. Then, throughout your text you insert citations using the insert menu. Cheers, Julien
Re: RC1: Why there is no binary for Winsows
Hi, I think that the Windows versions have stability problems especially if you are using a 64 bit windows OS on which Lyx runs under WOW. Hope they compile a 64 bit version. Gilad
lyx 2rc1 prefs2prefs
Hi, I want to report a problem with 2rc1. I have made a trouble-free installation of the source tarball on Mandriva linux 2010.0. [emason@acacia .lyx]$ uname -a Linux acacia.cmima.csic.es 2.6.31.14-desktop-1mnb #1 SMP Wed Nov 24 10:42:07 EST 2010 x86_64 Intel(R) Core(TM) i7 CPU 920 @ 2.67GHz GNU/Linux But when I try to start lyx I get the following: [emason@acacia .lyx]$ Traceback (most recent call last): File "/usr/local/share/lyx/scripts/prefs2prefs.py", line 192, in main(sys.argv) File "/usr/local/share/lyx/scripts/prefs2prefs.py", line 168, in main (update, newline) = c(lines[i]) File "/opt/share/lyx/scripts/prefs2prefs_prefs.py", line 54, in language_use_babel val = m.group(1) AttributeError: 'NoneType' object has no attribute 'group' filetools.cpp(991): Could not run file conversion script prefs2prefs.py. LyXRC.cpp(395): Unable to convert /home/emason/.lyx/preferences to format 1 Warning: Could not read configuration file Error while reading the configuration file preferences. Please check your installation. I had a previous lyx (1.6.8) installation, which I removed using make clean. Grateful for any suggestions, Evan
Re: lyx 2rc1 prefs2prefs
Le 10/03/2011 15:24, Evan Mason a écrit : File "/opt/share/lyx/scripts/prefs2prefs_prefs.py", line 54, in language_use_babel val = m.group(1) AttributeError: 'NoneType' object has no attribute 'group' What is your python version? JMarc
Re: lyx 2rc1 prefs2prefs
Jean-Marc Lasgouttes lyx.org> writes: > > Le 10/03/2011 15:24, Evan Mason a écrit : > >File "/opt/share/lyx/scripts/prefs2prefs_prefs.py", line 54, in language_use_babel > > val = m.group(1) > > AttributeError: 'NoneType' object has no attribute 'group' > > What is your python version? > > JMarc [emason@acacia float_CUS]$ python --version Python 2.6.4 Evan
Re: lyx 2rc1 prefs2prefs
On Thursday 10 March 2011 14:24:18 Evan Mason wrote: > Hi, I want to report a problem with 2rc1. I have made a trouble-free > installation of the source tarball on Mandriva linux 2010.0. > > [emason@acacia .lyx]$ uname -a > Linux acacia.cmima.csic.es 2.6.31.14-desktop-1mnb #1 SMP Wed Nov 24 > 10:42:07 EST 2010 x86_64 Intel(R) Core(TM) i7 CPU 920 @ 2.67GHz > GNU/Linux > > > But when I try to start lyx I get the following: > > [emason@acacia .lyx]$ Traceback (most recent call last): > File "/usr/local/share/lyx/scripts/prefs2prefs.py", line 192, in > main(sys.argv) > File "/usr/local/share/lyx/scripts/prefs2prefs.py", line 168, in main > (update, newline) = c(lines[i]) > File "/opt/share/lyx/scripts/prefs2prefs_prefs.py", line 54, in > language_use_babel val = m.group(1) > AttributeError: 'NoneType' object has no attribute 'group' > filetools.cpp(991): Could not run file conversion script prefs2prefs.py. > LyXRC.cpp(395): Unable to convert /home/emason/.lyx/preferences to format 1 > Warning: Could not read configuration file > > Error while reading the configuration file > preferences. > Please check your installation. > > > I had a previous lyx (1.6.8) installation, which I removed using make > clean. > > Grateful for any suggestions, > > Evan The script was expecting to found a line starting with \language_use_babel and found none. If this is the normal procedure the idea is to test for it. Thank you for the report. :-) -- José Abílio
Re: lyx 2rc1 prefs2prefs
On Thursday 10 March 2011 15:34:26 José Matos wrote: > /home/emason/.lyx/preferences OK, now that I read the code I see that test is there. One question, is there a line in your preference file that starts with \language_use_babel? What is its content? Regards, -- José Abílio
Re: lyx 2rc1 prefs2prefs
José Matos lyx.org> writes: > > On Thursday 10 March 2011 15:34:26 José Matos wrote: > > /home/emason/.lyx/preferences > > OK, now that I read the code I see that test is there. One question, is there > a line in your preference file that starts with \language_use_babel? What is > its content? > > Regards, > The line is: \language_use_babel "false" I had switched off babel in my previous lyx installation (1.6.8) in order to use the agutext document class. I guess I can try changing it to true in 'preference' and see what happens. Thanks, Evan
Re: lyx 2rc1 prefs2prefs
On Thursday 10 March 2011 15:44:56 Evan Mason wrote: > > The line is: > > \language_use_babel "false" > > I had switched off babel in my previous lyx installation (1.6.8) in order > to use the agutext document class. I guess I can try changing it to true > in 'preference' and see what happens. No need to change it, your use case is reasonable. I suspect that if you remove the quotes (") around false the script will work. Or at least it will work past that point, more correctly. ;-) > Thanks, Evan -- José Abílio
REVTeX4 Again
I'm still having problems converting an Article class document (with footnotes and citations) to a REVTeX4 (\documentclass[12pt,aps,prb,preprint]{revtex4}) document, where there are no footnotes, but citations and comments appear together in endnotes. I selected REVTeX4 and put the options 12pt,aps,prb,preprint into the Custom field. But even trying to convert the simplest test document in the Article class, I can't see how to get page numbers into a citation (using the "text after" puts the page numbers into the body text, rather than the endnote entry). Also, if I cite the same article a second time, with page numbers this time, I need the citation to appear as endnote 2, like this: 1 cited article 2 See Ref. 1, pp.2--4 To see the format I'm striving for, one could go to http://ajp.aapt.org/resource/1/ajpias/v79/i3/p261_s1 and download the pdf of the short Dirac article. (no need for the two- column at this point) I'd really like to do the conversion from within LyX, because there will be further editing which will be hard for me to manage if I have to make those edits directly on the LaTeX file. Any help or suggestions would be appreciated. Bruce
Re: lyx 2rc1 prefs2prefs
> > No need to change it, your use case is reasonable. > > I suspect that if you remove the quotes (") around false the script will > work. > Or at least it will work past that point, more correctly. > > > Thanks, Evan > Indeed removing the quotes seems to have worked. Thanks a lot, Evan
Re: Side Caption Insets for Memoir
Dear LyX Developers and Users, > I'm trying to create custom insets and environments for the document class > features. One environment that has me stumped though, is how to create an > inset for the memoir "sidecaption" feature. > > The sidecaption environment allows you to typeset the caption of your figure > in the margin (similar to the way that the Tufte handout and book classes > work), and the style guide for this class calls for their use. This is how an > example in LaTeX would work. So I need to RTFM a little more often. After a bit of head scratching, I've been able to create a workable Side Caption style. You simply place it inside of the figure or table float and then use the Opt inset to add the caption. Very smooth and easy to use, and I'm quite happy. Here's the definition I used: Style Side_Caption CategorySpecial_Commands Margin Static LatexType Environment LatexName sidecaption NextNoIndent1 TopSep 0.5 ParSep 0.5 BottomSep 0.5 Align Block AlignPossible Block, Left, Right, Center LabelType No_Label HTMLTag sidecaption HTMLItemp RequiredArgs1 End I've had a questions come up, though: I'm not very happy telling a user to go to "Insert > Short Title" in order to add a caption. This seems confusing, from a usability standpoint. I would prefer to have a custom inset that they can add that says "Custom:Side_Caption". Is there any way to create a custom "opt" inset? Even after RTFMing, I was not able to find one. Thoughts would be appreciated. Cheers, Rob
Epigraph for Memoir
Dear LyX-Developers, So, after working on the Side Caption style, I got excited and thought that I would try and make an "epigraph" style for memoir and my custom class. The epigraph command allows the enterprising author to add a quotation to their document prior to the start of the chapter (see page 249 of the memoir manual). It takes arguments: \epigraph{text}{source} Here is my layout definition that would enable this for the memoir class: Style Epigraph CategorySpecial_Commands Margin Static LatexType command LatexName lyxepigraph RequiredArgs1 NextNoIndent1 LeftMargin MMM RightMargin MMM TopSep 0.5 ParSep 0.5 BottomSep 0.5 Align Block AlignPossible Block, Left, Right, Center LabelType No_Label HTMLTag epigraph HTMLItemp Font Family Roman Shape Italic EndFont Preamble \newcommand{\lyxepigraph}[2]{\epigraph{#2}{#1}} End Preamble End The preamble line is necessary because LyX places required arguments added through the "opt" inset before paragraph text. The memoir epigraph command takes first the paragraph text and then the source. Like in the case of the last example, is there a way to create a custom "opt" inset that could have "Epigraph Source" for the label and could be added from "Insert > Custom > Epgraph Source". I wasn't able to find a readily obvious answer. Cheers, Rob
Re: Title placement and font size
> How can I set the title placement on the first page of my > article and > its font size? > > I have some requirements from a workshop that wants the > title to start at > 3.49 cm from the top of the page and in 14pt font. For handle chapter titles you can use titlesec package. I don't know if handle title of article. Marcelo
Re: Title placement and font size
On Thursday 10 March 2011 14:36:00 Marcelo Acuña wrote: > > How can I set the title placement on the first page of my > > article and > > its font size? > > > > I have some requirements from a workshop that wants the > > title to start at > > 3.49 cm from the top of the page and in 14pt font. > > For handle chapter titles you can use titlesec package. > I don't know if handle title of article. > > Marcelo This is just one man's opinion, but I never use the document class's features for the front matter. I just use custom environments and ERT (embedded LaTeX) to place all elements of the front matter -- the title, the author, the cover image, the copyright page, the dedication and acknowledgements, the "here's how you use this book", the "about the author", etc. The way I see it, every element of the frontmatter is a one-off thing, and one-off things are ideal for fingerpainting. Once I get into the mainmatter, I'm just the opposite -- no ERT, all environments and character styles, because consistence is the name of the game in the mainmatter. SteveT Steve Litt Recession Relief Package http://www.recession-relief.US Twitter: http://www.twitter.com/stevelitt
Re: Title placement and font size
> > This is just one man's opinion, but I never use the document class's features > for the front matter. I just use custom environments and ERT (embedded LaTeX) > to place all elements of the front matter -- the title, the author, the cover > image, the copyright page, the dedication and acknowledgements, the "here's > how you use this book", the "about the author", etc. The way I see it, every > element of the frontmatter is a one-off thing, and one-off things are ideal > for fingerpainting. I actually go one step further. I crate all of the frontmatter using a matching stylesheet in Scribs. I then add the material using PDFpages. To that end, I also disable the \maketitle macro so that I can still use \author, \title, etc. and have all of my headers and footers look correct. \renewcommand{\maketitle}{}
Re: Title placement and font size
On Thursday 10 March 2011 15:05:03 Rob Oakes wrote: > > This is just one man's opinion, but I never use the document class's > > features for the front matter. I just use custom environments and ERT > > (embedded LaTeX) to place all elements of the front matter -- the title, > > the author, the cover image, the copyright page, the dedication and > > acknowledgements, the "here's how you use this book", the "about the > > author", etc. The way I see it, every element of the frontmatter is a > > one-off thing, and one-off things are ideal for fingerpainting. > > I actually go one step further. I crate all of the frontmatter using a > matching stylesheet in Scribs. I then add the material using PDFpages. > > To that end, I also disable the \maketitle macro so that I can still use > \author, \title, etc. and have all of my headers and footers look correct. > > \renewcommand{\maketitle}{} Pretty slick! I'm gonna do that from now on (diable maketitle, not necessarily build frontmatter in Scribus). The thing is, every eBook I sell is personalized with the customer's name, so it has to be built on the spot, and I'm not sure I want to have that dependent on Scribus as well as LyX/LaTeX. Thanks for the great idea! SteveT Steve Litt Recession Relief Package http://www.recession-relief.US Twitter: http://www.twitter.com/stevelitt
two theorems right after another
Sorry, if this question has been asked a million times already. I don't know how to search for it in the archive. It's probably a simple thing. I want to add a theorem environment and right after that another one. However, whenever I just hit return to enter to the next line, and select "Theorem" from the drop down list in Lyx, nothing changes, there is no "Theorem 2" or something like that. When I hit return again, there is still only one theorem. What can I do? Best Randolf
Re: two theorems right after another
On 03/10/2011 04:25 PM, Randolf Altmeyer wrote: Sorry, if this question has been asked a million times already. I don't know how to search for it in the archive. It's probably a simple thing. I want to add a theorem environment and right after that another one. However, whenever I just hit return to enter to the next line, and select "Theorem" from the drop down list in Lyx, nothing changes, there is no "Theorem 2" or something like that. When I hit return again, there is still only one theorem. What can I do? I always enter a blank line in between them. Make that blank line in the standard environment, and put in, say, an ERT %, and it will be fine. Or you could prove the first result... -- David L. Johnson You will say Christ saith this and the apostles say this; but what canst thou say? -- George Fox.
Re: two theorems right after another
Randolf Altmeyer googlemail.com> writes: > > It's probably a simple thing. I want to add a theorem environment and right after that another one. However, whenever I just hit return to enter to the next line, and select "Theorem" from the drop down list in Lyx, nothing changes, there is no "Theorem 2" or something like that. When I hit return again, there is still only one theorem. > In the environment list, look for the "Separator" environment and stick one between the theorems. Paul
Re: REVTeX4 Again
On 10/03/2011 11:05 AM, Bruce Pourciau wrote: I'm still having problems converting an Article class document (with footnotes and citations) to a REVTeX4 (\documentclass[12pt,aps,prb,preprint]{revtex4}) document, where there are no footnotes, but citations and comments appear together in endnotes. I selected REVTeX4 and put the options 12pt,aps,prb,preprint into the Custom field. But even trying to convert the simplest test document in the Article class, I can't see how to get page numbers into a citation (using the "text after" puts the page numbers into the body text, rather than the endnote entry). Yes, the behavior you mention is intended; "text after" is meant to appear in the text. If you want a page range to appear in your bibliography you would enter that info in your .bib file as in: @ARTICLE{Dirac1928a, author = {Dirac, P. A. M.}, title = {The Quantum Theory of the Electron}, journal = {Proc. R. Soc. Lond. A}, year = {1928}, volume = {117}, pages = {610--624}, number = {778} } Also, if I cite the same article a second time, with page numbers this time, I need the citation to appear as endnote 2, like this: 1 cited article 2 See Ref. 1, pp.2--4 (normally you would always have page numbers for an article, but maybe you mean a book) One way to do this would be just to have an endnote with the text "See Ref. [cite ref 1], pp.2--4" in it. Otherwise, you could use Bibtex to do it for you. Assume you had a book, and you refer to different chapters of the book. The usual approach is to have multiple @INBOOK entries in your .bib file with cross-references to a @BOOK entry: @BOOK{Meier1984, booktitle = {Optical Orientation}, year = {1984}, editor = {F. Meier and B.~P. Zakharchenya} } @INBOOK{Dyakonov1984, author = {M.~I. D'yakonov and V.~I. Perel'}, year = {1984}, chapter = {2}, pages = {15--71}, crossref = {Meier1984} } @INBOOK{Pikus1984, author = {G.~E. Pikus and A.~N. Titkov}, year = {1984}, chapter = {3}, pages = {73--131}, crossref = {Meier1984} } etc. Notice the crossref field. It allows Bibtex to fetch additional bibliographic information from the "parent", the actual book. If you reference a number (2, or more) of different chapters from the same book, Bibtex will automatically insert the book as entry 1. in your list of references and will have entries like 1. The book. 2. In Ref. 1, pp. 15--71. 3. In Ref. 1, pp. 73--131. Of course you can also refer to the book directly, too. To see the format I'm striving for, one could go to http://ajp.aapt.org/resource/1/ajpias/v79/i3/p261_s1 and download the pdf of the short Dirac article. (no need for the two-column at this point) I'd really like to do the conversion from within LyX, because there will be further editing which will be hard for me to manage if I have to make those edits directly on the LaTeX file. Any help or suggestions would be appreciated. Bruce -- Julien
Re: REVTeX4 Again
On Mar 10, 2011, at 4:37 PM, Julien Rioux wrote: On 10/03/2011 11:05 AM, Bruce Pourciau wrote: I'm still having problems converting an Article class document (with footnotes and citations) to a REVTeX4 (\documentclass[12pt,aps,prb,preprint]{revtex4}) document, where there are no footnotes, but citations and comments appear together in endnotes. I selected REVTeX4 and put the options 12pt,aps,prb,preprint into the Custom field. But even trying to convert the simplest test document in the Article class, I can't see how to get page numbers into a citation (using the "text after" puts the page numbers into the body text, rather than the endnote entry). Yes, the behavior you mention is intended; "text after" is meant to appear in the text. If you want a page range to appear in your bibliography you would enter that info in your .bib file as in: @ARTICLE{Dirac1928a, author = {Dirac, P. A. M.}, title = {The Quantum Theory of the Electron}, journal = {Proc. R. Soc. Lond. A}, year = {1928}, volume = {117}, pages = {610--624}, number = {778} } Also, if I cite the same article a second time, with page numbers this time, I need the citation to appear as endnote 2, like this: 1 cited article 2 See Ref. 1, pp.2--4 (normally you would always have page numbers for an article, but maybe you mean a book) One way to do this would be just to have an endnote with the text "See Ref. [cite ref 1], pp.2--4" in it. Otherwise, you could use Bibtex to do it for you. Assume you had a book, and you refer to different chapters of the book. The usual approach is to have multiple @INBOOK entries in your .bib file with cross-references to a @BOOK entry: @BOOK{Meier1984, booktitle = {Optical Orientation}, year = {1984}, editor = {F. Meier and B.~P. Zakharchenya} } @INBOOK{Dyakonov1984, author = {M.~I. D'yakonov and V.~I. Perel'}, year = {1984}, chapter = {2}, pages = {15--71}, crossref = {Meier1984} } @INBOOK{Pikus1984, author = {G.~E. Pikus and A.~N. Titkov}, year = {1984}, chapter = {3}, pages = {73--131}, crossref = {Meier1984} } etc. Notice the crossref field. It allows Bibtex to fetch additional bibliographic information from the "parent", the actual book. If you reference a number (2, or more) of different chapters from the same book, Bibtex will automatically insert the book as entry 1. in your list of references and will have entries like 1. The book. 2. In Ref. 1, pp. 15--71. 3. In Ref. 1, pp. 73--131. Of course you can also refer to the book directly, too. To see the format I'm striving for, one could go to http://ajp.aapt.org/resource/1/ajpias/v79/i3/p261_s1 and download the pdf of the short Dirac article. (no need for the two-column at this point) I'd really like to do the conversion from within LyX, because there will be further editing which will be hard for me to manage if I have to make those edits directly on the LaTeX file. Any help or suggestions would be appreciated. Bruce -- Julien Thank you, Julien. That's very helpful. But iyour description makes it seem like there's no way to make these formatting changes from within LyX, starting from a document already formatted in the Article class. Is that right? If I were starting in LyX with a document in the class [12pt,aps,prb,preprint]{revtex4}, could one make that document follow the formatting you have described above, from within LyX? Bruce
Change Section Style using a Module
Hi, Am working on my thesis using the "book" Document Class in Lyx. Everything in the book Class works for me except the style of the sections and subsections, i need to change the size from Large to Normal, also i want a different space between the section and the text following. I've been reading about the modules and i think its the best way to make the changes that i want, i tried the following code: #\DeclareLyXModule{ThesisStyle} #DescriptionBegin #Change Section Style #DescriptionEnd Format 11 Style Section Category Section MarginDynamic LabelTypeCounter LabelCountersection TocLevel 1 LatexType Command LatexName section NeedProtect 1 NextNoIndent 1 LabelSep xxx ParSkip 0.4 TopSep1.3 BottomSep 0.7 ParSep0.7 Align Left OptionalArgs 1 Font Series Bold SizeNormal EndFont End The code changes the font size in Lyx but doesn't change anything in the PDF. Any help would be greatly appreciated. Thanks, Raúl
Re: REVTeX4 Again
On 10/03/2011 5:58 PM, Bruce Pourciau wrote: Thank you, Julien. That's very helpful. But iyour description makes it seem like there's no way to make these formatting changes from within LyX, starting from a document already formatted in the Article class. Is that right? If I were starting in LyX with a document in the class [12pt,aps,prb,preprint]{revtex4}, could one make that document follow the formatting you have described above, from within LyX? Bruce I am not sure I understand. How do you enter your citations in your document? Bibtex requires some extra care, but when you do a "view > PDF", LyX will perform the necessary extra steps for you. So yes you can do these changes within LyX and with any document class. I wasn't very clear in that I didn't mention how LyX uses Bibtex: At the end of your document, you would insert a BibTex database inset (using the insert menu in Lyx). You need a .bib file, which is a database of bibliographic data in the specific bibtex format. Then, throughout your text you insert citations using the insert menu. Cheers, Julien