Latex 學習筆記總結(一)

2021-07-26 22:19:08 字數 3560 閱讀 2561

latex 一般是發表國外的高質量文章的工具,確實很好用,目前也只是剛入手,寫點學到的東西,做個備忘。

安裝後,使用teworks,這個編輯器還是不錯的,

基本用法:

樣例:%這是乙個.tex檔案

\documentclass

\usepackage

\setcjkmainfont

\begin

\section

\qquad china is in east asia,世界,你好。

\subsection sichuan is the city of china

\end 

一般的結構:

\documentclass

\begin

………………(內容)

\end

語法:注釋:%

退格(一格):\quad

退格(兩格):\qquad

段落(兩格):\subparagraph

生成目錄:\tableofcontents %%這個很方便,我很喜歡

增加安裝包:\usepackage ps:name:xecjk

設定中文字型:\setcjkmainfont ps:宋體,前提你的電腦已經安裝了該字型

數學公式:

f=ma

$f=ma$

$$f=ma$$

\[f=ma\]  

斜體:$\eta$ $\mu$

fraction $\frac$    ps: a/b

power $a^b$      ps: a的b次方

subscript $a_b$   ps: a 下標為b

vector $\vec$  ps:向量n

$\dot$ ps:f上加小圓點

矩陣:\[

\left[

\begin

a1 & b2 & c3 \\

d4 & e5 & f6 \\

d4 & e5 & f6

%j加空行沒有問題 注意語法 \[ \]、\left[ \right]、\\、\begin \end ,引數:lcr 這些乙個不能少,本質上矩陣就是陣列arrary

\end

\right]

\]插入:

加入\usepackage

這個需要用eps格式的,方法:進入cmd  執行命令:bmeps -c …/1.png  …/1.eps

\includegraphics[width=4.00in,height=3.00in]

插入**:

\begin

a & b \\

c & d \\

\end

%加入橫線hline

\begin

\hline

a & b \\

\hline

c & d \\

\hline

\end

%居中center

在最開始前後加入\begin \end 即可

附錄(學習時,寫的):

% 這是乙個.tex檔案

%latex hello_world(.tex)

%導言區

\documentclass

\usepackage

\usepackage

\usepackage

\usepackage

\usepackage

\setcjkmainfont

\begin

%add to \tableofcontents

\tableofcontents

\section

\quad china is in east asia,世界,你好。

\subsection

\quad sichuan is the province of china

\subsubsection

\quad mianyang is the city of sichuan

%\paragraph is in the center of beijing.

\subparagraphis the pretty university of sichuan.

\section

\quad sichuan is the province of china

\subsection

\quad new york is the city of ameria

%\paragraph is in the center of beijing.

\subparagraphis the pretty university of sichuan.

\subparagraph the newton's second law is f=ma.

the newton's second law is $f=ma$.

the newton's second law is $$f=ma$$.

the newton's second law is \[f=ma\]

greek letters $\eta$ and $\mu$

fraction $\frac$

power $a^b$

subscript $a_b$

vector $\vec$

bold $\mathbf$

to time differential $\dot$

matrix (1cr here means left,center or right for each column

\[\left[

\begin

a1 & b2 & c3 \\

d4 & e5 & f6 \\

d4 & e5 & f6

%j加空行沒有問題 注意語法 \[ \]、\left[ \right]、\\、\begin \end ,引數:lcr 這些乙個不能少,本質上矩陣就是陣列arrary

\end

\right]

\]equations(here \& is symbol for aligning different rows)

\begin

a+b&=c \\

d&=e+f+g

\end

\[\left[

\begin

&a+b=c \\

&d=e+f+g

\end

\right]

\]\centering

\includegraphics[width=4.00in,height=3.00in]

%**\begin

a & b \\

c & d \\

\end

\quad

\begin

\hline

a & b \\

\hline

c & d \\

\hline

\end

\begin

\begin

\hline

a&b \\ \hline

c&d \\

\hline

\end

\end

\end

LaTeX學習筆記(一)

latex的iso檔案,進行安裝,解壓,開啟資料夾,以管理員身份執行install tl advanced.bat,即使是固態也需要20分鐘 完成後,dos下鍵入 latex v texdoc ctex 檢視中文latex文件 texdoc lshort zh 中文編譯,在導言區加上 usepack...

LaTeX學習筆記 一

學習內容來自書籍 乙份不太簡短的latex2 介紹 如有冒犯,請告知刪除。1.1.1 tex tex 是由donald e.knuth編寫的電腦程式,用於文章和數學公式的排版。1977 年knuth 開始編寫tex 排版系統引擎的時候,是為了探索當時正開始進入出版工業的數字印刷裝置的潛力。他特別希望...

LaTeX學習筆記

如果還沒有安裝 latex,參看下面的鏈結 如果還是latex新手,建議看下面鏈結中的入門教材。documentclass 11pt textwidth 50mm begin just for test enddocumentclass 文件型別 11pt 文件型別引數 文件型別的值。兩列分欄顯示,...