Menu

#7 Patch: Adding env_tex support for Windows

Unstable (example)
closed-fixed
Guillon
None
5
2015-08-08
2014-05-27
No

Hi all,
I've added support for env_tex.bat creation to debug generated dblatex output on Windows as well.

Please find my "hg diff" output attached.

Greetings,
Sören

Discussion

  • Soeren Sproessig

    diff -r 46e79ab0789c lib/dbtexmf/core/dbtex.py
    --- a/lib/dbtexmf/core/dbtex.py Mon May 26 01:18:36 2014 +0200
    +++ b/lib/dbtexmf/core/dbtex.py Tue May 27 16:26:59 2014 +0200
    @@ -381,10 +381,15 @@
    
             # For easy debug
             if self.debug and os.environ.has_key("TEXINPUTS"):
    
    -            f = file("env_tex", "w")
    -            f.write("TEXINPUTS=%s\nexport TEXINPUTS\n" % \
    -                    os.environ["TEXINPUTS"])
    -            f.close()
    +            if os.name == "posix":
    +                f = file("env_tex", "w")
    +                f.write("TEXINPUTS=%s\nexport TEXINPUTS\n" % \
    +                        os.environ["TEXINPUTS"])
    +                f.close()
    +            elif os.name == "nt":
    +                f = file("env_tex.bat", "w")
    +                f.write("set TEXINPUTS=%s\n" % os.environ["TEXINPUTS"])
    +                f.close()  
    
             # Build the tex file(s), and compile it(them)
             self.make_listings() 
    
     
  • Guillon

    Guillon - 2015-08-08
    • status: open --> closed-fixed
    • assigned_to: Guillon
     
  • Guillon

    Guillon - 2015-08-08

    Hi, I forgot to close this patch when it was integrated. It is at least included in release 0.3.6. Thanks for submitting.

     

Log in to post a comment.