Skip to content

Commit

Permalink
Add app_setup.tex to introduce how to set up TeXLive.
Browse files Browse the repository at this point in the history
  • Loading branch information
weijianwen committed Jan 8, 2016
1 parent 57cc440 commit 6d484e8
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 1 deletion.
44 changes: 44 additions & 0 deletions tex/app_setup.tex
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
%# -*- coding: utf-8-unix -*-
\chapter{搭建模板编译环境}

\section{安装TeX发行版}

\subsection{Mac OS X}

Mac用户可以从MacTeX主页\footnote{\url{https://tug.org/mactex/}}下载最新安装包。
也可以通过brew包管理器\footnote{\url{http://caskroom.io}}安装MacTeX。

\begin{lstlisting}[basicstyle=\small\ttfamily, numbers=none]
brew cask install mactex
\end{lstlisting}

\subsection{RedHat/CentOS}

建议RedHat/CentOS用户使用TeXLive主页\footnote{\url{https://www.tug.org/texlive/}}的脚本来安装TeXLive发行版。
以下命令将把TeXLive发行版安装到当前用户的家目录下。
若计划安装一个供系统上所有用户使用的TeXLive,请使用root账户操作。

\begin{lstlisting}[basicstyle=\small\ttfamily, numbers=none]
wget http://mirror.ctan.org/systems/texlive/tlnet/install-tl-unx.tar.gz
tar xzvpf install-tl-unx.tar.gz
cd install-tl-20150411/
./install-tl
\end{lstlisting}

\section{安装中文字体}

\subsection{Mac OS X}

Mac用户双击字体文件即可安装字体。

\subsection{RedHat/CentOS}

RedHat/CentOS用户请先将字体文件复制到字体目录下,调用fc-cache刷新缓存后即可在TeXLive中使用新字体。

\begin{lstlisting}[basicstyle=\small\ttfamily, numbers=none]
mkdir ~/.fonts
cp *.ttf ~/.fonts # 当前用户可用新字体
cp *.ttf /usr/share/fonts/local/ # 所有用户可以使用新字体
fc-cache -f
\end{lstlisting}

3 changes: 2 additions & 1 deletion thesis.tex
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,10 @@
\renewcommand\thealgorithm{\Alph{chapter}--\arabic{algorithm}}

%% 附录内容,本科学位论文可以用翻译的文献替代。
\include{tex/app_log}
\include{tex/app_setup}
\include{tex/app_eq}
\include{tex/app_cjk}
\include{tex/app_log}

\backmatter % 文后无编号部分

Expand Down

0 comments on commit 6d484e8

Please sign in to comment.