diff options
Diffstat (limited to 'info')
-rw-r--r-- | info/install-latex-guide-zh-cn/README.md | 2 | ||||
-rw-r--r-- | info/install-latex-guide-zh-cn/appendix/updateinfo.tex | 6 | ||||
-rw-r--r-- | info/install-latex-guide-zh-cn/chapter/macos.tex | 80 | ||||
-rw-r--r-- | info/install-latex-guide-zh-cn/chapter/preface.tex | 6 | ||||
-rw-r--r-- | info/install-latex-guide-zh-cn/chapter/ubuntu.tex | 2 | ||||
-rw-r--r-- | info/install-latex-guide-zh-cn/chapter/windows.tex | 4 | ||||
-rw-r--r-- | info/install-latex-guide-zh-cn/install-latex-guide-zh-cn.pdf | bin | 799379 -> 808080 bytes |
7 files changed, 65 insertions, 35 deletions
diff --git a/info/install-latex-guide-zh-cn/README.md b/info/install-latex-guide-zh-cn/README.md index b8f3d0d532..a35694588b 100644 --- a/info/install-latex-guide-zh-cn/README.md +++ b/info/install-latex-guide-zh-cn/README.md @@ -40,4 +40,4 @@ latexmk -xelatex -synctex=1 install-latex-guide-zh-cn # 开源协议 -本次工作将遵循协议 LaTeX Project Public License,v1.3c 或其后版本. +本次工作将遵循协议 LaTeX Project Public License, v1.3c 或其后版本. diff --git a/info/install-latex-guide-zh-cn/appendix/updateinfo.tex b/info/install-latex-guide-zh-cn/appendix/updateinfo.tex index 8d543e30c3..5df89a7429 100644 --- a/info/install-latex-guide-zh-cn/appendix/updateinfo.tex +++ b/info/install-latex-guide-zh-cn/appendix/updateinfo.tex @@ -2,6 +2,12 @@ \chapter{版本信息} +\section*{v2023.11.1} + +\begin{itemize} + \item 更新 MacTeX 安装内容 (感谢 \href{https://github.com/tauyoungsama}{tauyoung} 起草) +\end{itemize} + \section*{v2023.10.1} \begin{itemize} diff --git a/info/install-latex-guide-zh-cn/chapter/macos.tex b/info/install-latex-guide-zh-cn/chapter/macos.tex index 63f4de00e1..17f9e03c8e 100644 --- a/info/install-latex-guide-zh-cn/chapter/macos.tex +++ b/info/install-latex-guide-zh-cn/chapter/macos.tex @@ -47,66 +47,88 @@ Homebrew 是一个包管理工具, 类似 Ubuntu 上面的 \texttt{apt-get}. \subsubsection{安装 Homebrew} -Homebrew 安装教程可以在其网站找到, 这里简单列出来: +Homebrew 安装教程可以在其网站找到, +这里简单列出来% +\footnote{参见 \href{https://docs.brew.sh/Installation\#git-remote-mirroring}{Homebrew 官方文档}} \begin{lstlisting}[language=bash] - /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" + /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" \end{lstlisting} 将以上命令在\textsf{终端}\footnote{% 打开方法为: \keys{\cmdmac + \SPACE}, 输入 \textsf{terminal} 并打开 \menu{终端} 应用}% 执行. 脚本会在执行前暂停, 并说明它将做什么. 依据屏幕指令执行即可. -中国大陆用户可以更改镜像以提高访问速度. 以中国科学技术大学镜像源为例: +中国大陆用户可以使用镜像以提高访问速度. +以上海交通大学镜像源为例% +\footnote{此处涉及的环境变量参见 \href{https://docs.brew.sh/Manpage\#environment}{Homebrew 官方文档}, +上海交通大学镜像站的安装说明见 +\href{https://mirrors.sjtug.sjtu.edu.cn/docs/git/brew.git}{git/brew.git}, +\href{https://mirrors.sjtug.sjtu.edu.cn/docs/git/homebrew-core.git}{git/homebrew-core.git}, +\href{https://mirrors.sjtug.sjtu.edu.cn/docs/git/homebrew-cask.git}{git/homebrew-cask.git}, +\href{https://mirrors.sjtug.sjtu.edu.cn/docs/homebrew-bottles}{homebrew-bottles}, +其他镜像站的安装说明参见 +\href{https://help.mirrors.cernet.edu.cn/homebrew/}{Homebrew 软件仓库镜像使用帮助}, +\href{https://help.mirrors.cernet.edu.cn/homebrew-bottles/}{Homebrew Bottles 软件仓库镜像使用帮助}} \begin{lstlisting}[language=bash] - cd "$(brew --repo)/Library/Taps/homebrew/homebrew-core" - git remote set-url origin https://mirrors.ustc.edu.cn/homebrew-core.git - cd "$(brew --repo)"/Library/Taps/homebrew/homebrew-cask - git remote set-url origin https://mirrors.ustc.edu.cn/homebrew-cask.git - echo 'export HOMEBREW_BOTTLE_DOMAIN=https://mirrors.ustc.edu.cn/homebrew-bottles' >> ~/.bash_profile + echo 'export HOMEBREW_BREW_GIT_REMOTE=https://mirrors.sjtug.sjtu.edu.cn/git/brew.git' >> ~/.bash_profile + echo 'export HOMEBREW_CORE_GIT_REMOTE=https://mirrors.sjtug.sjtu.edu.cn/git/homebrew-core.git' >> ~/.bash_profile + echo 'export HOMEBREW_BOTTLE_DOMAIN=https://mirror.sjtu.edu.cn/homebrew-bottles/bottles' >> ~/.bash_profile + echo 'export HOMEBREW_NO_INSTALL_FROM_API=1' >> ~/.bash_profile source ~/.bash_profile + /bin/bash -c "$(curl -fsSL https://git.sjtu.edu.cn/sjtug/homebrew-install/-/raw/master/install.sh)" + brew tap --custom-remote --force-auto-update homebrew/cask https://mirrors.sjtug.sjtu.edu.cn/git/homebrew-cask.git \end{lstlisting} -如果是 zsh 用户, 最后两行请替换为 -\begin{lstlisting}[language=bash] - echo 'export HOMEBREW_BOTTLE_DOMAIN=https://mirrors.ustc.edu.cn/homebrew-bottles' >> ~/.zshrc - source ~/.zshrc -\end{lstlisting} - -\subsubsection{Xcode} - -根据 \href{https://docs.brew.sh/Xcode\#supported-xcode-versions}{Homebrew 网站}的提示\footnote{原文是 Homebrew supports and recommends the latest Xcode and/or Command Line Tools available for your platform}, -推荐用户在安装 Homebrew 前先安装 Xcode. -在\textsf{终端} 执行以下命令即可: -\begin{lstlisting}[language=bash] - xcode-select --install -\end{lstlisting} +如果是 Zsh 用户, 请将上述所有的 \texttt{.bash\_profile} 替换为 \texttt{.zprofile}. \subsubsection{安装 Mac\TeX} 安装 Homebrew 后, 只需在\textsf{终端}执行以下命令即可完成安装: \begin{lstlisting}[language=bash] - brew cask install mactex + brew install mactex \end{lstlisting} 如有输入密码等提示, 请根据屏幕指示操作.至于环境变量等繁琐细节, Homebrew 会自动进行处理, 无须用户干预. +如果用户完全不需要 Mac\TeX{} 附带的 GUI 组件, 也可以考虑仅安装其命令行工具, 通过在终端键入命令或者从其他文本编辑器调用. +\begin{lstlisting}[language=bash] + brew install mactex-no-gui +\end{lstlisting} + 完整的 Mac\TeX{} 会比较大. 如果磁盘空间实在紧张, 也可以考虑安装 Basic\TeX: \begin{lstlisting}[language=bash] - brew cask install basictex + brew install basictex \end{lstlisting} 安装完成后 Basic\TeX{} 依然会缺很多包, 手动安装会比较麻烦, 所以不推荐没有经验的用户尝试. +注意, Basic\TeX{} 的初始设定是不安装宏包文档和源码. 如有需要, 可以执行 +\begin{lstlisting}[language=bash] + # 1 为安装, 0 为不安装 + sudo tlmgr option docfiles 1 # 安装文档, 推荐 + sudo tlmgr option srcfiles 1 # 安装源码, 可选 +\end{lstlisting} +配置 \texttt{tlmgr}. 在配置修改时已经安装的包, 需要重新安装才能应用新配置, 例如可以执行 +\begin{lstlisting}[language=bash] + sudo tlmgr install --reinstall \ + $(tlmgr list --only-installed | sed -e 's/^i \([^:]*\): .*$/\1/') +\end{lstlisting} + \section{卸载 Mac\TeX} 如果用户直接下载了 Mac\TeX{} 安装包进行安装, 可以对照\href{https://www.tug.org/mactex/uninstalling.html}{这里}的介绍来卸载, 通常我个人会比较建议在跨版本升级前卸载旧版本. -如果用户借助 Homebrew cask 安装了 Mac\TeX, -那么卸载工作可能会稍显麻烦. -这里引用 \href{https://github.com/Homebrew/homebrew-cask/issues/32073}{Github} 上的讨论. -用户可以根据这里的内容卸载 Mac\TeX. +如果用户借助 Homebrew 安装了 Mac\TeX, +经% +\href{https://github.com/OsbertWang/install-latex-guide-zh-cn/pull/39#discussion_r1368152254}{实际测试}, +直接使用 +\begin{lstlisting} + brew uninstall mactex +\end{lstlisting} +卸载很成功, +只是有一些残留. \section{跨版本升级 Mac\TeX} @@ -120,7 +142,7 @@ Homebrew 安装教程可以在其网站找到, 这里简单列出来: 跨版本升级 (Mac\TeX{} 的版本与 \TeX{} Live 保持一致), 可在\textsf{终端}借助 Homebrew 完成: \begin{lstlisting}[language=bash] brew update - brew cask upgrade mactex + brew upgrade mactex \end{lstlisting} \section{升级宏包} diff --git a/info/install-latex-guide-zh-cn/chapter/preface.tex b/info/install-latex-guide-zh-cn/chapter/preface.tex index 733eaec6f2..77728d6c71 100644 --- a/info/install-latex-guide-zh-cn/chapter/preface.tex +++ b/info/install-latex-guide-zh-cn/chapter/preface.tex @@ -52,8 +52,10 @@ 本手册发布后, \href{https://github.com/EthanDeng}{Dongsheng Deng}, \href{https://github.com/muzimuzhi}{muzimuzhi}, -\href{https://github.com/stone-zeng}{Xiangdong Zeng} +\href{https://github.com/stone-zeng}{Xiangdong Zeng}, +\href{https://github.com/tauyoungsama}{tauyoung} 对本手册提出了很好的建议, 并提供了帮助, 其中, 有关 macOS 的内容最初由 Xiangdong Zeng 草拟完成, -而后 Dongsheng Deng 进行了补充. +而后 Dongsheng Deng 进行了补充, +最近一次更新则由 tauyoung 提供. 在此一并感谢. diff --git a/info/install-latex-guide-zh-cn/chapter/ubuntu.tex b/info/install-latex-guide-zh-cn/chapter/ubuntu.tex index 12f04a6508..fa83485c84 100644 --- a/info/install-latex-guide-zh-cn/chapter/ubuntu.tex +++ b/info/install-latex-guide-zh-cn/chapter/ubuntu.tex @@ -254,7 +254,7 @@ sudo rm -rf /usr/local/texlive/2023 rm -rf ~/.texlive2023 \end{lstlisting} -卸载完成后,可以进一步移除之前设置的环境变量. +卸载完成后, 可以进一步移除之前设置的环境变量. 在 \textsf{Terminal} 中执行 \begin{lstlisting}[language = bash] gedit ~/.profile diff --git a/info/install-latex-guide-zh-cn/chapter/windows.tex b/info/install-latex-guide-zh-cn/chapter/windows.tex index 30c1d751df..48f94424f5 100644 --- a/info/install-latex-guide-zh-cn/chapter/windows.tex +++ b/info/install-latex-guide-zh-cn/chapter/windows.tex @@ -56,7 +56,7 @@ \begin{lstlisting} MD5 的 texlive2023.iso 哈希: 787f087e71695eebd1caafdb2b286060 - CertUtil: -hashfile 命令成功完成。 + CertUtil: -hashfile 命令成功完成. \end{lstlisting} 则表明下载的镜像文件正常. 除 MD5 值外, @@ -70,7 +70,7 @@ \begin{lstlisting}[language=bash,literate={a}{a}{1} {b}{b}{1} {c}{c}{1} {d}{d}{1} {e}{e}{1} {f}{f}{1}] SHA512 的 texlive2023.iso 哈希: 3a78cc59d562a9224543b90318ecb28d3ae7f975c2a031e15304a20b8fb0abac6e0ed63012c0bdf8f5edd39380caf122a17c948c05b28ea38fe90f2f0b19bdba - CertUtil: -hashfile 命令成功完成。 + CertUtil: -hashfile 命令成功完成. \end{lstlisting} 即为验证成功. diff --git a/info/install-latex-guide-zh-cn/install-latex-guide-zh-cn.pdf b/info/install-latex-guide-zh-cn/install-latex-guide-zh-cn.pdf Binary files differindex 30240626cc..aae9ee8aeb 100644 --- a/info/install-latex-guide-zh-cn/install-latex-guide-zh-cn.pdf +++ b/info/install-latex-guide-zh-cn/install-latex-guide-zh-cn.pdf |