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

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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
# 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格式的表格 看到室友用的教材格式的模板

使用 Hugo 构建
主题 StackJimmy 设计