[TxMt] Re: LaTeX Setup: Problems switching from TexShop to Textmate

Robi Ragan robi.ragan at gmail.com
Thu Mar 11 00:25:02 UTC 2010


I deleted all the .plist associated with macromates and it still
insist on calling latex rather than pdflatex.

This is pdfTeX, Version 3.1415926-1.40.10 (TeX Live 2009)
(format=latex 2009.11.7)

I have figured out which package is causing the problem. If I comment
out \usepackage{epsfig}. Textmate will call pdflatex as so:

This is pdfTeX, Version 3.1415926-1.40.10 (TeX Live 2009)
(format=pdflatex 2009.11.7)

The trouble is that is the very package I needed to insert pdfs into
the document.

Sigh...What a frustrating little program this is.

Is there a different package I can use? Or should I investigate a
different graphics format to insert into my LaTeX docs. I use R and
inkscape to create all of the graphics I insert into LaTeX docs.

Robi



On Wed, Mar 10, 2010 at 5:21 PM, Peter Cowan <cowan.pd at gmail.com> wrote:
> On Wed, Mar 10, 2010 at 2:02 PM, Robi Ragan <robi.ragan at gmail.com> wrote:
>> That works!
>
> Ah now we are getting somewhere.  The reason I asked you do try that
> is that typesetting latex is done by the texMate.py script in the
> support folder of the latex bundle.  It contains the following
> function which you can see tries to figure out the best engine based
> on the directive settings, package requirements and finally the
> preference settings.  Based on your previous emails none of the if
> clauses before preferences should be setting the engine, so something
> is a miss in your preferences.  The tmPrefs dictionary by calling a
> function in tmprefs.py in the same folder.  I don't fully understand
> how this works but it tries to read
> \"$HOME/Library/Preferences/com.macromates.textmate.plist\"
>
> So I would try quitting TM and deleting that preference file and
> seeing if that works.
>
> def constructEngineCommand(tsDirectives,tmPrefs,packages):
>    """This function decides which engine to run using
>       + %!TEX directives from the tex file
>       + Preferences
>       + or by detecting certain packages
>       The default is pdflatex.  But it may be modified
>       to be one of
>          latex
>          xelatex
>          texexec  -- although I'm not sure how compatible context is
> with any of this
>    """
>    engine = "pdflatex"
>
>    latexIndicators = ['pstricks' , 'xyling' , 'pst-asr' , 'OTtablx' ,
> 'epsfig' ]
>    xelatexIndicators = ['xunicode', 'fontspec']
>
>    if 'TS-program' in tsDirectives:
>        engine = tsDirectives['TS-program']
>    elif usesOnePackage(latexIndicators,packages):
>        engine = 'latex'
>    elif usesOnePackage(xelatexIndicators,packages):
>        engine = 'xelatex'
>    else:
>        engine = tmPrefs['latexEngine']
>    stat = os.system('type '+engine+' > /dev/null')
>    if stat != 0:
>        print '<p class="error">Error: %s is not found, you need to
> install LaTeX or be sure that your PATH is setup properly.</p>' %
> engine
>        sys.exit(1)
>    return engine
>
>
>
>> So I guess the question is why won''t Textmate let me set the proper
>> engine in the Preferences? I just noticed that when I try to change
>> the engine I get an error that goes across the whole screen and then
>> disappears quickly. I took a quick screenshot and it says:
>>
>> /Applications/TextMate.app/Contents/SharedSupport/Bundles/Latex.tmbundle/Support/bin/configure.py:8:
>> DeprecationWarning: os.open4 is depreciated. Use the subprocess
>> module.
>> sin, result = os.popen4(command)
>>
>> Is that robot speak for "You tried to set the latex engine but it did not work?"
>>
>> Any ideas how to get Texmate to let me set the preferences?
>>
>> Thanks,
>>
>> Robi
>>
>> On Wed, Mar 10, 2010 at 3:50 PM, Peter Cowan <cowan.pd at gmail.com> wrote:
>>> On Wed, Mar 10, 2010 at 12:35 PM, Robi Ragan <robi.ragan at gmail.com> wrote:
>>>> I have none of those packages loaded.
>>>>
>>>> My file has no %!TEX directive.
>>>
>>> Try adding this to the top of your file and see if that works.
>>>
>>> %!TEX TS-program = pdflatex
>>>
>>>> I have not set any shell variables but the PATH. I have very little
>>>> idea what these shell variables are actually. I read and I read, and
>>>> all the documentation assumes I already know what they are and
>>>> exactally how to set them.
>>>
>>> They are variable that TM commands and look at.  Another way to set
>>> the engine is to provide a variable like TM_LATEX and set that to (in
>>> my case) xelatex.
>>>
>>>>
>>>> But Wait! I just noticed another difference in the log files.
>>>>
>>>> TeXShop:
>>>>
>>>> This is pdfTeX, Version 3.1415926-1.40.10 (TeX Live 2009)
>>>> (format=pdflatex 2009.11.7)  10 MAR 2010 15:25
>>>>
>>>> Textmate:
>>>>
>>>> This is pdfTeX, Version 3.1415926-1.40.10 (TeX Live 2009)
>>>> (format=latex 2009.11.7)  10 MAR 2010 15:10
>>>>
>>>> But I have pdflatex selected in the preferences. I just noticed that I
>>>> get the same errors no matter what I set the engine to in the
>>>> preferences. It looks like Textmate is not letting me change the
>>>> engine to what ever I want.
>>>>
>>>>
>>>> Robi
>>>> Robi Ragan
>>>> Visiting Assistant Professor
>>>> Department of Political Science
>>>> Duke University
>>>> www.duke.edu/~rr75
>>>>
>>>>
>>>>
>>>> On Wed, Mar 10, 2010 at 3:31 PM, Peter Cowan <cowan.pd at gmail.com> wrote:
>>>>> On Wed, Mar 10, 2010 at 12:16 PM, Robi Ragan <robi.ragan at gmail.com> wrote:
>>>>>> pdflatex is the engine that I have set in the preferences and it still
>>>>>> is choking on the pdf.
>>>>>>
>>>>>> Again, looking at the log files it uses all the same files and paths
>>>>>> until it gets to the load graphics point. At that point the when
>>>>>> compiled from TeXShop calls: pdftex.def and when being compiled from
>>>>>> Textmate it calls: dvips.def
>>>>>>
>>>>>> Robi
>>>>>
>>>>> Can you supply us with a minimal example that causes your issue?
>>>>>
>>>>> Do you happen to load any of these packages?
>>>>>
>>>>> ['pstricks' , 'xyling' , 'pst-asr' , 'OTtablx' , 'epsfig' ]
>>>>>
>>>>> Does your file have a %!TEX directive?
>>>>>
>>>>> Have you set the TM_LATEX shell variable set in either the TextMate
>>>>> preferences, or the Project specific variables?
>>>>>
>>>>> Hopefully these will help us narrow down the source of your difficulty.
>>>>>
>>>>> Peter
>>>>>
>>>>>>
>>>>>>
>>>>>> On Wed, Mar 10, 2010 at 2:33 PM, Daniel Stegmueller
>>>>>> <d.stegmueller at gmail.com> wrote:
>>>>>>> Dear Robi,
>>>>>>>
>>>>>>> if you chosse the correct (i.e. pdflatex) engine in the preferences this will no happen.
>>>>>>>
>>>>>>> Daniel
>>>>>>>
>>>>>>>
>>>>>>> On 10 Mar 2010, at 15:33, Robi Ragan wrote:
>>>>>>>
>>>>>>>> Thanks for the suggestions but that did not fix the problem. I have
>>>>>>>> determined that the error that is causing the problem is:
>>>>>>>>
>>>>>>>> Latex Error: ./texfile.tex:22 LaTeX Error: Cannot determine size of
>>>>>>>> graphic in image.pdf (no BoundingBox).
>>>>>>>>
>>>>>>>> But there should be no problem with bounding boxes because it is a pdf
>>>>>>>> file. And again this file compiles perfectly in TeXShop. This makes me
>>>>>>>> think TextMate is still somehow using a different method for compiling
>>>>>>>> the file.
>>>>>>>>
>>>>>>>> After examining the log files produced by each method I find that they
>>>>>>>> are handling the graphics in different ways and that is likely what is
>>>>>>>> leading to the bounding box errors.
>>>>>>>>
>>>>>>>> TeXShop calls:
>>>>>>>> ------
>>>>>>>> Package graphics Info: Driver file: pdftex.def on input line 91.
>>>>>>>>
>>>>>>>> (/usr/local/texlive/2009/texmf-dist/tex/latex/pdftex-def/pdftex.def
>>>>>>>> File: pdftex.def 2009/08/25 v0.04m Graphics/color for pdfTeX
>>>>>>>> \Gread at gobject=\count87
>>>>>>>> ))
>>>>>>>> -----
>>>>>>>>
>>>>>>>> While the method used by Textmate calls:
>>>>>>>>
>>>>>>>> ------
>>>>>>>> Package graphics Info: Driver file: dvips.def on input line 91.
>>>>>>>>
>>>>>>>> (/usr/local/texlive/2009/texmf-dist/tex/latex/graphics/dvips.def
>>>>>>>> File: dvips.def 1999/02/16 v3.0i Driver-dependant file (DPC,SPQR)
>>>>>>>> ))
>>>>>>>> ------
>>>>>>>>
>>>>>>>> So how do I get textmate to use the same graphics process as TeXXhop.
>>>>>>>> I assume this is some sort of option I need to set in the preferences.
>>>>>>>> Anyone know what it would be and how to set it?
>>>>>>>>
>>>>>>>> On Tue, Mar 9, 2010 at 9:40 PM, Alex Ross <z-textmate at lasersox.net> wrote:
>>>>>>>>> On Mar 9, 2010, at 5:36 PM, Robi Ragan wrote:
>>>>>>>>>
>>>>>>>>>>> To set LaTeX preferences in TextMate, press ⌘⌥, or select the menu item “Bundles > LaTeX > Preferences…”
>>>>>>>>>>> —Alex
>>>>>>>>>>
>>>>>>>>>> Oh how I know it. I have read all the documentation and I cannot find
>>>>>>>>>> anything that tells me exactly what to put in these preferences. In
>>>>>>>>>> order to get Textmate to use the same engine that my TeXShop is using.
>>>>>>>>>>
>>>>>>>>>> Anyone else have any ideas??
>>>>>>>>>
>>>>>>>>> You want “Default Engine: pdflatex” and “Options: --shell-escape”.
>>>>>>>>>
>>>>>>>>> _______________________________________________
>>>>>>>>> textmate mailing list
>>>>>>>>> textmate at lists.macromates.com
>>>>>>>>> http://lists.macromates.com/listinfo/textmate
>>>>>>>>>
>>>>>>>>
>>>>>>>> _______________________________________________
>>>>>>>> textmate mailing list
>>>>>>>> textmate at lists.macromates.com
>>>>>>>> http://lists.macromates.com/listinfo/textmate
>>>>>>>
>>>>>>>
>>>>>>> _______________________________________________
>>>>>>> textmate mailing list
>>>>>>> textmate at lists.macromates.com
>>>>>>> http://lists.macromates.com/listinfo/textmate
>>>>>>>
>>>>>>
>>>>>> _______________________________________________
>>>>>> textmate mailing list
>>>>>> textmate at lists.macromates.com
>>>>>> http://lists.macromates.com/listinfo/textmate
>>>>>>
>>>>>
>>>>> _______________________________________________
>>>>> textmate mailing list
>>>>> textmate at lists.macromates.com
>>>>> http://lists.macromates.com/listinfo/textmate
>>>>>
>>>>
>>>> _______________________________________________
>>>> textmate mailing list
>>>> textmate at lists.macromates.com
>>>> http://lists.macromates.com/listinfo/textmate
>>>>
>>>
>>> _______________________________________________
>>> textmate mailing list
>>> textmate at lists.macromates.com
>>> http://lists.macromates.com/listinfo/textmate
>>>
>>
>> _______________________________________________
>> textmate mailing list
>> textmate at lists.macromates.com
>> http://lists.macromates.com/listinfo/textmate
>>
>
> _______________________________________________
> textmate mailing list
> textmate at lists.macromates.com
> http://lists.macromates.com/listinfo/textmate
>



More information about the textmate mailing list