画图
VSCode + Draw.io Integration插件

有数学公式的打开下面的选项:

导出
File -> Export -> .svg导出成svg格式的文件。然后用浏览器打开svg文件后Ctrl+P选择另存为PDF,将图片存成pdf格式。
裁剪
只要安装了TeXLive,就只需要在图片pdf所在路径下使用以下命令,其中origin.pdf是需要裁剪的pdf,而crop.pdf表示裁剪后的pdf名称,pdfcrop会自动识别裁剪的区域:
pdfcrop origin.pdf crop.pdf
使用
\begin{figure}\centering\includegraphics[width=\columnwidth]{xxx.pdf}\caption{Description.}\label{fig:xxx}
\end{figure}
编译:pdflatex -> bibtex -> pdflatex*2