# Makefile for XeLaTeX# Set the name of your main LaTeX file (without the .tex extension)MAIN_FILE= main-cn
# Set the name of the output PDF fileOUTPUT_FILE=${MAIN_FILE}.pdf
# Set the XeLaTeX compiler commandXELATEX= xelatex
BIBTEX= bibtex
# Set any additional flags or options for the XeLaTeX compilerXELATEX_FLAGS= -interaction=nonstopmode -f
# Default targetall: $(OUTPUT_FILE)# Rule to compile the LaTeX document$(OUTPUT_FILE): $(MAIN_FILE).tex
echo"XeLaTeX Compiling" - $(XELATEX)$(XELATEX_FLAGS)$(MAIN_FILE).tex > /dev/null
echo"Bibtex Compiling"$(BIBTEX)$(MAIN_FILE)echo"XeLaTeX Compiling" - $(XELATEX)$(XELATEX_FLAGS)$(MAIN_FILE).tex > /dev/null
- $(XELATEX)$(XELATEX_FLAGS)$(MAIN_FILE).tex
# Clean up intermediate filesclean:
rm -f $(OUTPUT_FILE)$(MAIN_FILE).aux $(MAIN_FILE).log $(MAIN_FILE).out $(MAIN_FILE).toc