Re: does my module require a package?
OK, but how does this work on the first string you encounter? I.e., we have something like: lex.setFile(...) while (lex.isOK()) { s = lex.getString(); lex.next(true); } but will this work the first time? It i strange that we do not need to start with a lex.next()... But Lexer is strange anyway. JMarc
Re: does my module require a package?
Jean-Marc Lasgouttes wrote: The parser for this file just uses LyX's general-purpose lexer. Apparently, it does not know about escaped quotes. Of course it does (when you ask nicely). Lexer::next(true) should do the trick. OK, but how does this work on the first string you encounter? I.e., we have something like: lex.setFile(...) while (lex.isOK()) { s = lex.getString(); lex.next(true); } but will this work the first time? I don't think we need it for the present issue. rh
Re: does my module require a package?
The parser for this file just uses LyX's general-purpose lexer. Apparently, it does not know about escaped quotes. Of course it does (when you ask nicely). Lexer::next(true) should do the trick. JMarc
Re: does my module require a package?
On 2009-05-27, rgheck wrote: > Guenter Milde wrote: Problem: spurious "module requires package" popups for a home-made module. Reason: >> quotes in the description text are not escaped. > The parser for this file just uses LyX's general-purpose lexer. > Apparently, it does not know about escaped quotes. I see. But why is it used for parsing a comment? As this is not obvious (the description text is a comment in the *.module source file), documenting that you must not use "double quotes" in the module description would help prevent such surprises. Günter
Re: does my module require a package?
Guenter Milde wrote: It is this: "fancybreak" "fancybreak" "Define FancyBreak style for "breaks" or "transitions" between paragraphs. Separate pragraphs with some ornaments or simple vertical space. This is usually used for gaps in the narrative (also called a "transition"), e.g. love scenes left out in older novels or to start a new section without a section header (also called an "anonymous section")." "" "" "" and I believe the reason is that quotes in the description text are not escaped. (compare with e.g. "leftalign" "leftalign" "Left align text (instead of block align; on screen)." "" "" "" ) However, escaping as \" did not help, removing the quotes solved the problem. Thanks for pointing me in the right direction, Sure. The parser for this file just uses LyX's general-purpose lexer. Apparently, it does not know about escaped quotes. Richard
Re: does my module require a package?
Stefano Franchi wrote: On Tuesday 26 May 2009 05:46:55 pm rgheck wrote: Stefano Franchi wrote: On Tuesday 26 May 2009 08:59:10 am rgheck wrote: Guenter Milde wrote: Dear List, whenever I load a file that loads the following package, I get a popup-window warning me that I am missing a package: Das Modul fancybreak benötigt ein Paket, das in Ihrer LaTeX-Installation nicht enthalten ist. LaTeX wird wahrscheinlich keine Ausgabe erzeugen. Luckily, LaTeX does produce an output file, but the multiple warnings (when opening a project with several children using the module) are still annoying. What am I doing wrong? LyX 1.6.2 on Linux. Hmm. Can you post your lyxmodules.lst file? Actually, what I want to see is just the line of that file for this module. rh I am experiencing exactly the same problem (same symptom, same perfect pdf output) in a minimilastic module I wrote to make comments show up within a grayed out box. The Latex code works fine if I put it in the Document preable. When I transfer the same code to a module (including the \usepackage declarations), LyX complain on loading it that a package is missing Whenever a solution to Guenter's problem is offered, I'll try it out on my case too and report back. Can you also find the relevant line in your lyxmodules.lst file? Or just post the whole thing? Richard Sure, here it is: "Comments-in-box" "Comment-in-box" "Shows comments in a gray box " "colortbl,tabularx" "" "" LyX thinks your module requires colortbl and tabularx. But it can only check for packages it knows about, and I don't think it knows about these. So just remove the dependencies. Richard
Re: does my module require a package?
On 2009-05-26, rgheck wrote: > Guenter Milde wrote: >> Dear List, >> whenever I load a file that loads the following package, I get a >> popup-window warning me that I am missing a package: ... > Hmm. Can you post your lyxmodules.lst file? Actually, what I want to see > is just the line of that file for this module. It is this: "fancybreak" "fancybreak" "Define FancyBreak style for "breaks" or "transitions" between paragraphs. Separate pragraphs with some ornaments or simple vertical space. This is usually used for gaps in the narrative (also called a "transition"), e.g. love scenes left out in older novels or to start a new section without a section header (also called an "anonymous section")." "" "" "" and I believe the reason is that quotes in the description text are not escaped. (compare with e.g. "leftalign" "leftalign" "Left align text (instead of block align; on screen)." "" "" "" ) However, escaping as \" did not help, removing the quotes solved the problem. Thanks for pointing me in the right direction, Günter
Re: does my module require a package?
On Tuesday 26 May 2009 05:46:55 pm rgheck wrote: > Stefano Franchi wrote: > > On Tuesday 26 May 2009 08:59:10 am rgheck wrote: > >> Guenter Milde wrote: > >>> Dear List, > >>> > >>> whenever I load a file that loads the following package, I get a > >>> popup-window warning me that I am missing a package: > >>> > >>> Das Modul fancybreak benötigt ein Paket, das in > >>> Ihrer LaTeX-Installation nicht enthalten ist. > >>> LaTeX wird wahrscheinlich keine Ausgabe erzeugen. > >>> > >>> Luckily, LaTeX does produce an output file, but the multiple warnings > >>> (when opening a project with several children using the module) are > >>> still annoying. > >>> > >>> What am I doing wrong? > >>> > >>> LyX 1.6.2 on Linux. > >> > >> Hmm. Can you post your lyxmodules.lst file? Actually, what I want to see > >> is just the line of that file for this module. > >> > >> rh > > > > I am experiencing exactly the same problem (same symptom, same perfect > > pdf output) in a minimilastic module I wrote to make comments show up > > within a grayed out box. The Latex code works fine if I put it in the > > Document preable. When I transfer the same code to a module (including > > the \usepackage declarations), LyX complain on loading it that a package > > is missing > > > > Whenever a solution to Guenter's problem is offered, I'll try it out on > > my case too and report back. > > Can you also find the relevant line in your lyxmodules.lst file? Or just > post the whole thing? > > Richard Sure, here it is: "Comments-in-box" "Comment-in-box" "Shows comments in a gray box " "colortbl,tabularx" "" "" S. __ Stefano Franchi Department of Philosophy Ph: (979) 862-2211 Texas A&M University Fax: (979) 845-0458 305B Bolton Hall fran...@philosophy.tamu.edu College Station, TX 77843-4237
Re: does my module require a package?
Stefano Franchi wrote: On Tuesday 26 May 2009 08:59:10 am rgheck wrote: Guenter Milde wrote: Dear List, whenever I load a file that loads the following package, I get a popup-window warning me that I am missing a package: Das Modul fancybreak benötigt ein Paket, das in Ihrer LaTeX-Installation nicht enthalten ist. LaTeX wird wahrscheinlich keine Ausgabe erzeugen. Luckily, LaTeX does produce an output file, but the multiple warnings (when opening a project with several children using the module) are still annoying. What am I doing wrong? LyX 1.6.2 on Linux. Hmm. Can you post your lyxmodules.lst file? Actually, what I want to see is just the line of that file for this module. rh I am experiencing exactly the same problem (same symptom, same perfect pdf output) in a minimilastic module I wrote to make comments show up within a grayed out box. The Latex code works fine if I put it in the Document preable. When I transfer the same code to a module (including the \usepackage declarations), LyX complain on loading it that a package is missing Whenever a solution to Guenter's problem is offered, I'll try it out on my case too and report back. Can you also find the relevant line in your lyxmodules.lst file? Or just post the whole thing? Richard
Re: does my module require a package?
On Tuesday 26 May 2009 08:59:10 am rgheck wrote: > Guenter Milde wrote: > > Dear List, > > > > whenever I load a file that loads the following package, I get a > > popup-window warning me that I am missing a package: > > > > Das Modul fancybreak benötigt ein Paket, das in > > Ihrer LaTeX-Installation nicht enthalten ist. > > LaTeX wird wahrscheinlich keine Ausgabe erzeugen. > > > > Luckily, LaTeX does produce an output file, but the multiple warnings > > (when opening a project with several children using the module) are still > > annoying. > > > > What am I doing wrong? > > > > LyX 1.6.2 on Linux. > > Hmm. Can you post your lyxmodules.lst file? Actually, what I want to see > is just the line of that file for this module. > > rh I am experiencing exactly the same problem (same symptom, same perfect pdf output) in a minimilastic module I wrote to make comments show up within a grayed out box. The Latex code works fine if I put it in the Document preable. When I transfer the same code to a module (including the \usepackage declarations), LyX complain on loading it that a package is missing Whenever a solution to Guenter's problem is offered, I'll try it out on my case too and report back. S. __ Stefano Franchi Department of Philosophy Ph: (979) 862-2211 Texas A&M University Fax: (979) 845-0458 305B Bolton Hall fran...@philosophy.tamu.edu College Station, TX 77843-4237
Re: does my module require a package?
Guenter Milde wrote: Dear List, whenever I load a file that loads the following package, I get a popup-window warning me that I am missing a package: Das Modul fancybreak benötigt ein Paket, das in Ihrer LaTeX-Installation nicht enthalten ist. LaTeX wird wahrscheinlich keine Ausgabe erzeugen. Luckily, LaTeX does produce an output file, but the multiple warnings (when opening a project with several children using the module) are still annoying. What am I doing wrong? LyX 1.6.2 on Linux. Hmm. Can you post your lyxmodules.lst file? Actually, what I want to see is just the line of that file for this module. rh
does my module require a package?
Dear List, whenever I load a file that loads the following package, I get a popup-window warning me that I am missing a package: Das Modul fancybreak benötigt ein Paket, das in Ihrer LaTeX-Installation nicht enthalten ist. LaTeX wird wahrscheinlich keine Ausgabe erzeugen. Luckily, LaTeX does produce an output file, but the multiple warnings (when opening a project with several children using the module) are still annoying. What am I doing wrong? LyX 1.6.2 on Linux. Günter #\DeclareLyXModule{fancybreak} #DescriptionBegin #Define FancyBreak style for "breaks" or "transitions" between paragraphs. # #Separate pragraphs with some ornaments or simple vertical space. #This is usually used for gaps in the narrative (also called a "transition"), #e.g. love scenes left out in older novels #or to start a new section without a section header #(also called an "anonymous section"). #DescriptionEnd # Author: Günter Milde Format 11 # Modelled after the fancybreak in the memoir LaTeX document class. # Changes: no starred version, 1/2 baselineskip above and below. Style FancyBreak LatexName fancybreak LatexType command ParSep 1 NextNoIndent1 KeepEmpty 1# allow for plain break Align Center AlignPossible Center LabelString "break" LeftMargin "break" LabelType Static LabelSepx LabelFont SeriesMedium Shape Italic Size Small Color magenta EndFont Preamble \providecommand{\fancybreak}[1]{\par \penalty -100 \vskip 0.5\baselineskip \noindent\parbox{\linewidth}{\centering #1}\null \penalty -20 %% \vskip -\onelineskip \vskip 0.5\baselineskip \...@afterindentfalse \...@afterheading} EndPreamble End