當前位置:編程學習大全網 - 源碼下載 - LaTex——語法介紹

LaTex——語法介紹

簡單點說:LaTeX 基於 TeX,主要目的是為了 方便排版 。在學術界的論文,尤其是數學、計算機等學科論文都是由 LaTeX 編寫, 因為用它寫數學公式非常漂亮。

\documentstyle{article}

\begin{document}

This is a first example of a simple input file.

\end{document}

如果是 中文 ,將\documentstyle{article}改為

\documentstyle{carticle}

要想輸出這些控制符用下列命令:

# $ % & - { } ^{} ~{} \blackslash\blackslash表示“ \”

rm 羅馬字體 \it 意大利字體

\bf 黑體 \sl 傾斜體

\sf 等線體 \sc 小體大寫字母

\tt 打字機字體 \mit 數學斜體

25 壹號 \Huge

20 二號 \huge

17 三號 \LARGE

14 四號 \Large

12 小四號 \large

10 五號 \normalsize

9 小五號 \small

8 六號 \footnotesize

7 小六號 \scriptsize

5 七號 \tiny

smallskip \medskip \bigskip

\textwidth=14.5cm

\textheight=21.5cm

系統默認:字號10pt= 五號字;西文字體為羅馬字體;textwidth=12.2cm,textheight=18.6cm。相當於美國標準信紙大小。

數學公式中的各種字體:

$$

\begin{array}{l}

\mathrm{ABCDEFGHIJKLMNOPQRSTUVWXYZ}\%羅馬字體

\mathtt{ABCDEFGHIJKLMNOPQRSTUVWXYZ}\%打字機字體

\mathbf{ABCDEFGHIJKLMNOPQRSTUVWXYZ}\%黑體

\mathsf{ABCDEFGHIJKLMNOPQRSTUVWXYZ}\%等線體

\mathit{ABCDEFGHIJKLMNOPQRSTUVWXYZ}\%意大利字體

\end{array}

$$

$$

\begin{array}{clcr}

x+y+z & uv & a-b & 8\

x+y & u+v & a & 88\

x & 3u-vw & abc &888\

\end{array}

$$

$$\left ( \begin{array}{c}

\left |\begin{array}{cc}

a+b&b+c\c+d&d+a

\end{array}

\right |\

y\z

\end{array}\right )

$$

\begin{equation}

0.3x+y/2=4z

\end{equation}

gcd(m,n)=amodbgcd(m,n)=amodb

\documentclass[11pt]{ccart}%文件類說明

%還可以選擇的類是cctbook

\setlength{\parindent}{12pt} %自然段第壹行的縮進量為12pt

\setlength{\parskip}{10pt plus1pt minus1pt}

%自然段之間的距離為10pt,並可在8pt到11pt之間變化

\setlength{\baselineskip}{8pt plus2pt minus1pt}

%行間距為8pt,並可在7pt到10pt之間變化

\setlength{\textheight}{21true cm}%版面高為21厘米

\setlength{\textwidth}{14.5true cm}%版面寬為14.5厘米

\begin{document}%正文開始

\title{Thesis}%文章標題,雙反斜杠\ 表示換行

\author{author\Dept. of Math.}

%作者名,單位,通信地址等,雙反斜杠\ 表示換行

\date{2003/8/5}

%文章寫作日期,如果省略此行,計算機日期作為寫作日期

\maketitle%建立標題部分

\begin{center}%參考文獻的書寫

{\heiti 參考文獻}

\end{center}

\vskip 0.1cm

\def\hang{\hangindent\parindent}

\def\textindent#1{\indent\llap{#1\enspace}\ignorespaces}

\def\re{\par\hang\textindent}

\re{[1]} Nordhaus E,Stewart B,WhiteA.On the Maximum Genus of a Graph.{\it J.combinatorial Theory B},1971,11:258-267

\re{[2]} Skoviera M.The Maximum Genus of Graphs of Diameter Two.{\it Discrete Math}.1991, 87:175-180

\documentclass[11pt]{article}%文件類說明

%還可以選擇的類是book,report

\setlength{\parindent}{12pt} %自然段第壹行的縮進量為12pt

\setlength{\parskip}{10pt plus1pt minus1pt}

%自然段之間的距離為10pt,並可在8pt到11pt之間變化

\setlength{\baselineskip}{8pt plus2pt minus1pt}

%行間距為8pt,並可在7pt到10pt之間變化

\setlength{\textheight}{21true cm}%版面高為21厘米

\setlength{\textwidth}{14.5true cm}%版面寬為14.5厘米

\begin{document}%正文開始

\title{Thesis}%文章標題,雙反斜杠\ 表示換行

\author{author\Dept. of Math.}

%作者名,單位,通信地址等,雙反斜杠\ 表示換行

\date{2003/8/5}

%文章寫作日期,如果省略此行,計算機日期作為寫作日期

\maketitle%建立標題部分

\section{Introduction}%第壹節引言(機器自動編號)

{\bf Theorem 1.} {\it For any fixed ρ>0ρ>0, we have

$$||R(u,\rho)||\leq ||R_1(u,\rho)||\leq 2||R(u,\rho)||,~~~\forall u\in H.

\eqno(10)$$ Hence, (2) and (3) are equivalent for any fixed .}

  • 上一篇:jnihook原理
  • 下一篇:MATLAB環境下的多目標跟蹤。
  • copyright 2024編程學習大全網