常用LaTex指令

表格

跨行(列)表格

\begin{table*}[htbp]
	\small
	\centering
	\setlength{\tabcolsep}{12mm}{
	\begin{tabular}{lccc}
		\hline\noalign{\smallskip}
		\multicolumn{1}{l}{xxx} &  \multicolumn{3}{c}{\textit{zzz}} \\
		yyy          & zzz1 & zzz2 & zzz3      \\
		\noalign{\smallskip}\hline\noalign{\smallskip}
		x1             & - & - & -        \\
		\noalign{\smallskip}\hline\noalign{\smallskip}
		+ y1        & - & - & -             \\
		+ y2        & - & - & -            \\
		\noalign{\smallskip}\hline
	\end{tabular} }
	\caption{caption.}
	\label{tab:xxx}
\end{table*}

可通过\setlength{\tabcolsep}{12mm}\resizebox{\textwidth}{15mm}调节表格宽度,这两条命令也适用于图片。

上面展示了如何跨列,跨行可使用\multirow{n}{*}{xxx}实现,需要引包\usepackage{multirow}

可通过指令\renewcommand\arraystretch{1.25}设置表格高度,此代码添加在\setlength{\tabcolsep}{12mm}之前即可。

图片

双栏图片

\begin{figure*}[htbp]
	\centering
	\includegraphics[width=8cm]{fig.pdf}
	\caption{caption.}
	\label{fig:xxx}
\end{figure*}

单栏图片

\begin{figure}[htbp]
	\centering
	\includegraphics[width=8cm]{fig.pdf}
	\caption{caption.}
	\label{fig:xxx}
\end{figure}

多图(左中右)

\begin{figure*}[htbp]
	\centering
	\begin{subfigure}{0.32\linewidth}
		\includegraphics[height=4.2cm]{fig1.pdf}
		\caption{caption1.}
	  \end{subfigure}
	  \hfill
	  \begin{subfigure}{0.32\linewidth}
		\includegraphics[height=4.2cm]{fig2.pdf}
		\caption{caption2.}
	  \end{subfigure}
	  \hfill
	  \begin{subfigure}{0.32\linewidth}
		\includegraphics[height=4.2cm]{fig3.pdf}
		\caption{caption3.}
	  \end{subfigure}
	  \caption{caption all.}
	  \label{fig:xxx}
\end{figure*}


字体

加粗

\textbf{}

斜体

\textit{}


公式

加粗(向量)

\boldsymbol{}

花体(只适用于大写字母)

\mathcal{}


引用参考文献

\cite{}


引用图片/表格/公式等

\ref{}
\cref{}


脚注

\footnote{}


行号

单栏

\usepackage{lineno}
\begin{document}
\linenumbers
\end{document}

双栏

\usepackage[switch]{lineno}
\begin{document}
\linenumbers
\end{document}

格式

去除页码

\maketitle
    ->
\maketitle\thispagestyle{empty}
  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
LaTeX 中,参考文献的常用格式是使用 BibTeX 或 BibLaTeX 进行管理和引用。下面是一个示例,展示如何在 LaTeX 中使用 BibTeX 进行参考文献的引用和格式化。 1. 首先,创建一个名为 "references.bib" 的 BibTeX 文件,并在其中添加参考文献条目。每个条目都有一个唯一的标识符(例如,"Smith2010")和一些字段(例如,作者、标题、出版日期等)。下面是一个示例条目: ``` @article{Smith2010, author = {John Smith}, title = {A comprehensive study on LaTeX}, journal = {Journal of LaTeX}, year = {2010}, volume = {1}, number = {1}, pages = {1-10} } ``` 2. 在 LaTeX 文档的合适位置,使用 `\bibliography{references}` 命令指定参考文献文件的名称(不需要扩展名)。 3. 在需要引用参考文献的地方,使用 `\cite{标识符}` 命令引用对应的参考文献。可以使用多个标识符,并用逗号分隔。 4. 最后,使用 `\bibliographystyle{样式}` 命令指定参考文献的格式样式。常见的样式包括 `plain`、`abbrv`、`unsrt` 等。 下面是一个完整的示例: ```latex \documentclass{article} \begin{document} This is a citation example \cite{Smith2010}. \bibliographystyle{plain} \bibliography{references} \end{document} ``` 编译该 LaTeX 文档时,需要按照以下顺序运行命令: ``` pdflatex document.tex bibtex document pdflatex document.tex pdflatex document.tex ``` 其中,"document.tex" 是你的 LaTeX 文件名。这样,引用将会被正确地插入到文档中,并生成符合样式要求的参考文献列表。 希望这个示例能帮助到你!如果需要更多细节或其他样式,可以查阅相关文献或在线资源。

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值