- latex/overleaf插入%号: % \% %; 直接输入%,使用空格隔开。
- 首行缩进:导言区加入宏包首行 \usepackage{indentfirst} ,在缩进那行插入:\indent\setlength{\parindent}{1em},若是在某段首行不想缩进,则在该行插入:\noindent
- 把标题(Introduction)居中:\caption{\centering \section{Introduction}}
- 出现使用 item不能正确换行显示:原因:可能使用了转义字符等。解决方法:在文本前后加上$
- 上下标: ^{} 和 _{} 来设置上标和下标。注意:如果上下标只对其后面的一个字符起作用,如果上下标的内容超过一个字符,则需要用花括号 {} 包裹,否则上下标只对后面的一个符号起作用
- 下标也可以:_
- 波浪号:1. 数学模式下 ∼ \sim ∼
- 在/author里面插入/newline不换行:试试 \
- 公式产生编号(编号在最右侧):
- 调整文章标题与上下文之间的距离,注意,要在\begin{}的下一节目录
\setlength{\abovecaptionskip}{-0.2cm} %调整图片(表格)标题与图(表格)距离
\setlength{\belowcaptionskip}{-1cm} %调整图片(表格)标题与下文距离```
```c
\begin{equation}
\mathrm{V}_{\pi}(\mathrm{s})=\sum_{\mathrm{a} \in \mathrm{A}} \pi(\mathrm{a} \mid \mathrm{s})\left(\mathrm{R}_{\mathrm{s}}^{\mathrm{a}}+\gamma \sum_{\mathrm{s}^{\prime} \in \mathrm{S}} \mathrm{P}_{\mathrm{ss}^{\prime}}^{\mathrm{a}} \mathrm{V}_{\pi}\left(\mathrm{s}^{\prime}\right)\right)}
\end{equation}
- 在\end{}之前插入:\vspace{-0.6cm}
- 在表格内进行换行
\newcommand{\tabincell}[2]{
\begin{tabular}{@{}#1@{}}#2\end{tabular}
}%放在导言区%*
\tabincell{c}{Number of
\\ obstacles} %%Number of obstacles因为句子太长需要换行,所以要在换行的单词前面插入双斜杠
- 导入图片:
方法1
\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage{graphicx}
\title{A project with images}
\author{Overleaf}
\date{}
\graphicspath{{Images/}} %Images是文件夹,需要先将图片上传
\begin{document}
\maketitle
\section{Introduction}
\begin{figure}[htp]
\centering
\includegraphics[width=4cm]{InsertingImagesEx5} %InsertingImagesEx5是文件名,不过最好加上后缀
\caption{An image of a galaxy}
\label{fig:galaxy}
\end{figure}
\end{document}
方法2:在文本框插入图片
\usepackage{graphicx}
%注意需要导包
\usepackage{caption}
\usepackage{graphicx, subfig}
\begin{figure}[thpb]
\graphicspath{{Images/}}
\centering
\framebox{\parbox{3in}
\centering
\includegraphics[width=8cm \textwidth]{mission.png}
}
%\includegraphics[scale=1.0]{figurefile}
\caption{Inductance of oscillation winding on amorphous
magnetic core versus DC bias magnetic field}
\label{figurelabel}
\end{figure}