1. 程式人生 > >Latex文件編輯方法(更新中)

Latex文件編輯方法(更新中)

Latex編輯方法

插圖指南

圖文並排 [左圖,右文字]

\begin{minipage}[h]{0.65\linewidth}
  \includegraphics[scale=0.9]{p21-1}
\end{minipage}
\hfill
\begin{minipage}[h]{0.35\linewidth}
  text line1 \\
  text line2
\end{minipage}

左表格,右文字

\begin{minipage}[h]{0.65\linewidth}
    \begin{tabular}{c|c|c|c}
     p & q & $\
neg p$ & $p \Rightarrow q$ \\ \hline T & F & F & F \\ \hline T & T & F & T \\ \hline F & F & T & T \\ \hline F & T & T & T \\ \end{tabular} \hfill \end{minipage} \begin{minipage}[h]{0.35\linewidth} $p \Rightarrow
q$ is false only if \\ $p=T$ and $q=F$ \\ If $X$ is a pink elephant, then $X$ can fly. \end{minipage}

並排圖形

\begin{figure}[h]
  \begin{minipage}[t]{0.3\textwidth}
    \includegraphics[width=\textwidth]{p12-2}
    \centering
    \caption{$A_{1,co},A_{2,co}$}
    \label{p12-2}
  \end{minipage}
\begin{minipage}[t]{0.3\textwidth} \centering \includegraphics[width=\textwidth]{p12-3} \caption{$A_{1,co} \times A_{2,co}$} \label{p12-3} \end{minipage} \end{figure}

並列圖形

\begin{figure}[h]
   \centering
   \includegraphics[scale=0.5]{p36-3} \\
   \caption *{fig1}
   \includegraphics[scale=0.4]{p37-1} \\
   \caption *{fig2} 
   \includegraphics[scale=0.4]{p37-2}
   \caption *{fig3}
\end{figure}

浮動圖形

\begin{wrapfigure}{l}[0cm]{0pt}  %{l},{r}表示在左右側
  \includegraphics[scale=0.9]{p21-1}
  \caption*{NEWCAR is not nonblocking}  % *表示不顯示預設圖形編號
  \label{p21-1} 
\end{wrapfigure}

專案列表

\begin{enumerate}
  \item {s can be generated by G.}
  \item {s is not in $\overline{L_m(G)}$, i.e. $s \notin \overline{L_m(G)}$}
\end{enumerate}

外框

\begin{center}
  \fbox{\color{red}$L(V/G)$ is prefix-closed}
\end{center}

分支公式

\[
V(s) = 
 \begin{cases}
   -x,\quad x \leq 0 \\
   x,\quad x>0
 \end{cases}
\]

表格

\begin{tabular}{c|c|c|c}
  p & q & $\neg p$ & $p \Rightarrow q$ \\
  \hline
  T & F & F & F \\
\end{tabular}

命令\overline 和\underline 在表示式的上、下方畫出水平線

$\overline{m+n}$ \qquad
$\underline{m+n}$

m+n¯m+n_

命令\overbrace 和 \underbrace 在表示式的上、下方給出一水平的大括號

$\underbrace{a+b+\cdots+z}_{26}$

a+b++z26