8 Comments

  1. Nice idea, Tom.

    Here’s a bash script which you can add to your path. The script requires a single argument: the name of the latex source file. I haven’t included any of the bibtex etc. as I don’t need that at the moment.

    Thanks for the interesting site.

    #!/usr/bin/env bash
    
    METAFILE_DIR=metafiles
    ME="$(basename "$(test -L "$0" && readlink "$0" || echo "$0")")"
    
    function usage {
    echo "usage: ${ME} "
    }
    
    if [[ "$#" -ne 1 ]]; then
            usage
            exit 1
    fi
    
    ARGS=("$@")
    FILENAME="${ARGS[0]}"
    if [[ ! -d ${METAFILE_DIR} ]]; then
            mkdir ${METAFILE_DIR}
    fi
    
    xelatex -output-directory="${METAFILE_DIR}" "${FILENAME}"
    
    if [[ ! -f "${FILENAME%.tex}.pdf" ]]; then
            ln -s "${METAFILE_DIR}/${FILENAME%.tex}.pdf"
    fi
  2. Hi!, great blog, I would like to translate this and some other post into spanish. Could I get your permission? Of course, I will cite your base blog url and a link to the post.

    Best regards

Leave a Reply