Hello
When I choose from the bundle Latex > Edit Configuration File
The in TextMate opening file is rather confusing. When I open this file in Proprety List Editor ists clear, but in TextMate its rather cryptic ...
Is there something wring with my configuration, or is that normal. Also I dont know, how to actually use this file.
Thanks
David
On 11/21/06, David Fritschi david.fritschi@gmx.ch wrote:
The in TextMate opening file is rather confusing. When I open this file in Proprety List Editor ists clear, but in TextMate its rather cryptic ...
It's a binary file. There is however a command in the Property List bundle with which you can convert it to a readable form: "Convert to Old-Style ASCII".
So there is nothing wrong with your configuration.
Thomas
Le 21 nov. 06 à 10:41, David Fritschi a écrit :
Hello
When I choose from the bundle Latex > Edit Configuration File
The in TextMate opening file is rather confusing. When I open this file in Proprety List Editor ists clear, but in TextMate its rather cryptic ...
Is there something wring with my configuration, or is that normal. Also I dont know, how to actually use this file.
Thanks
i've the same problem and i don't understand "configuration File of what" Where is in the doc ?
Alain
Quoting Alain Matthes alain.matthes@mac.com:
Le 21 nov. 06 à 10:41, David Fritschi a écrit :
Hello
When I choose from the bundle Latex > Edit Configuration File
The in TextMate opening file is rather confusing. When I open this file in Proprety List Editor ists clear, but in TextMate its rather cryptic ...
If I open this file with Latex > Edit Configuration File then I see this plist in binary format. It would be better to open Property List Editor or use 'pl' (see more 'man pl') to convert it back to XML
Hans
---------------------------------------------------------------- This message was sent using IMP, the Internet Messaging Program.
Le 21 nov. 06 à 10:41, David Fritschi a écrit :
Hello
When I choose from the bundle Latex > Edit Configuration File
The in TextMate opening file is rather confusing. When I open this file in Proprety List Editor ists clear, but in TextMate its rather cryptic ...
To be more specific here what I meant.
Rewrite 'Edit Config File' in such a way:
MYPLIST=~/Library/Preferences/com.macromates.textmate.latex_config.plist PLE=$(find_app "Property List Editor.app") if [ -n "$PLE" ]; then open -a "Property List Editor" "$MYPLIST" else plutil -convert xml1 "$MYPLIST" mate "$MYPLIST" fi
This tiny bash script checks whether the Property List Editor is installed (it is part of the 'Developer Toolkit'). If yes it opens a plist the this Editor, if not the plist will be converted to xml format and it will be opened via 'mate'.
Attached is the tmCommand as an example.
Cheers,
Hans
---------------------------------------------------------------- This message was sent using IMP, the Internet Messaging Program.
On Nov 21, 2006, at 11:28 AM, Hans-Joerg Bibiko wrote:
Le 21 nov. 06 à 10:41, David Fritschi a écrit :
Hello
When I choose from the bundle Latex > Edit Configuration File
The in TextMate opening file is rather confusing. When I open this file in Proprety List Editor ists clear, but in TextMate its rather cryptic ...
To be more specific here what I meant.
Rewrite 'Edit Config File' in such a way:
There is no need for such rewrite. The file is originally in the old plist format, which is human readable. In fact, if you use the subversion version of the bundle, you will see it in that format without any problems. The "problem" is that part of the deployment phase of a new TM release is to convert all plist files to binary format, for efficiency. Unfortunately, this file also had the same extension, and hence was converted into this gibberish that can't be easily read by human beings. The reason I did not notice this is because I work with the subversion version of the bundle (which is often more uptodate btw). I will make the necessary changes when I get a chance, hopefully soon, so from the next TM release this should show up in a more human readable format. For now, I've attached the file in its proper form, so if you want to fix this, here are the steps:
1) save the attachment somewhere in your computer. 2) In the Finder locate the attachment. 3) In a new Finder window, locate the TextMate application, probably inside the Applications Folder. 4) Right-click (or control-click) and select (Show Package Contents). 5) Follow the folders Contents -> Shared Support -> Bundles, and locate the Latex.tmbundle. 6) Repeat step 4. 7) Enter the Support folder.and see the file latex_config.plist. 8) Drag the file you downloaded and drop it into this folder. Then you will be asked if you want to override the latex_config.plist file. Say yes. 9) You are done!
If you are not afraid of the terminal, you can instead run the one command:
mv path_to_downloaded_file /Applications/TextMate.app/Contents/ SharedSupport/Bundles/Latex.tmbundle/Support/
where the path_to_downloaded_file is the path to where you saved your file. If you saved it on the desktop, it would be ~/Desktop/ latex_config.plist, so the command would be:
mv ~/Desktop/latex_config.plist /Applications/TextMate.app/Contents/ SharedSupport/Bundles/Latex.tmbundle/Support/
Cheers,
Hans
Haris
On Nov 21, 2006, at 11:58 AM, Charilaos Skiadas wrote:
Forgot to attach the file ;)
Hm, actually, all my previous instructions were wrong, the file you want to change is in:
~/Library/Preferences/com.macromates.textmate.latex_config.plist
You would want to save the attachment as the above file. (~ here is your home directory.)
Haris
Haris
Le 21 nov. 06 à 10:41, David Fritschi a écrit :
Hello
When I choose from the bundle Latex > Edit Configuration File
The in TextMate opening file is rather confusing. When I open this file in Proprety List Editor ists clear, but in TextMate its rather cryptic ...
To be more specific here what I meant.
Rewrite 'Edit Config File' in such a way:
There is no need for such rewrite. The file is originally in the old plist format, which is human readable. In fact, if you use the [...]
'Rewrite' was the wrong word. If I work with plist files and 'defaults' sometimes it happens that the plist file is converted to binary format. That's why I wrote such a small bash script to open my plist always in XML. On the other hand I find it quite convenient to ask the Mac whether the Property List Editor is installed and if yes use it.
Cheers,
Hans
---------------------------------------------------------------- This message was sent using IMP, the Internet Messaging Program.
On Nov 21, 2006, at 12:09 PM, Hans-Joerg Bibiko wrote:
'Rewrite' was the wrong word. If I work with plist files and 'defaults' sometimes it happens that the plist file is converted to binary format. That's why I wrote such a small bash script to open my plist always in XML. On the other hand I find it quite convenient to ask the Mac whether the Property List Editor is installed and if yes use it.
The files are in the old plist format, not xml format, because the xml format is not editable by humans, in my opinion. And when you have a wonderful editor like TM, then you want to be using it for editing files ;) Of course, YMMV, but I find the PLE not convenient at all when it comes to editing plist files.
Cheers,
Hans
Haris
'Rewrite' was the wrong word. If I work with plist files and 'defaults' sometimes it happens that the plist file is converted to binary format. That's why I wrote such a small bash script to open my plist always in XML. On the other hand I find it quite convenient to ask the Mac whether the Property List Editor is installed and if yes use it.
The files are in the old plist format, not xml format, because the xml format is not editable by humans, in my opinion.
That's why I use PLE for 'small' plist files, but ...
And when you have a wonderful editor like TM, then you want to be using it for editing files ;)
... this point goes to you ;)
Maybe one should think about to tell TM if it opens a binary plist file to convert it to old style/XML and save it as binary. ;)
Best,
Hans
---------------------------------------------------------------- This message was sent using IMP, the Internet Messaging Program.
On 21. Nov 2006, at 19:11, Hans-Joerg Bibiko wrote:
Maybe one should think about to tell TM if it opens a binary plist file to convert it to old style/XML and save it as binary. ;)
http://lists.macromates.com/pipermail/textmate/2006-November/015337.html
On Nov 21, 2006, at 8:15 AM, Alain Matthes wrote:
i've the same problem and i don't understand "configuration File of what" Where is in the doc ?
It is in section 5.1.1 of the LaTeX bundle help. It is the file that allows you to customize the shortcuts and behavior of the commands "Insert Command Based On Current Word" and "Insert Environment Based On Current Word".
If you look at the file, it starts of with something like this:
commands = { it = '\textit{$1} '; bf = '\textbf{$1} '; tt = '\texttt{$1} '; sf = '\textsf{$1} ';
This tells it that when you have the word "it" and your trigger the "Insert Command..." command, then \textit{$1} will be inserted. This text is treated as a snippet snippet: http://macromates.com/textmate/ manual/snippets#snippets
So say for instance that you wanted "rep" followed by triggering the command to insert "\documentclass{report}" with a newline so that you continue on the next line. You could do this by adding a line there saying:
rep = '\documentclass{report}\n';
Then save and close the file, and your new shortcut is ready!
similarly in the environments section you can do something similar. Then you have sections like these:
environments = { itemize = { triggers = ( 'it', 'item', 'itemize'); content = "\t\item $0"; }; enumerate = { triggers = ( 'en', 'enum', 'enumerate'); content = "\t\item $0"; };
The "itemize" part reads as follows:
1) The environment name is going to be itemize. So this will be inserting: \begin{itemize}...\end{itemize} 2) It will be triggerd by either "it", or "item" or "itemize". (You could for instance add 'i" as a trigger) 3) Between the lines containing the \begin{itemize} and \end {itemize}, the text indicated by "content" will be inserted, interpreted as a snippet. (If present, this should contain $0 somewhere, to indicate where you want the caret to end up).
Hope this helps a bit.
Alain
Haris
Charilaos Skiadas <skiadas@...> writes:
On Nov 21, 2006, at 8:15 AM, Alain Matthes wrote:
It is in section 5.1.1 of the LaTeX bundle help. It is the file that allows you to customize the shortcuts and behavior of the commands "Insert Command Based On Current Word" and "Insert Environment Based On Current Word".
similarly in the environments section you can do something similar. Then you have sections like these:
environments = { itemize = { triggers = ( 'it', 'item', 'itemize'); content = "\t\item $0"; }; enumerate = { triggers = ( 'en', 'enum', 'enumerate'); content = "\t\item $0"; };
The "itemize" part reads as follows:
- The environment name is going to be itemize. So this will be
inserting: \begin{itemize}...\end{itemize} 2) It will be triggerd by either "it", or "item" or "itemize". (You could for instance add 'i" as a trigger) 3) Between the lines containing the \begin{itemize} and \end {itemize}, the text indicated by "content" will be inserted, interpreted as a snippet. (If present, this should contain $0 somewhere, to indicate where you want the caret to end up).
Hope this helps a bit.
Haris
Hi.
About that, how is it possible to include environments such as "equation*" or "eqnarray*" in the list? It seems that the '*' character perturbs the command!
Thanks,
Olivier.
PS : speaking of the (common) latex.config file, it seems to me that there are two small misprints in the symbol list: "grtsim" should be "gtrsim", and "rtimew" should be "rtimes" (and by the way, I do not know "\Chi" and "\Digamma" (with capital), but perhaps I do not use the correct package!) But maybe have I an old version?
On Apr 15, 2007, at 10:57 AM, Olivier Vert wrote:
Charilaos Skiadas <skiadas@...> writes:
Hi.
About that, how is it possible to include environments such as "equation*" or "eqnarray*" in the list? It seems that the '*' character perturbs the command!
Yes, just add the a section like this to the file:
'equation*' = { triggers = ( 'eq*', 'eqn*', 'equation*' ); };
Then you need to make * into a "word character". For that, go to Preferences -> Text Editing, and you'll see a room for Word Characters near the bottom. Add it there (and be careful not to add a space character there).
After that, "eq*" will turn into an equation* environment.
Thanks,
Olivier.
PS : speaking of the (common) latex.config file, it seems to me that there are two small misprints in the symbol list: "grtsim" should be "gtrsim", and "rtimew" should be "rtimes" (and by the way, I do not know "\Chi" and "\Digamma" (with capital), but perhaps I do not use the correct package!) But maybe have I an old version?
Thanks I'll have a look at those. Sounds like misprints.
Haris Skiadas Department of Mathematics and Computer Science Hanover College
Charilaos Skiadas <skiadas@...> writes:
Then you need to make * into a "word character". For that, go to Preferences -> Text Editing, and you'll see a room for Word Characters near the bottom. Add it there (and be careful not to add a space character there).
It works perfect, thanks!
Olivier.