# 换行符策略
#
# 背景：这个仓库同时在 Windows（TeX Live 2022）和 WSL/Linux（TeX Live 2025）
# 上使用。Windows 侧 core.autocrlf=true 会把文本文件存成 CRLF，
# 而 shell 脚本一旦是 CRLF，在 Linux 上执行会报
#     bash: ./build.sh: /bin/bash^M: bad interpreter: No such file or directory
# 这个报错不直观（看起来像"没有 bash"，实际是行尾多了回车），
# 所以在仓库层面把规则固定下来，不依赖每个人本机的 autocrlf 设置。

# 所有 .sh 一律 LF，Windows 侧检出也不转换
*.sh            text eol=lf

# TeX 源码与样式：LaTeX 对 CRLF 容忍度好，但 eol=lf 能避免
# 中文注释在行尾残留 CR 被 XeTeX 当成字符排出来
*.tex           text eol=lf
*.sty           text eol=lf
*.cls           text eol=lf
*.bib           text eol=lf

# 配置文件
*.gitignore     text eol=lf
.gitignore      text eol=lf
.gitattributes  text eol=lf
*.md            text eol=lf

# 二进制：不参与换行符转换与文本 diff
*.pdf           binary
*.otf           binary
*.ttf           binary
*.ttc           binary
*.png           binary
*.jpg           binary
*.jpeg          binary
*.gif           binary
*.ico           binary
*.zip           binary