textmate / latex.tmbundle

TextMate support for LaTeX
97 stars 64 forks source link

TextMate: Problems with typesetting and High Sierra #172

Closed ThreeDeeFun closed 7 years ago

ThreeDeeFun commented 7 years ago

Hello!

I have updated to macOS High Sierra 10.13 these days. I am using TextMate 1.5.11 and TextMate 2 too for my LaTeX documents. My tex distribution is TexLive-2017. Since I have updated to High Sierra, I cannot typeset my documents any more. I get this error in TextMate 1.5:

//bin/bash: line 8: texMate.py: command not found/

TextMate 2 also does not work. The error:

Typeset & View (PDF): line 12: texMate.py: command not found

I have already reinstalled TexLive 2017. It did not help.

Could somebody please help me?

Thank you!

Chris

infininight commented 7 years ago

For 1.5 it will not work with the current bundle. We only support version 1.5 on 10.7 and earlier.

Since you are still in part using 1.5 make sure you don’t have and old version of the bundle eclipsing the included version. Check these locations:

/Users//Library/Application Support/TextMate/Bundles/ /Users//Library/Application Support/TextMate/Pristine Copy/Bundles/

And delete any Latex bundle you find, if any, and then try again.

ThreeDeeFun commented 7 years ago

Hello!

Thank you very much for your reply! Now it works! I have deleted all the old versions in the locations you have mentioned. Then I copied my own old bundles into:

/Users/Library/Application Support/TextMate/Bundles/

Now typesetting is possible again and I can use my old bundles. Great! But still, two questions are open. Thanks for your help again!

1.) In TextMate 1.5 it was possible to set one specific tex file (main.tex) as the "TM_LATEX_MASTER". With CMD+R then TextMate always typesetted this specific document, even if I was in another document (tab). In TextMate 2 I always have to go back to the main.tex to compile the documents. How can I set the master document in TextMate 2?

And how can I make a project file as in TextMate 1.5 (*.tmproj)?

2.) It is possible to create a new snippet with "cmd+N". Is it possible to copy an existing snippet to the same place? "cmd+c" does not work ...

Thank you very much!

Chris

infininight commented 7 years ago

I’ll let someone else answer about the master file question, thought that worked the same still?

There are no project files now. Every opened file or folder is just instantly a project now. So just drag the folder to the TM icon and it is your project.

The bundle manager is still a bit in progress still, there is no easy way to duplicate a snippet really. Can be done but manually out of app.

infininight commented 7 years ago

Closing this since the original problem is fixed but feel free to keep discussing here.

sanssecours commented 7 years ago

In TextMate 1.5 it was possible to set one specific tex file (main.tex) as the "TM_LATEX_MASTER".

Yes, that is still possible. Please take a look at the section “Using the TM_LATEX_MASTER Environment Variable” in the Bundle Documentation. The LateX Bundle Documentation is also available offline in TextMate via them menu item “Bundles” → “LaTeX” → “Help”.

ThreeDeeFun commented 7 years ago

Hello!

Thanks for your help! It works fine if if put

%!TEX root = ../../main.tex

at the top of every included file.

I also tried to open a new text file. I named it .tm_properties and added this content:

TM_LATEX_MASTER = "$CWD/main.tex"

The second option does not work. I also tried it with the absolute path:

/Users/Christoph/Dropbox/Privat/Mitschriften ReWe/main.tex

The file is in the root directory. It has to be a txt file, isn't it? Do not know why what goes wrong.

Kind regards

Chris

sanssecours commented 7 years ago

I named it .tm_properties and added this content: TM_LATEX_MASTER="$CWD/main.tex

I think you forgot the closing quote (") at the end of

TM_LATEX_MASTER="$CWD/main.tex"

.

It has to be a txt file, isn't it?

Yes .tm_properties are normal text files. Here is what I tried:

  1. Create a new folder Test somewhere on your disk

  2. Drag the folder Test onto TextMate’s icon in the Dock

  3. TextMate opens a new window displaying the empty folder

  4. Save the content

    \documentclass{article}
    \begin{document}
     Hello, Main!
    \end{document}

    as file Main.tex in the folder Test.

  5. Create a new file ( + + N) with the content

    TM_LATEX_MASTER="$CWD/Main.tex"

    and save it in the folder Test using the name .tm_properties.

  6. Create a new file ( + + N) and save it as Hi.tex in the folder Test. Now hit + R to translate the master file.

  7. Now TextMate typesets the file Main.tex and show the result of the translation in your PDF viewer.

sanssecours commented 7 years ago

Do not know why what goes wrong.

Does the example I gave above work on your machine? If not, could you please describe what happens instead?

ThreeDeeFun commented 7 years ago

Hello!

Thank you very much for your help. I tried it for an hour or so. Does not work! I guess my problem has something to do with the file .tm_properties. (I did not forget the ".) The file is a hidden file.

Is it possible that you send me your .tm_properties? (midotkom@me.com)

TextMate just does not recognize the .tm_properties.

Latex Error: ./Test.tex:1 LaTeX Error: Missing \begin{document}. ! Emergency stop. ! ==> Fatal error occurred, no output PDF file produced!

A screenshot of my folder: As you can see the file is hidden:

https://www.dropbox.com/s/wpyuf5g8q08adz1/tm_properties.png?dl=0

sanssecours commented 7 years ago

A screenshot of my folder: As you can see the file is hidden:

Looks like you added the extension .txt to your TextMate properties file. Just remove the extension .txt from the file .tm_properties.txt and everything should work as expected.

Is it possible that you send me your .tm_properties?

The archive below contains the sample files – including .tm_properties – produced by following the steps I described above.

Test.zip

ThreeDeeFun commented 7 years ago

Thanks for your zip-file. I replaced my .tm_properties with yours, now everything works as it should. I do not know which mistake I have made. Even changing the extension of the file did not help. Content of the file is the same.

Thank you very much for your help and have a nice day!

Chris