% !TeX root = ../install-latex-guide-zh-cn.tex
\chapter{大陆地区的源}\label{chp:appendix:mirror}
由于各种不知名的原因,
下载 \TeX~Live 的 \texttt{iso} 文件或升级宏包时,
系统自动选择的源并没有满足用户关于``附近''的要求.
因此,
很多时候,
用户需要手动选择 CTAN 的源.
在 CTAN 上面,
也可以找到\href{
https://ctan.org/mirrors#Asia}{亚洲镜像列表}%
和\href{
https://ctan.org/mirrors/mirmon#cn}{连接情况}.
我将列表中位于大陆地区的源整理到表~\ref{tab:appendix:mirror},
并将我个人收集到的其他大陆地区的源整理到表~\ref{tab:appendix:mirror-addition}.
其中,
\href{
https://mirrors.cernet.edu.cn/CTAN/systems/texlive}{高校联合镜像}%
是一个仿照
\href{
https://mirrors.ctan.org/systems/texlive/}{CTAN 镜像}%
的国内镜像源,
它也可以``自动''跳转到``附近''的高校镜像.
更多内容参见%
\href{
https://help.mirrors.cernet.edu.cn/}{高校联合镜像说明}.
接下来简述使用大陆地区的源下载 \texttt{iso} 文件和升级宏包.
\begin{table}
\centering
\caption{CTAN 列表中大陆地区目前可用的源 (名称按拼音排序)}\label{tab:appendix:mirror}
\begin{tabular}{*{2}{l}}
\hline\hline
\href{
https://developer.aliyun.com/mirror/}{阿里云}
& \url{
https://mirrors.aliyun.com/CTAN/systems/texlive/}\\
\href{
http://mirrors.pku.edu.cn/}{北京大学}
& \url{
http://mirrors.pku.edu.cn/ctan/systems/texlive/}\\
\href{
https://mirror.bjtu.edu.cn/}{北京交通大学}
& \url{
https://mirror.bjtu.edu.cn/ctan/systems/texlive/}\\
\href{
https://mirrors.bfsu.edu.cn/}{北京外国语大学}
& \url{
https://mirrors.bfsu.edu.cn/CTAN/systems/texlive/}\\
\href{
https://mirrors.cqu.edu.cn/}{重庆大学}
& \url{
https://mirrors.cqu.edu.cn/CTAN/systems/texlive/}\\
\href{
https://mirrors.cernet.edu.cn/}{高校联合镜像}
& \url{
https://mirrors.cernet.edu.cn/CTAN/systems/texlive/}\\
\href{
https://mirrors.hust.edu.cn/}{华中科技大学}
& \url{
https://mirrors.hust.edu.cn/CTAN/systems/texlive/}\\
\href{
https://mirrors.jlu.edu.cn/}{吉林大学}
& \url{
https://mirrors.jlu.edu.cn/CTAN/systems/texlive/}\\
\href{
https://mirrors.sustech.edu.cn/}{南方科技大学}
& \url{
https://mirrors.sustech.edu.cn/CTAN/systems/texlive/}\\
\href{
https://mirrors.nju.edu.cn/}{南京大学}
& \url{
https://mirrors.nju.edu.cn/CTAN/systems/texlive/}\\
\href{
https://mirror.nyist.edu.cn/}{南阳理工学院}
& \url{
https://mirror.nyist.edu.cn/CTAN/systems/texlive/}\\
\href{
https://mirrors.tuna.tsinghua.edu.cn/}{清华大学}
& \url{
https://mirrors.tuna.tsinghua.edu.cn/CTAN/systems/texlive/}\\
\href{
https://mirrors.sjtug.sjtu.edu.cn/}{上海交通大学}
& \url{
https://mirrors.sjtug.sjtu.edu.cn/ctan/systems/texlive/}\\
\href{
https://mirrors.cloud.tencent.com/}{腾讯云}
& \url{
https://mirrors.cloud.tencent.com/CTAN/systems/texlive/}\\
\href{
https://mirrors.zju.edu.cn/}{浙江大学}
& \url{
https://mirrors.zju.edu.cn/CTAN/systems/texlive/}\\
\href{
https://mirrors.ustc.edu.cn/}{中国科学技术大学}
& \url{
https://mirrors.ustc.edu.cn/CTAN/systems/texlive/}\\
\hline\hline
\end{tabular}
\end{table}
\begin{table}
\centering
\caption{自己额外收集的大陆地区目前可用的源 (名称按拼音排序)}\label{tab:appendix:mirror-addition}
\begin{tabular}{*{2}{l}}
\hline\hline
\href{
https://mirrors.bit.edu.cn/web/}{北京理工大学}
& \url{
https://mirrors.bit.edu.cn/CTAN/systems/texlive/}\\
% \href{
https://mirrors.dgut.edu.cn/}{东莞理工学院}
% & \url{
https://mirrors.dgut.edu.cn/CTAN/systems/texlive/}\\
% \href{
https://mirrors.hit.edu.cn/}{哈尔滨工业大学}
% & \url{
https://mirrors.hit.edu.cn/CTAN/systems/texlive/}\\
\href{
https://mirrors.huaweicloud.com/}{华为云}
& \url{
https://mirrors.huaweicloud.com/CTAN/systems/texlive/}\\
\href{
https://mirror.lzu.edu.cn/}{兰州大学}
& \url{
https://mirror.lzu.edu.cn/CTAN/systems/texlive/}\\
% \href{
https://mirrors.geekpie.club/}{上海科技大学}
% & \url{
https://mirrors.geekpie.club/CTAN/systems/texlive/}\\
\href{
https://mirrors.sdu.edu.cn/}{山东大学}
& \url{
https://mirrors.sdu.edu.cn/CTAN/systems/texlive/}\\
\href{
https://mirrors.nwafu.edu.cn/}{西北农林科技大学}
& \url{
https://mirrors.nwafu.edu.cn/ctan/systems/texlive/}\\
% \href{
http://mirror.neu.edu.cn/}{东北大学}
% & \url{
http://mirror.neu.edu.cn/CTAN/systems/texlive/}\\
\href{
https://mirror.iscas.ac.cn/}{中国科学院软件研究所}
& \url{
https://mirror.iscas.ac.cn/CTAN/systems/texlive/}\\
\hline\hline
\end{tabular}
\end{table}
使用最近的 CTAN 源下载 \texttt{iso} 文件,
实际上是下载
\begin{lstlisting}[escapechar = |]
|\url{
https://mirrors.ctan.org/systems/texlive/Images/texlive2025.iso}|
\end{lstlisting}
使用大陆的源下载它,
只需将以上网址中的
\begin{lstlisting}
https://mirrors.ctan.org/systems/texlive/
\end{lstlisting}
替换为相应的源的地址,
而将
\begin{lstlisting}
Images/texlive2025.iso
\end{lstlisting}
予以保留.
以清华大学为例,
从清华大学源中下载 \texttt{iso} 镜像文件,
实际上是下载
\begin{lstlisting}[escapechar = |]
|\url{
https://mirrors.tuna.tsinghua.edu.cn/CTAN/systems/texlive/Images/texlive2025.iso}|
\end{lstlisting}
同理,
升级宏包也只需要将对应的网址替换为源地址即可.
前面正文中所设置的
\begin{lstlisting}
tlmgr option repository ctan
\end{lstlisting}
等价于
\begin{lstlisting}[escapechar = |]
tlmgr option repository |\url{
http://mirror.ctan.org/systems/texlive/tlnet/}|
\end{lstlisting}
使用大陆的源升级宏包,
只需将
\begin{lstlisting}
http://mirror.ctan.org/systems/texlive/
\end{lstlisting}
替换为大陆源的地址而保留其他部分即可.
依旧以清华大学为例,
那么设置将变为
\begin{lstlisting}[escapechar = |]
tlmgr option repository |\url{
https://mirrors.tuna.tsinghua.edu.cn/CTAN/systems/texlive/tlnet/}|
\end{lstlisting}