Question

I need my build system run makeglossaries with "main" as the ONLY argument, but sublime always appends the current filename as final parameter. How can I prevent this?

The execution command looks like this (under command line):

$: makeglossaries main

My current .sublime-build file looks like this:

{
    // General settings; DO NOT MODIFY!!!
    "target": "make_pdf",
    "selector": "text.tex.latex",

    // Windows-specific settings
    // -------------------------
    "windows":
        {

            "cmd": ["texify", 
                    "-b", "-p",
                    "--tex-option=\"--synctex=1\""
            ],

            "cmd": ["makeglossaries",
                    "main"
            ],

            "cmd": ["texify", 
                    "-b", "-p",
                    "--tex-option=\"--synctex=1\""
            ],          

            "path": "",

            "file_regex": "^((?:.:)?[^:\n\r]*):([0-9]+):?([0-9]+)?:? (.*)$"
        },

}

If you ask why I want to call texify twice, it's because makeglossaries needs to have a prebuild tex version on which it can inject the glossary. After injecting I want to get the final result.

Unfortunatelly, it does't work as I want. Hope you can help me.

Was it helpful?

Solution

Assuming you're running on OSX/Linux, you can make a quick bash script that just ignores any additional arguments, and use that script as your "cmd". Save the following in ~/bin as makeglossaries_main.sh:

#!/bin/bash
/path/to/makeglossaries main

then change the relevant line in your build system to:

"cmd": ["/home/adrian/bin/makeglossaries_main.sh"]

and you should be all set.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top