latex 中的cls檔案編寫

2021-08-17 03:01:08 字數 1411 閱讀 7369

cls檔案可謂是整個latex排版中的最關鍵部分,怎麼變寫好他將是乙個十分重要的問題。

在這裡為大家推薦乙個簡單的模板

編寫thesis.cls如下

\needstexformat[2007/10/19]

\providesclass

[2011/04/05 v0.1 thesis templatefordoctor]

\loadclass[cs4size,a4*****,fancyhdr,fntef, utf8][2007/10/19]

\requirepackage

\requirepackage

\requirepackage

\renewcommand\title[1]}

\renewcommand\author[1]}

\renewcommand\maketitle

\vspace*

\begin

\bf\songti\zihao中國科學院研究生院\\博士學位**

\vskip 50pt

\bf\heiti\zihao \underline

\vskip 20pt

\bf\kaishu\zihao \underline

\end

}

\makeatletter

\def\ihep@value@title

\def\ihep@value@author

\makeatother

\endinput

寫測試檔案test.tex,內容如下

\documentclass

\begin

\title

\author

\maketitle

\end

然後即可得到乙個新的模板啦

Latex中cls和sty檔案有何區別?

latex中cls和sty檔案有何區別?本文對 latex 中 cls 和 sty 檔案進行介紹,主要參考了 what are cls and sty files?how are they different?以及 latex2e for class and package writers 一般來說...

vscode編寫latex的方法

假設你已經裝了texlive 開啟cmd輸入 latex version 應該能輸出 開啟vscode,安裝這幾個外掛程式 設定 settings 點選右上角的open settings json 開啟應該是這樣的 也許你還配置過其他的東西,反正是個json 新增以下這些 就按json那麼新增 la...

python中self和cls的區別

1 self表示乙個具體的例項本身。如果用了staticmethod,那麼就可以無視這個self,將這個方法當成乙個普通的函式使用。2 cls表示這個類本身。class a object deffoo1 self print hello self staticmethod deffoo2 print...