Home Download Buy Blog Forum Support

Build System env Option

Build System env Option

Postby wledoux on Tue Feb 07, 2012 2:55 pm

Hi,

I try to make the following build system to work (XeLatex with MikTex).
Code: Select all
{
// General settings; DO NOT MODIFY!!!
"target": "make_pdf",
"selector": "text.tex.latex",

// Windows-specific settings
// -------------------------
"windows":
  {
   "cmd": ["texify",
    "-b", "-p","--run-viewer","--clean",
    "--viewer-option=\"-reuse-instance\"",
    "--tex-option=\"--synctex=1\""
   ],

   "env": { "PDFLATEX":"xelatex",
        "TEXINPUTS":"Q:\\@Administration\\@Include;Q:\\@Documents\\@Include;",
        "BIBINPUTS":"Q:\\@Documents\\@Bibs",
        "MIKTEX_VIEW_pdf":"K:\\Apps\\SumatraPDFPortable\\SumatraPDF.exe %f"
       },

   "path": "K:\\Apps\\MikTex\\miktex\\bin;$PATH",
   "file_regex": "^((?:.:)?[^:\n\r]*):([0-9]+):?([0-9]+)?(think) (.*)$"
  }
}


It uses the "env" option, that seems to be unrecognized.
Code: Select all
run() got an unexpected keyword argument 'env'


I discovered this option on this page: http://sublimetext.info/docs/en/referen ... nvironment

Am I doing something wrong or did something change to achieve this ?
I use the build 2175 on Windows

Thank you
wledoux
 
Posts: 17
Joined: Wed Mar 23, 2011 5:29 pm

Re: Build System env Option

Postby spirops on Thu Feb 09, 2012 9:02 am

I have tried it and it does not work for me neither. It would be great to have a xelatex compiler wihtout to change the environment for the portable version...
If someone find howto please post the answer...
spirops
 
Posts: 1
Joined: Tue Feb 07, 2012 8:51 am

Re: Build System env Option

Postby guillermooo on Thu Feb 09, 2012 10:11 am

In the example above, "target"="make_pdf" is overriding the "exec" command used by default. "exec" takes an "env" parameter, but it seems your "make_pdf" custom command doesn't.

If "make_pdf" is an executable file as opposed to a Sublime Text command, just use "cmd":"make_pdf" instead.
guillermooo
 
Posts: 729
Joined: Thu Jul 23, 2009 9:06 am

Re: Build System env Option

Postby guillermooo on Thu Feb 09, 2012 10:21 am

To clarify, "make_pdf" receives all data in the .sublime-build file; what to do with that data is up to "make_pdf". "exec" is simply a default implementation of what to do with the .sublime-build data.
guillermooo
 
Posts: 729
Joined: Thu Jul 23, 2009 9:06 am

Re: Build System env Option

Postby wledoux on Thu Feb 09, 2012 3:56 pm

It make perfect sense, thank you for your answer !
In this case, make_pdf is a python script from the ST2 package "LaTexTools". I guess I'll try editing it to make it understand this option.
wledoux
 
Posts: 17
Joined: Wed Mar 23, 2011 5:29 pm


Return to Technical Support

Who is online

Users browsing this forum: No registered users and 19 guests