Georg Baum wrote:
Richard Heck wrote:Susanne Gütter wrote:I have many files, which I print and after a few weeks, I have work to find the corresponding files, if I don't label my papers manually. Is there any way to label it not manually (like it is possible in other office-programms) ?There probably is some LaTeX command that holds the name of the source file. You could include in various ways. But, as Helge mentioned earlier, what you'll end up getting is the name of the temporary file to which LyX exports the LaTeX, not the name of the LyX file you're trying to print.That name does not differ from your document name, only with the ending .tex instead of .lyx. The directory part will be different (it will be some temporary directory), so if you do not have documents with the same name in different directories, then such a LaTeX command would indeed work.You could file an enhancement request on bugzilla. But remember that LyX isn't really an "office program". It's a front-end to LaTeX, which is a professional quality typesetting program.Nevertheless it would be a useful feature to be able to put the document file name in some footer or so, so an enhancement request in bugzilla would be no bad idea. Georg
If you are using RCS or CVS to version control your files (version control is a GOOD thing) you can get close to what you want (I think) with some LaTeX in your preamble and in ERTs. I got this info from the list in the past. see the attached file for an example use.
% RCS style.
\def\RCSdef $#1${\typeout{RCS keyword string: [EMAIL PROTECTED]: {} :.}
[EMAIL PROTECTED]: #2 :#3.{\expandafter\def\csname RCS#1\endcsname{#2}}
%Then, in your document (or in your preamble), do:
\RCSdef $Revision: 1.1 $
\RCSdef $Date: 2006/09/08 13:12:08 $
\RCSdef $RCSfile: junk.lyx,v $
% use the following lines(uncommented) in ERT to get the revision and date put
in text
% \RCSRevision % \RCSDate % \RCSRCSfile % End RCS style.Note I think you might be able to define a slightly different set of \RCSdef commands that might be able to take the ',v' off the file name, I just don't know the LaTeX to do it quickly.
Note also that it looks like you can use the above LaTeX code with any of the RCS keywords. I also think that if you preferred some other VC system and it provides keywords you could modify the above to work with it.
-- Todd Denniston Crane Division, Naval Surface Warfare Center (NSWC Crane) Harnessing the Power of Technology for the Warfighter
junk.lyx
Description: application/lyx
