How to specify a copier that also copies subdirectories?
Hello, I have a format (TeX, or R files generated using sweave) where there could be associated files generated in subdirectories. I have set up a copier for my formats: LaTeX -> python -tt $$s/scripts/ext_copy.py -e tex,aux,bib,bst,sty,eps,pdf $$i $$o R -> python -tt $$s/scripts/ext_copy.py -e R,r,Rd $$i $$o It works well, except it ignores files in subdirectories. Is there an option to copy also files from subdirectories (maintaining the subdirectory structure) too? Also, it seems files are not cleared from the temporary dir between each compilation of the LyX file. So, sometimes, I got old files copied too. Is it an option to clean the temp dir before each run? Best, Philippe -- ..<°}))>< ) ) ) ) ) ( ( ( ( ( Prof. Philippe Grosjean ) ) ) ) ) ( ( ( ( (Numerical Ecology of Aquatic Systems ) ) ) ) ) Mons-Hainaut University, Belgium ( ( ( ( ( ..
Defining external material product on several lines
Using LyX 1.6.3 Mac OS X, I am not able to define Product on several lines (as the example in the Customization manual). Here is my definition: Template Rcode GuiName "R code: $$FName" HelpText Insert R code inside a R-Chunk (Sweave document). HelpTextEnd InputFormat R FileFilter "*.{R,r}" AutomaticProduction false Preview Off Transform Extra [...] Format Ascii TransformOption Extra ExtraOption Option Pre "<<$$Extra>>=" Product "$$Pre $$Contents(\"$$AbsPath$$Basename$$Extension\") @" FormatEnd TemplateEnd Using this, I got only the string equivalent to $$Pre printed in my document. If I put everything on one line, that is: Product "$$Pre$$Contents(\"$$AbsPath$$Basename$$Extension\")@" it works fine (except the '@' that is not printed)... except I need to include line feed between the three elements for correct noweb formatting of my output! May be is it an alternate way to include line feed or @ in the product (I have testes \n and \@ without success)? Best, PhG -- ..<°}))>< ) ) ) ) ) ( ( ( ( (Prof. Philippe Grosjean ) ) ) ) ) ( ( ( ( (Numerical Ecology of Aquatic Systems ) ) ) ) ) Mons-Hainaut University, Belgium ( ( ( ( ( ..
Re: New style with similar properties as listings?
As a temporary workaround to get tabs available, I redefine: \bind "Tab" "command-alternatives completion-accept;cell-forward;tab-insert;depth-increment;outline-in;self-insert " with last command being self-insert \t (the actual tabulation). I have tried unicode-insert 0x0009, but it does not work. This is not as good as tab-insert/tab-delete, but will do the job for now... Best, PhG Philippe Grosjean wrote: I would love to see this feature added in the next LyX version. Many thanks, PhG rgheck wrote: Jean-Marc Lasgouttes wrote: LFUN_TAB_INSERT currently only works with listings. You might be able to redo the bindings so that the tab key would insert a tab, perhaps via unicode-insert and then the tab character, but I'm not sure. This probably that this code should be made more generic and usable in custom insets... I am not sure how difficult this would be. Fairly easy, I think. The attached basically just moves the code from InsetListings to InsetCollapsable and tests against PassThru. I haven't actually tested it but can't see how it wouldn't work. rh
Re: New style with similar properties as listings?
I would love to see this feature added in the next LyX version. Many thanks, PhG rgheck wrote: Jean-Marc Lasgouttes wrote: LFUN_TAB_INSERT currently only works with listings. You might be able to redo the bindings so that the tab key would insert a tab, perhaps via unicode-insert and then the tab character, but I'm not sure. This probably that this code should be made more generic and usable in custom insets... I am not sure how difficult this would be. Fairly easy, I think. The attached basically just moves the code from InsetListings to InsetCollapsable and tests against PassThru. I haven't actually tested it but can't see how it wouldn't work. rh
Re: New style with similar properties as listings?
I am progressing... I have now defined a custom layout: InsetLayout Schunk LyxType custom LabelString <<>>=... LatexType none Decorationminimalistic Font Family typewriter Color latex Sizesmall EndFont LabelFont Family typewriter Color latex Series Bold Sizesmall EndFont BgColor listingsbg MultiPar true PassThru true KeepEmpty true FreeSpacing true ForceLTR true ForcePlaintrue End This solves my problem with respect of line feed. However, I cannot tab/backtab in this environment. LyX says "command disabled" when I try tab-insert or tab-delete commands. How can I activate these commands in my layout, sa it is in listings? Thanks in advance. Best, PhG Philippe Grosjean wrote: Uwe Stöhr wrote: Philippe Grosjean schrieb: I am defining a new style that should contain some program code. I would like to get the same behavior as listings, i.e., keep line feed and allow entering tabulation. Is it a way to define my style so that it behaves that way? I don't understand. What you want is what listings provide. What do you miss with listings? regards Uwe No, I want the same behavior as listings, but for other purposes that do not fit in it. Actually, I define a Schunk environment for using Sweave (literate programming). Thus, the content is evaluated in R and should not appear in a listing. Yet, I would like to get the same convenience for editing my R code inside LyX as I got in listings (keep line feed and use tabulations). Thanks for your help. Philippe
Re: New style with similar properties as listings?
Uwe Stöhr wrote: Philippe Grosjean schrieb: I am defining a new style that should contain some program code. I would like to get the same behavior as listings, i.e., keep line feed and allow entering tabulation. Is it a way to define my style so that it behaves that way? I don't understand. What you want is what listings provide. What do you miss with listings? regards Uwe No, I want the same behavior as listings, but for other purposes that do not fit in it. Actually, I define a Schunk environment for using Sweave (literate programming). Thus, the content is evaluated in R and should not appear in a listing. Yet, I would like to get the same convenience for editing my R code inside LyX as I got in listings (keep line feed and use tabulations). Thanks for your help. Philippe
New style with similar properties as listings?
Hello, I am defining a new style that should contain some program code. I would like to get the same behavior as listings, i.e., keep line feed and allow entering tabulation. Is it a way to define my style so that it behaves that way? Thanks, Philippe Grosjean -- ..<°}))>< ) ) ) ) ) ( ( ( ( ( Prof. Philippe Grosjean ) ) ) ) ) ( ( ( ( (Numerical Ecology of Aquatic Systems ) ) ) ) ) Mons-Hainaut University, Belgium ( ( ( ( ( ..
Re: Sweave code full of escape codes when printed?
1) Have you placed your code in an ERT (Tex code)? 2) Did you enclose it with the required tags for noweb (INSIDE de ERT), i.e., <<>>= library (car) cabbages$Year<-recode(cabbages$Year,'"X2001"="2001";"X2002"="2002";"X2003"="2003"; etc @ 3) Did you run Sweave on the Noweb version produced? Best, Philippe Grosjean Graham Smith wrote: I've started using Sweave and having a problem The code in Lyx is library (car) cabbages$Year<-recode(cabbages$Year,'"X2001"="2001";"X2002"="2002";"X2003"="2003"; etc But its appearing in the PDF as > cabbages$Year <- recode(cabbages$Year, "\"X2001\"=\"2001\";\"X2002\"=\"2002\";\"X2003\"=\"2003\";\ etc And obviously isn't working as printing out incorrectly. Can anyone suggest what is happening here. Many thanks, Graham
forward search?
Hello, I have set up the reverse DVI/PDF search feature. However, I would like to do the opposite: forward search (indicate the same position in the DVI/PDF as where is the cursor in the LyX document). Is it a mean to associate a key combination to trigger it? I could work with the lyx server, but I miss a function that indicates me the line in the tex file corresponding to the position of the cursor in LyX. I imagine that such information could be accessible, since server-goto-file-row is capable of doing the opposite (from Tex line to LyX line). In case this function does not exists, would it be possible to develop it for next LyX version? Thanks, Philippe -- ..<°}))>< ) ) ) ) ) ( ( ( ( ( Prof. Philippe Grosjean ) ) ) ) ) ( ( ( ( (Numerical Ecology of Aquatic Systems ) ) ) ) ) Mons-Hainaut University, Belgium ( ( ( ( ( ..
Re: [Figure embedding] An easy way to share lyx documents
OpenOffice does that with the Open Document format (.odx). Java does that with JARs, Mozilla does that with plugins, ... Everytime it is the same: a zipped directory tree. Perhaps, such a format (kind of .zlyx) could be purely optional? It shouldn't replace the original format. That way, opponents could use their usual .lyx files and place their figures where they like. I would be very happy to get such a feature! Best, Philippe Grosjean ..<°}))>< ) ) ) ) ) ( ( ( ( (Prof. Philippe Grosjean ) ) ) ) ) ( ( ( ( (Numerical Ecology of Aquatic Systems ) ) ) ) ) Mons-Hainaut University, Belgium ( ( ( ( ( .. Richard Heck wrote: Etienne lepercq wrote: I am new to LyX, but not as new to LaTeX : I used Kile for quiet a few time now. I would like to use LyX to work with several people on an article. As LyX is much more user-friendly than Kile, a pure LaTeX editor, I convinced my collaborators to give a try to LyX. There is te least one thing in LyX (and LaTeX) that is not easy to handle, sharing a whole document to make it modifiable by others : one have to build an archive with all figures and latex source, collaborators have to untar it, open LyX, read/modify/etc... and then... rebuild archive, send the archive, etc... This is counter-productive, not easy to use, it is a pain. One simple solution I see for this is to give the ability to LyX to open, say .tar archives, with a specific tree inside (.yx sources, then figures/allFigures.Whatever or something). Such archive could be called .lyxZ files ;-) Does such feature exist already ? I searched over FAQ/Documentation/Asked on #LyX but did not find anything more than : two implementations were made once, but as nobody could say which was the best... none were released !! This is not _that_ complex to implement, but is there a way to have such feature now, or is there a way to at least release one relatively-good implementation ? I agree with you that there is a way to do this that makes it quite simple, both to implement and to use. But it imposes restrictions on where you can put files, since you can't (and don't want to) untar to arbitrary locations in the filesystem. This bothered some people. And so it was disagreements over how to manage these sorts of issues that led to our not releasing anything. To my mind, this was a perfect example of the good being sacrificed for the non-existent best, but, well, I'd really rather not have that battle again. So, at present, the tar-untar routine is about all we can do. That said, if enough USERs thought the kind of facility you have mentioned here was worth implementing, I'd be willing to resurrect the work I did before and make it functional. Richard
Re: Configure Lyx, R, Sweave on OS X
mikeandkatedunbar wrote: I am trying to get up and running with Lyx and R, using Sweave I have achieved this on my Windows XP PC at work with MikTex. Great. HOWEVER On my Mac (OSX 10.4.7 with MacTex 2008 installed) I have come up against a “brick wall” Lyx 1.6 is installed and I can generate dvi files from simple example .lyx files R 2.8 is installed, I am up to the stage where R CMD Sweave foo.Rnw works, as does Latex foo.tex kpsewhich Sweave.sty confirms that Latex can find Sweave.sty I have followed the instructions in http://cran.r-project.org/contrib/extra/lyx/INSTALL and copied files to the relevant locations into \users\me\Library\Application Support\Lyx-1.6 And reconfigured / restarted Lyx But whenever I open a test file such as http://cran.r-project.org/contrib/extra/lyx/Sweave-test-1.lyx I get the same old message “The layout file requested by this document, literate-article.layout, is not usable. This is probably because a LaTeX class or style file required by it is not available. ” This does not appear to be a problem with Sweave.sty (at least, not directly). It is your literate-article.layout which cannot be found, is corrupted, or is incompatible with the new LyX 1.6 version. Have you tried with LyX 1.5.7? It seems like Lyx cannot find Sweave.sty, event though Latex can find it. I'm at my wits end, so any advice on how to troubleshoot this would be very much appreciated. While I'm quite familiar with R, Lyx is very new to me. Regards Mike Best, Philippe Grosjean
file-insert with ~ in the path
Hello, I would like to set up a directory with little snippets to insert in LyX documents. These "snippets" are small .lyx files located, let's say, in ~/LyXsnippets. I would like my menu and toolbar entries to be portable (different users, different OSes). That's why I don't use /Users/phgrosjean/LyXsnippets (on my Mac) for instance. Unfortunately, it seems that the "file-insert" command does not expand ~, and it cannot use environment variables too. So, how can I do that? Any hint? Also, there is problem with the slash in the name of the toolbar button icon under Windows. I suppose I should use a .def file and the "call" command, but I cannot make it run. Any hint welcome too. I use LyX 1.5.6 under Mac OS X 10.4 / Windows XP sp2 / Ubuntu Hardy Heron. Thanks, Philippe Grosjean -- View this message in context: http://n2.nabble.com/file-insert-with-%7E-in-the-path-tp781832p781832.html Sent from the LyX - Users mailing list archive at Nabble.com.