LaTeX

N e v e r   M i n d − 24.0827   U p d a t e Never\ Mind-24.0827\ Update Never Mind24.0827 Update

Latex

路线

  • Overleaf 这个在线 LaTeX 编辑网站。多种 LaTeX 模版,还免去了环境配置的难题。
  • 阅读下面三篇 Tutorial: Part-1, Part-2, Part-3。【页面中找到下载PDF

Part1 The Basic【基础!】

 \documentclass{article}
 \begin{document}
 Hello World! % your content goes here...
 \end{document}

一个最简单的实现,其中空格会自动处理 collapsed.

1.1 转义符

\:转义符,主要用于命令 Commands.

亦可用以显示下列特殊字符

\# hash (pound / sharp) sign
\% percent sign
\& ampersand
\$ dollar sign

练习1:basics-exercise-1 - Online LaTeX Editor Overleaf.【主要是用 \改错】

1.2 写行内公式

$符,用于写公式。栗子:$c = a- b + 1$

^ _:角标 Notation。注意:{} 的使用。栗子:$x^{y+1}$

1.3 环境 Env

Environment 环境

Equation 方程 \begin{equation} and \end{equation} 这个是行间方程,用 $就是行内方程。

\begin \end are used to create many different environments.

  • itemize 无序
  • enumerate 有序

1.4 导包 Packages

Packages \usepackage,导包。

例子 amsmath包:

\documentclass{article}
\usepackage{amsmath} % preamble 位置在序

amsmath更多功能:

\begin{equation*}无编号公式。

\min处理变量名标准化

\operatorname :用于你想标准化的变量名

多行方程:

align*环境

 \begin{align*}
 (x+1)^3 &= (x+1)(x+1)(x+1) \\
 &= (x+1)(x^2 + 2x + 1) \\
 &= x^3 + 3x^2 + 3x + 1
 \end{align*}

练习2:basics-exercise-2 - Online LaTeX Editor Overleaf.【主要是用amsmath包以及改方程格式】

该练习主要用到命令:

\infty \sqrt \frac \ldot

1.5 特殊符号

\begin{equation*}
S_n = \frac{1}{n}  \sum_{i=1}^{n} X_i
\end{equation*}

无穷:\infty
根号:\sqrt
分号:\frac
三个点:\ldot

Part2 Structured Documents【构建文档!】

2.1 Structured Documents【文档基础结构】⭐️

Title and Abstract

\title \author \maketitle\date{\today}abstract环境。

 \documentclass{article}
 \title{The Title}
 \author{A. Author}
 \date{\today}
  \begin{document}
 \maketitle
 
 \begin{abstract}
 Abstract goes here...
 \end{abstract}
Section【标题】

\section \subsection* 后者无序

\section{Introduction}
\subsection{Sample Preparation}
\subsection*{Sample Preparation}
\end{document}
Labels & Cross-References【标签&引用】

\label \ref 其中\eqref from amsmath. 可引用方程

let we ref \ref{sec:method} \eqref{eq:eq1}

\section{Method}
\label{sec:method}

\begin{equation}
\label{eq:eq1}
...
\end{equation}

练习:structure-exercise - Online LaTeX Editor Overleaf.

2.2 Figures & Tables【图片&表格】

Graphics

\includegraphics JPEG, PNG and PDF

Optional Arguments

\documentclass[12pt,twocolumn]{article}

makes the text bigger (12pt) and puts it into two columns.

Floats 浮动【定位】

graphicx包、figure环境、\caption注解且可引用

\usepackage{graphicx}

\begin{figure}
\centering
\includegraphics[%
 width=0.5\textwidth]{pic}
\caption{\label{fig:gerbil}Aww\ldots.}
Tables

tabularx包、tabular环境、\hline水平线

问题:如何居中?已解决

\begin{table}
\centering
\caption{Table captions.}\label{tab1}
【中间是如下的tabular环境】
\end{table}
\begin{tabular}{l|c|r}	% 左中右 & 竖线
\hline 	% 横线
Item &Qty&Unit\$\\
\hline
Widget&1 &199.99 \\
Cable &3 &19.99 \\
\hline
\end{tabular}

2.3 Bibliographies【参考文献】⭐

bibTex

新建.bib 文件,放入引用:

 @Article{Jacobson1999Towards,
 author = {Van Jacobson},
 title = {Towards the Analysis of Massive Multiplayer Online
 Role-Playing Games},
 journal = {Journal of Ubiquitous Information},
 Month = jun,
 Year = 1999,
 Volume = 6,
 Pages = {75--83}} 
 
 @InProceedings{Brooks1997Methodology,
 author = {Fredrick P. Brooks and John Kubiatowicz and
 Christos Papadimitriou},
 title = {A Methodology for the Study of the
 Location-Identity Split},
 booktitle = {Proceedings of OOPSLA},
 Month = jun,
 Year = 1997}

用于识别的Key based on the name, year and title.【最好】,例如 Jacobson1999Towards

自动识别与自定义

natbib包、\citet只括年份 \citep引用、\bibliography \bibliographystyle 参考文献bib文件与引用风格。

\citet{Brooks1997Methodology}
show that \ldots. Clearly, all odd numbers are prime
\citep{Jacobson1999Towards}.

\bibliography{bib-example} % your bib file name
\bibliographystyle{plainnat}

以上,如图

image-20240521231939305下面补个图

在这里插入图片描述

More Neat Things

附1 生成目录

\tableofcontents 生成基于section目录

附2 文章格式

更多文章格式

\documentclass{scrartcl}

\documentclass[12pt, twocolumn]{IEEEtran}

附3 自定义命令

自定义命令 \newcommand{\rperf}{}

附4 好用的 Packages!

packages!

  • beamer: for presentations (like this one!)
  • todonotes: comments and TODO management
  • tikz: make amazing graphics
  • pgfplots: create graphs in LATEX
  • listings: source code printer for LATEX
  • spreadtab: create spreadsheets in LATEX
  • gchords, guitar: guitar chords and tabulature
  • cwpuzzle: crossword puzzles

附5 安装

安装 On Windows: MikTEX or TEXLive

Part3 Not Just Papers【其他】

Presentations

\doc {beamer} 创建演示

\frametitle\tableofcontents[cur]

\alert = \textcolor{red}{} 高亮

\textbf Bold 粗体

\textit = \emph 斜体

{block}{} Env. Blocks

Thems 主题等

Pic

TikZ drawing Pic. Func. Examples 网址:TikZ and PGF | TeXample.net.

Notes

{todonotes}

\todo[color]{}

附1 hyperref【超链接,PDF书签列表】⭐️

\usepackage[ hidelinks, bookmarksnumbered=true, pdfauthor=haolong]{hyperref}  % 生成书签列表
% 设置颜色 colorlinks=true, allcolors=blue,

image-20240827115126260补个图
在这里插入图片描述


E n d . End. End.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值