Latex 常用代碼


Latex 工具網站:

手寫符號識別:Detexify

可以用來給出不同字體的Latex代碼

Latex_Code to Png:Sciweavers (還有其他好玩的功能)

在線生成Latex表格代碼:Tablesgenerator 

 Tikz教程和實例:Tikz

 

帶負號矩陣的元素對齊:

 1 %------------Latex preamble--------------
 2 \newcommand*{\matminus}{%
 3   \leavevmode
 4   \hphantom{0}%
 5   \llap{%
 6     \settowidth{\dimen0 }{$0$}%
 7     \resizebox{1.1\dimen0 }{\height}{$-$}%
 8   }%
 9 }
10 
11 %--------------Example---------------
12 \[
13     A = \begin{pmatrix*}
14     \matminus1 & \matminus10 & 1 \\
15     100 & 5 & 16 \\
16     13 & 7 & 7
17     \end{pmatrix*}
18 \]

參考:tex.stackexchange

自適應范數符號

1 \newcommand{\norm}[1]{\left\lVert#1\right\rVert}

參考:tex.stackexchange

Latex 插圖常用指令,參考CSDN

1 \includegraphics{sample.png}
2 \includegraphics[width=0.8\textwidth]{sample.png}
3 \includegraphics[scale=0.8]{sample.png}

圖片、表格取消浮動,float宏包結合H選項

1 \usepackage{float}
2 % ...
3 \begin{figure}[H]
4 % ...
5 \begin{table}[H]
6 % ...

圖片引用(利用hypcap,拒絕跳轉到標題)

1 \usepackage{caption}
2 \captionsetup{hypcap=true}
3 % ...
4 \begin{figure}[H]
5 % ...
6 \label{fig1}
7 \end{figure}
8 % ...
9 \ref{fig1}

 Latex 方程組:

1 \begin{equation}
2 f(x)=\left\{
3 \begin{aligned}
4 \frac{d \phi_1}{dt}&=\quad3\phi_1&&+8\phi_3 \\
5 \frac{d \phi_2}{dt}&= \quad3\phi_1&-\phi_2&+6\phi_3 \\
6 \frac{d \phi_3}{dt}&=-2\phi_1&&-5\phi_3
7 \end{aligned}
8 \right.
9 \end{equation}

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM