LaTex 基础

发布于 2023-09-20  263 次阅读


Please refresh the page if equations are not rendered correctly.
---------------------------------------------------------------

笔记详情

1. Overleaf入门,带你快速上手LaTeX

23:57 从模板创建项目

26:56 加粗 CTRL+B; 斜体 CTRL+I 或者 \emph{}; 新章节\section, \subsection, \subsubsection

27:46: pdf和latex相互跳转定位

32:03:

  • 行内公式 : $ 公式 $

  • 行间公式:

begin{equation}

公式

\end{equation}

36:51: 打中文

  • 方法一:

​ 导言区permeable使用:\documentclass{ctexart}

Menu → 编译器:使用XeLaTex或者LuaLaTex

  • 方法二:(使用期刊模板时,不方便直接改类型为ctexart

​ 仍然使用\documentclass{article}

​ 加上一句\usepackage{ctex}

39:45 生僻字:\usepackage[fontset-ubuntu]{ctex}

2. Overleaf进阶

2.1 加入插图

\usepackage{graphicx}

可以接受的图片格式:jpgpdfpng等。推荐前两个,照片推荐jpg,数据图推荐pdf

正文:

% 浮动体 floats;在第一行后面加[hbt!]可以将图片固定当前页面的底部(here bottom)
\begin{figure}
\centering
\includegraphics[width=80mm]{IMG_0439.jpg}
\caption{Photo of a scculent plant}
\label{fig:plant}
\end{figure}

利用图的label进行交叉引用: See the plant in Figure \ref{fig:plant}. 注意label必须放在caption后面。

2.2 插入表格

放弃挣扎,生成吧:

Create LaTeX tables online – TablesGenerator.com

2.3 插入参考文献

【LaTeX】LaTeX参考文献管理:用Bib TeX 管理参考文献_哔哩哔哩_bilibili

3 其他内容跳转

Latex_01_图表格式技巧 – My Home

Overleaf 编译“超时”

来源: overleaf在线编辑latex时候报“超时”,编译运行时间太长的解决办法

排除其他语法错误的问题,这里给出解决过多大型eps文件导致编译超时的方法:为eps文件配套再离线编译一个pdf文件!

假设原eps文件的命名为:figure.eps
那么这个配套的pdf文件命名应该为:figure-eps-converted-to.pdf ,换句话说,pdf的命名规则就是[name]+[-eps-converted-to]。 离线生成好后,再将这个pdf上传到overleaf文件下,这样overleaf就不用每次编译的时候都去把eps编译成pdf了,因为你已经事先提供了一个编译好的图片文件啦。
于是就可以继续愉快的ctrl+s了。

届ける言葉を今は育ててる
最后更新于 2023-10-13