個人LaTeX中文文檔模板

中文LaTeX處理模板

  • 環境MiTex內核
  • 編輯環境WinEdit

源碼以下:算法

\documentclass[a4paper,12pt]{article}

\usepackage{CJK}

%設定字號
\newcommand{\chuhao}{\fontsize{42pt}{\baselineskip}\selectfont}
\newcommand{\xiaochuhao}{\fontsize{36pt}{\baselineskip}\selectfont}
\newcommand{\yihao}{\fontsize{28pt}{\baselineskip}\selectfont}
\newcommand{\erhao}{\fontsize{21pt}{\baselineskip}\selectfont}
\newcommand{\xiaoerhao}{\fontsize{18pt}{\baselineskip}\selectfont}
\newcommand{\sanhao}{\fontsize{15.75pt}{\baselineskip}\selectfont}
\newcommand{\sihao}{\fontsize{14pt}{\baselineskip}\selectfont}
\newcommand{\xiaosihao}{\fontsize{12pt}{\baselineskip}\selectfont}
\newcommand{\wuhao}{\fontsize{10.5pt}{\baselineskip}\selectfont}
\newcommand{\xiaowuhao}{\fontsize{9pt}{\baselineskip}\selectfont}
\newcommand{\liuhao}{\fontsize{7.875pt}{\baselineskip}\selectfont}
\newcommand{\qihao}{\fontsize{5.25pt}{\baselineskip}\selectfont}

%設定section
\makeatletter
\renewcommand\section{\@startsection{section}{1}{\z@}%
{-1.5ex \@plus -.5ex \@minus -.2ex}%
{.5ex \@plus .1ex}%
{\normalfont\sihao\CJKfamily{hei}}}
\makeatother

%設定subsection
\makeatletter
\renewcommand\subsection{\@startsection{subsection}{1}{\z@}%
{-1.25ex \@plus -.5ex \@minus -.2ex}%
{.4ex \@plus .1ex}%
{\normalfont\xiaosihao\CJKfamily{hei}}}
\makeatother

%設定subsubsection
\makeatletter
\renewcommand\subsubsection{\@startsection{subsubsection}{1}{\z@}%
{-1ex \@plus -.5ex \@minus -.2ex}%
{.3ex \@plus .1ex}%
{\normalfont\xiaosihao\CJKfamily{hei}}}
\makeatother

%下面的命令重定義頁面邊距,使其符合中文刊物習慣
\addtolength{\topmargin}{-54pt}
\setlength{\oddsidemargin}{0.63cm}  % 3.17cm - 1 inch
\setlength{\evensidemargin}{\oddsidemargin}
\setlength{\textwidth}{14.66cm}
\setlength{\textheight}{24.00cm}    % 24.62

%下面的命令設置行間距與段落間距
\linespread{1.4}
% \setlength{\parskip}{1ex}
\setlength{\parskip}{0.5\baselineskip}

\begin{document}
\begin{CJK*}{GBK}{song}
%重定義定理環境
\newtheorem{example}{例}             % 總體編號
\newtheorem{algorithm}{算法}
\newtheorem{theorem}{定理}[section]  % 按 section 編號
\newtheorem{definition}{定義}
\newtheorem{axiom}{公理}
\newtheorem{property}{性質}
\newtheorem{proposition}{命題}
\newtheorem{lemma}{引理}
\newtheorem{corollary}{推論}
\newtheorem{remark}{註解}
\newtheorem{condition}{條件}
\newtheorem{conclusion}{結論}
\newtheorem{assumption}{假設}
%重定義
\renewcommand{\contentsname}{目錄}  % 將Contents改成目錄
\renewcommand{\abstractname}{摘要}  % 將Abstract改成摘要
\renewcommand{\refname}{參考文獻}   % 將References改成參考文獻
\renewcommand{\indexname}{索引}
\renewcommand{\figurename}{圖}
\renewcommand{\tablename}{表}
\renewcommand{\appendixname}{附錄}
\renewcommand{\algorithm}{算法}

\section{引言}
\par 這是第一段文字,我只是想試試效果如何。

\newpage
\end{CJK*}
\end{document}
相關文章
相關標籤/搜索