Hello
Can I define the name of the file _inside_ a tex file ? And save the newfile with the given filename . Possible?
thanks Greetings
Alain Matthes
On 29/9/2006, at 17:30, Alain Matthes wrote:
Can I define the name of the file _inside_ a tex file ? And save the newfile with the given filename . Possible?
Could you elaborate?
Is this something like, you do ⌘N (new untitled document), then you put e.g. \title{Name of my Document} in this file, and you want ⌘S to not prompt for a filename, but instead base it on ‘Name of my Document’?
Le 29 sept. 06 à 17:52, Allan Odgaard a écrit :
On 29/9/2006, at 17:30, Alain Matthes wrote:
Can I define the name of the file _inside_ a tex file ? And save the newfile with the given filename . Possible?
Could you elaborate?
Is this something like, you do ⌘N (new untitled document), then you put e.g. \title{Name of my Document} in this file, and you want ⌘S to not prompt for a filename, but instead base it on ‘Name of my Document’?
Hello Allan (thanks for your great soft !)
Something like that or I put % nameofthefile at the begining of my document then i select the word and with a command(script) i can save the file with nameofthefile
or In the Save dialogue window should not appear « New File » in the file name field but the given nameofthefile. Possible?
Perhaps a shell varaible for a another expression that « New File » it's interesting when we creat a lot of little files with the same prefix.
Sorry foy my bad english
Greetings
Alain Matthes
Hi Alain, On Sep 29, 2006, at 1:10 PM, Alain Matthes wrote:
Something like that or I put % nameofthefile at the begining of my document then i select the word and with a command(script) i can save the file with nameofthefile
I can't think of a particularly elegant way to do this particular task, but perhaps you could give us some more general idea of what you would like to do in general? The way I would create files with given names is probably by calling the `mate` command line too, providing it the path to the filename. For instance, doing `mate thisfile.tex` will create a new file in the current directory, named thisfile.tex, and open it for editing in textmate. This command could be called from within TextMate commands, so we could do something potentially useful to you, but not exactly what you describe very easily. What could be done is, looking at your first line and finding it to be a filename, create a new file with that filename and write in it everything that the current document contains. But the current document will still sort of remain there.
So basically there's a lot of things that can be done similar to what you are trying to do, which might help you solve your original problem, which we could perhaps suggest if we knew what your actual goal is. In other words, I would suggest asking us a slightly more general question, describing your overall goal.
Haris
Le 29 sept. 06 à 19:34, Charilaos Skiadas a écrit :
So basically there's a lot of things that can be done similar to what you are trying to do, which might help you solve your original problem, which we could perhaps suggest if we knew what your actual goal is. In other words, I would suggest asking us a slightly more general question, describing your overall goal.
Hi haris,
I will try to be more precise but the english language is difficult for me. I want to have, when I compose a document .tex, the capacity to select a word and to save the current document with this word in .tex. It is possible to refine with a prefix which would be to give in a Shell Variable. For example I work for my students on the statistics and want to be able to create as soon as possible in TextMate, the documents with for name: stat_gauss_1.tex, stat_gauss_2.tex etc.. I imagine that 's possible with a script but perhaps i'm wrong
Greetings Alain