Last active
February 23, 2021 08:00
-
-
Save p-geon/b6f14781403fbb8da0eaa14003bf3b4d to your computer and use it in GitHub Desktop.
Docker+LaTeX
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export PWD=`pwd` | |
export DIR=. | |
export FILENAME=main | |
# =========================================== | |
en: ## compile LaTeX with English | |
@make tex CONTAINER=pman0214/alpine-texlive-ja-epspdf | |
@make aux CONTAINER=pman0214/alpine-texlive-ja-epspdf | |
@make tex CONTAINER=pman0214/alpine-texlive-ja-epspdf | |
@make tex CONTAINER=pman0214/alpine-texlive-ja-epspdf | |
@make dvi CONTAINER=pman0214/alpine-texlive-ja-epspdf | |
@make clean | |
jp: ## compile LaTex with JP | |
@make tex CONTAINER=paperist/alpine-texlive-ja | |
@make aux CONTAINER=paperist/alpine-texlive-ja | |
@make tex CONTAINER=paperist/alpine-texlive-ja | |
@make tex CONTAINER=paperist/alpine-texlive-ja | |
@make dvi CONTAINER=paperist/alpine-texlive-ja | |
@make clean | |
tex: | |
docker run --rm -v $(PWD)/$(DIR):/workdir $(CONTAINER) uplatex $(FILENAME).tex | |
dvi: | |
docker run --rm -v $(PWD)/$(DIR):/workdir $(CONTAINER) dvipdfmx $(FILENAME).dvi | |
aux: | |
docker run --rm -v $(PWD)/$(DIR):/workdir $(CONTAINER) upbibtex $(FILENAME).aux | |
clean: | |
mv -f $(DIR)/$(FILENAME).blg \ | |
$(DIR)/$(FILENAME).bbl \ | |
$(DIR)/$(FILENAME).aux \ | |
$(DIR)/$(FILENAME).log \ | |
$(DIR)/$(FILENAME).dvi \ | |
$(DIR)/progress_files/ | |
# =========================================== | |
help: ## this help | |
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-20s\033[0m %s\n", $$1, $$2}' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment