#53 Error with the rubber patch


As suggested in the gedit LaTeX Plugin FAQ:


I've tried to apply rubber-1.1-spaces.patch, but I have this error:

$ sudo patch -p0 /usr/share/rubber/rubber/rules/latex/__init__.py < /home/nom/rubber-1.1-spaces.patch
patching file /usr/share/rubber/rubber/rules/latex/__init__.py
Hunk #1 FAILED at 1106.
Hunk #2 succeeded at 1122 (offset 1 line).
1 out of 2 hunks FAILED -- saving rejects to file /usr/share/rubber/rubber/rules/latex/__init__.py.rej

I'll attach the file __init__.py.rej. Here's more info:
Ubuntu 8.10
gedit 2.24.2-0ubuntu1
Gedit LaTeX Plugin 0.2 rc1
rubber 1.1-2.2


  • Jean-Philippe Fleury

    I've not wrote the context of this bug report: my problem is that if I open in gedit a .tex file containing a space in its path, for example:

    /home/nom/mon fichier/file.tex

    the "gedit LaTeX plugin" tools don't work. For example, if I choose Tools > Latex -> PDF, nothing happens. I must remove the space in the file's path:


    to be able to use tools. So I've tried to apply the patch rubber-1.1-spaces.patch...

  • Yannick Voglaire

    Hi jpfle,

    Your version of rubber already supports spaces in filenames, and this is why the patch is not accepted. Here is what the corresponding section of /usr/share/rubber/rubber/rules/latex/__init__.py looks like now:

    file = self.source()
    cmd = [self.vars["program"]]
    quoted_file = '"%s"' % file
    cmd += map(lambda x: x.replace("%s", quoted_file), self.cmdline)
    inputs = string.join(self.env.path, ":")
    if inputs == "":
    env = {}

    You can see at the third line that the filename is quoted now.

    I think your problem was a bug in the 0.2rc1 version of GeditLatexPlugin which is fixed in SVN now (see http://sourceforge.net/svn/?group_id=204144 for how to get this version).


  • Jean-Philippe Fleury

    Hi Yannick,

    Thanks a lot for your response. I've installed the svn version and the bug is no longer present. :) The report can be closed. Wich bug status it has to be chosen?

  • Jean-Philippe Fleury

    Finally, I have a bug with the svn version. The tool "Cleanup LaTeX Build files" doesn't clean files if there's a space in the path.

  • Yannick Voglaire

    Same here.

    Changing line 39 of tools.xml:
    rm -f $directory/*.aux $directory/*.log $directory/*.toc $directory/*.bbl $directory/*.blg
    rm -f "$directory"/*.aux "$directory"/*.log "$directory"/*.toc "$directory"/*.bbl "$directory"/*.blg
    does the trick. It just remains to see if this satisfies the developer :-)

    Best regards,


  • Jean-Philippe Fleury

    Thanks, it works great. :)

  • Michael Zeising

    Michael Zeising - 2009-11-10

    I'm afraid this patch is outdated. Please use the latest upstream version of rubber.

  • Michael Zeising

    Michael Zeising - 2009-11-10
    • status: open --> closed-out-of-date

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

No, thanks