文章18
标签11
分类5

rhx0820的LaTeX与Beamer实践(第二期)

一个用于编译LaTeX文档的小Makefile

# 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 file
OUTPUT_FILE = ${MAIN_FILE}.pdf

# Set the XeLaTeX compiler command
XELATEX = xelatex
BIBTEX = bibtex
# Set any additional flags or options for the XeLaTeX compiler
XELATEX_FLAGS = -interaction=nonstopmode -f

# Default target
all: $(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 files
clean:
    rm -f $(OUTPUT_FILE) $(MAIN_FILE).aux $(MAIN_FILE).log $(MAIN_FILE).out $(MAIN_FILE).toc

一些小工具

生成LaTeX格式的表格
看到室友用的教材格式的模板

">