Latex

标题、作者、注释、章节、段落、换行

% comment
\documentclass{article}
\author{My Name}
\title{Hello World}
\begin{document}
\tableofcontents
\maketitle
\section{Hello China} China is in East Asia.
\subsection{Hello Beijing} Beijing is the capital of China.
\subsubsection{Hello Dongcheng District}
\paragraph{Tian'anmen Square}is in the center of Beijing
\subparagraph{Chairman Mao} is in the center of Tian'anmen Square
\subsection{Hello Guangzhou}
\paragraph{Sun Yat-sen University} is the best university in Guangzhou.
Beijing is the capital of China. 
New York is the capital of America. 
Amsterdam is \\ the capital \\ of Netherlands.
\end{document}
1.png
2.png

数学公式

\documentclass{article} 
  \usepackage{amsmath} 
  \usepackage{amssymb} 
\begin{document} 
  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{a}{b}$ 

  Power $a^b$ 

  Subscript $a_b$ 

  Derivate $\frac{\partial y}{\partial t} $ 

  Vector $\vec{n}$ 

  Bold $\mathbf{n}$ 

  To time differential $\dot{F}$ 

  Matrix (lcr here means left, center or right for each column) 
  \[ 
    \left[ 
      \begin{array}{lcr} 
        a1 & b22 & c333 \\ 
        d444 & e555555 & f6 
      \end{array} 
    \right] 
  \] 

Equations(here \& is the symbol for aligning different rows) 
\begin{align} 
  a+b&=c\\ 
  d&=e+f+g 
\end{align} 

\[ 
  \left\{ 
    \begin{aligned} 
      &a+b=c\\ 
      &d=e+f+g 
    \end{aligned} 
  \right. 
\] 

\end{document} 
3.png

简单表格

\documentclass{article}
\begin{document}
\begin{tabular}{|c|c|}
a & b \\
c & d\\
\end{tabular}

\begin{tabular}{|c|c|}
\hline
a & b \\
\hline
c & d\\
\hline
\end{tabular}

\begin{center}
\begin{tabular}{|c|c|}
\hline
a & b \\ \hline
c & d\\
\hline
\end{tabular}
\end{center}
\end{document}
4.png
最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容