From f48231085107dada75953c1acf19400e030ae808 Mon Sep 17 00:00:00 2001 From: SchwarzerYV <103877999+SchwarzerYV@users.noreply.github.com> Date: Wed, 15 May 2024 12:46:41 +0800 Subject: [PATCH] latex --- docs/latex.md | 67 +++++++++++++++++++++++++++++++++++++++++++-------- 1 file changed, 57 insertions(+), 10 deletions(-) diff --git a/docs/latex.md b/docs/latex.md index 3533e2fe..7f823815 100644 --- a/docs/latex.md +++ b/docs/latex.md @@ -905,20 +905,67 @@ x = \begin{cases} `KaTex:\verb!x^2!` | \verb!x^2! | `KaTeX:\mathbf{a}` `\textbf{a}` | `KaTeX:\mathit{a}` `\textit{a}` | `KaTeX:\textup{a}` `\textup{a}` | `KaTeX:\textsl{a}` `\textsl{a}` | `KaTeX:\textsc{a}` `\textsc{a}` | `KaTeX:\underline{a}` `\underline{a}` +```latex 列表表示 --- -```latex -\begin{itemize} - \item First item - \item Second item -\end{itemize} +| Markdown | LaTeX | +|-------------------------------|--------------------------------| +| `1. First item`
`2. Second item` | `\begin{enumerate}`
`\item First item`
`\item Second item`
`\end{enumerate}` | +| `- First item`
`- Second item` | `\begin{itemize}`
`\item First item`
`\item Second item`
`\end{itemize}` | +| `**First item**`
`**Second item**` | `\begin{description}`
`\item First item`
`\item Second item`
`\end{description}` | +% ```latex +% \begin{enumerate} +% \item First item +% \item Second item +% \end{enumerate} + + +% \begin{itemize} +% \item First item +% \item Second item +% \end{itemize} -```latex -\begin{description} - \item Definition - \item Explanation -\end{description} + +% \begin{description} +% \item First item +% \item Second item +% \end{description} + +图片展示 +--- + +% 展示单张图像 +\usepackage{graphicx} +\begin{figure}[htbp] + \centering + \includegraphics[width=0.8\textwidth]{path/to/your/image.jpg} + \caption{Caption for the single figure.} + \label{fig:singlefig} +\end{figure} + +% 展示多张图像 +\usepackage{graphicx} +\usepackage{subcaption} +\begin{figure}[htbp] + \centering + \begin{subfigure}[b]{0.45\textwidth} + \centering + \includegraphics[width=\textwidth]{path/to/your/image1.jpg} + \caption{First subfigure} + \label{fig:sub1} + \end{subfigure} + \hfill % Adds horizontal space between the subfigures + \begin{subfigure}[b]{0.45\textwidth} + \centering + \includegraphics[width=\textwidth]{path/to/your/image2.jpg} + \caption{Second subfigure} + \label{fig:sub2} + \end{subfigure} + \caption{Caption for the entire figure} + \label{fig:mainfig} +\end{figure} +``` 另见 ----