mszep / pandoc_resume

The Markdown Resume
http://mszep.github.io/pandoc_resume/
MIT License
1.62k stars 756 forks source link

Fix generation PDF on macos #68

Closed kbakba closed 4 years ago

kbakba commented 4 years ago

Problem with PDF generation on macos was in TEXMF env variable.

before:

$ make pdf
mkdir -p output
PANDOC_VERSION=`pandoc --version | head -1 | cut -d' ' -f2 | cut -d'.' -f1`; \
    if [ "$PANDOC_VERSION" -eq "2" ]; then \
        SMART=-smart; \
    else \
        SMART=--smart; \
    fi \

for f in markdown/*.md; do \
        FILE_NAME=`basename $f | sed 's/.md//g'`; \
        echo $FILE_NAME.pdf; \
        pandoc --standalone --template styles/chmduquesne.tex \
            --from markdown --to context \
            --variable papersize=A4 \
            --output output/$FILE_NAME.tex $f > /dev/null; \
        mtxrun --path=output --result=$FILE_NAME.pdf --script context $FILE_NAME.tex > output/context_$FILE_NAME.log 2>&1; \
    done
resume.pdf
make: *** [pdf] Error 1

after

$ make pdf
mkdir -p output
PANDOC_VERSION=`pandoc --version | head -1 | cut -d' ' -f2 | cut -d'.' -f1`; \
    if [ "$PANDOC_VERSION" -eq "2" ]; then \
        SMART=-smart; \
    else \
        SMART=--smart; \
    fi \

for f in markdown/*.md; do \
        FILE_NAME=`basename $f | sed 's/.md//g'`; \
        echo $FILE_NAME.pdf; \
        pandoc --standalone --template styles/chmduquesne.tex \
            --from markdown --to context \
            --variable papersize=A4 \
            --output output/$FILE_NAME.tex $f > /dev/null; \
        if test -d /usr/local/texlive/2020/texmf-dist/scripts; then export TEXMF='/usr/local/texlive/2020/texmf-dist/scripts'; fi; \
        mtxrun --path=output --result=$FILE_NAME.pdf --script context $FILE_NAME.tex > output/context_$FILE_NAME.log 2>&1; \
    done
resume.pdf
kbakba commented 4 years ago

I think same problem in #63

mszep commented 4 years ago

Thanks for your effort in finding the issue, but this seems like something that should be fixed upstream, either in texlive or context, or one of the mac installers. Unless there's a specific reason it breaks in this project?

mszep commented 4 years ago

Or maybe the installation instructions for MacOS need to be updated to provide an install with the proper environment variables set?

kbakba commented 4 years ago

Maybe. I try to resole this issue in the texlive installation

nitrocode commented 4 years ago

I got this to work on osx 10.15.5 by adding this directory to my path

PATH=$PATH:/Library/TeX/texbin/

Added that to PR https://github.com/mszep/pandoc_resume/pull/69

Homebrew cask bug report for mactex: https://github.com/Homebrew/homebrew-cask/issues/83467

mszep commented 4 years ago

thanks for figuring that out @nitrocode :-)