Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

#608 Compiling latex files don't work

pending
nobody
General (289)
5
2013-11-18
2010-12-22
Claudio Corti
No

I switched to ubuntu 10.10, geany version is 0.19.1.
Now if I try to compile a latex file, geany says "/bin/sh: pdflatex: not found".
From command line outside geany and from the virtual terminal inside geany, pdflatex works.
In ~/.config/geany/filedefs/filetypes.latex there is:

[build_settings]
linker=/home/genesys87/texlive/2009/bin/i386-linux/latex --file-line-error-style "%f"
compiler=/home/genesys87/texlive/2009/bin/i386-linux/pdflatex --file-line-error-style "%f"
run_cmd=evince "%f"
run_cmd2=xvdi "%f"

[build-menu]
EX_00_LB=V_iew PDF File
EX_00_CM=evince "%e.pdf"
EX_00_WD=
EX_01_LB=_View DVI File
EX_01_CM=evince "%e.dvi"
EX_01_WD=

The path of latex and pdflatex programs in the config file above are right.

Discussion

  • Claudio Corti
    Claudio Corti
    2011-01-05

    Nobody has a solution (except executing pdflatex in virtual terminal)?

     
  • Nick Treleaven
    Nick Treleaven
    2011-01-06

    Have you checked the command in the Build->Set Build Commands dialog?

     
  • Claudio Corti
    Claudio Corti
    2011-01-06

    Yes, I tried: if I put in the full path to pdflatex, the file is compiled, except when pdflatex needs to call itself (sometimes this is needed, like when using \write18 command and -shell-escape option).
    My $PATH environment variable contains the path /home/genesys87/texlive/2009/bin/i386-linux/, which is the same contained in ~/.config/geany/filedefs/filetypes.latex, so there shouldn't be problems (and older versions of geany didn't have this problem).
    Maybe geany doesn't handle correctly the $PATH variable when executes a command?

     
  • Claudio Corti
    Claudio Corti
    2011-01-06

    PS: when pdflatex needs to call itself, it fails because it cannot find pdflatex (ie: it doesn't find itself!!!); this is the error: "sh: pdflatex: not found" which is the same one of above.

     
  • Lex Trotman
    Lex Trotman
    2012-09-13

    • status: open --> pending
     
  • Lex Trotman
    Lex Trotman
    2012-09-13

    It sounds like pdflatex is in a non-standard path. If you start Geany from the desktop menu no shell is run and so no .bashrc or .profile (as appropriate) is read. Thus Geany and the shell it starts does not know about any extra paths you have defined in the shell startup file and so pdflatex is not found unless you use the full path (but recursive uses still do not use the full path so fail).

    You could try editing the desktop start menu item to run Geany in a shell.