Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix generation PDF on macos #68

Closed
wants to merge 1 commit into from
Closed

Fix generation PDF on macos #68

wants to merge 1 commit into from

Conversation

kbakba
Copy link

@kbakba kbakba commented May 17, 2020

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
Copy link
Author

kbakba commented May 17, 2020

I think same problem in #63

@mszep
Copy link
Owner

mszep commented May 19, 2020

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
Copy link
Owner

mszep commented May 19, 2020

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

@kbakba
Copy link
Author

kbakba commented May 19, 2020

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

@nitrocode
Copy link
Contributor

nitrocode commented May 29, 2020

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 #69

Homebrew cask bug report for mactex: Homebrew/homebrew-cask#83467

@mszep
Copy link
Owner

mszep commented May 30, 2020

thanks for figuring that out @nitrocode :-)

@mszep mszep closed this May 30, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants