标签:style blog http color io 使用 ar 文件 sp
大型文档,如果把所有的文字都录入在同一个.tex文件中,那个文件的体积是不可估量的,文件的结构式混乱不堪的,文字的定位也是令人头疼的。幸亏latex提供了结构化的处理命令---include。
% !TeX:pdflatex,pdfTeXify% 测试大型文档拆分多个源文件进行编译。%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% main.tex%% 只在 main.tex 当中建立导言区,并include子文件%% 子文件不需要导言区、begin{document},只需%% \chapter{}、\section{}等等。%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%\documentclass[UTF8]{ctexbook}\usepackage{graphicx}\usepackage[CJKbookmarks=true,colorlinks,linkcolor=black,anchorcolor=blue,citecolor=green]{hyperref}%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Text body %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%\begin{document}\youyuan\sffamily\title{源文件拆分编译}\author{Lin\TeX9527}\date{2014--09--04}\maketitle\tableofcontents\include{file1}\include{file2}\end{document}
\chapter{水果}\section{葡萄}葡萄,紫黑紫黑的,甜,真甜。\section{西瓜}西瓜,圆又圆。\section{狗狗和西瓜}见第\pageref{fig:dog}页的图\ref{fig:dog}。
\chapter{动物}\section{人}人,人心隔肚皮。\section{狗}狗是人类的好朋友。\begin{figure}[htbp]\centering% Requires \usepackage{graphicx}\includegraphics[scale=0.5]{dog}\\\caption{两只很萌的哈士奇}\label{fig:dog}\end{figure}

大型文档源文件拆分编辑编译\include{filename}
标签:style blog http color io 使用 ar 文件 sp
原文地址:http://www.cnblogs.com/LinTeX9527/p/3994804.html