latex学习笔记

undefined·2023-10-20 19:22·28 次阅读

latex学习笔记

Latex学习

在线LaTeX编辑器:https://www.overleaf.com

TeX Live下载:https://www.tug.org/texlive/acquire-iso.html

适用于大文件

\命令名{参数}

文档类型

begin之前为前文,begin与end之间为正文

maketitle生成文档标题

Copy
\documentclass[UTF8]{ctexart} \title{文档的标题} \author{螺丝} \date{\today} \begin{document} \maketitle 你好!!! \end{document}

格式化

一个换行符是空格,两个换行符是段落

Copy
\documentclass[UTF8]{ctexart} \begin{document} \textbf{LATEX }是一种使用 TEX 程序作为排版引擎的格式(format),可以粗略地将它理解成是对TEX 的一层封装。\textit{LATEX 最初的设计目标是分离内容与格式,以便作者能够专注于内容创作而非版式设计,并能以此得到高质量排版的作品。}LATEX 起初由 Leslie Lamport 博士 [1] 开发,目前由 LATEX 工作组1进行维护。\underline{LATEX 读作“Lah-tech”或者“Lay-tech”,与汉字“拉泰赫”或“雷泰赫”的发音相近,在ASCII 字符环境写作 LaTeX。} LATEX 2ε 是 LATEX 的当前版本,意思是超出了第二版,但还远未达到第三版,在 ASCII 字符环境写作 LaTeX2e \end{document}

章和节

Copy
\documentclass[UTF8]{ctexart} \begin{document} \section{这是第一个章节} 可以在章节下添加内容 \subsection{这是一个子章节} 子章节下内容 \subsubsection{这是一个三级章节} 随便添加的内容 \section{这是第二个章节} 第二个章节的内容 \end{document}

添加图片

先把图片嵌套到figure环境中

Copy
\documentclass[UTF8]{ctexart} \usepackage{graphicx} \begin{document} \begin{figure} \centering \includegraphics[width=0.5\textwidth]{test} \caption{这是图片的名字} \end{figure} \end{document}

列表

环境:作用域 \begin \end之间的内容同一个环境

无序有序列表

Copy
\documentclass[UTF8]{ctexart} \begin{document} \begin{itemize} \item 列表项1 \item 列表项2 \item 列表项3 \end{itemize} \begin{enumerate} \item 列表项1 \item 列表项2 \item 列表项3 \end{enumerate} \end{document}

数学公式

行内$$,行外equation(简写用[) \over是分号

建议线上公式编辑器

Copy
\documentclass[UTF8]{ctexart} \begin{document} 艾因斯坦只能放称: $E=mc^2$ \begin{equation} E=mc^2 \end{equation} \[ E=mc^2 \] \documentclass[UTF8]{ctexart} \begin{document} \begin{equation} d={k \varphi(n)+1} \over e \end{equation} \end{document} \end{document}

表格

Copy
\documentclass[UTF8]{ctexart} \begin{document} \begin{table} \center \begin{tabular}{ c c c} 单元格1 & 单元格2 & 单元格3 \\ 单元格4 & 单元格5 & 单元格6 \\ 单元格7 & 单元格8 & 单元格9 \end{tabular} \begin{tabular}{ | c | c | c |} \hline 单元格1 & 单元格2 & 单元格3 \\ \hline 单元格4 & 单元格5 & 单元格6 \\ \hline 单元格7 & 单元格8 & 单元格9 \\ \hline \end{tabular} \caption{这是表格的标题} \end{table} \end{document}

一份不太简短的latex介绍

官方站点(Comprehensive TEX Archive Network)
https://ctan.org/tex-archive/info/lshort/chinese

PDF直接下载(随版本更新)
http://mirrors.cqu.edu.cn/CTAN/info/lshort/chinese/lshort-zh-cn.pdf

GitHub地址
https://github.com/CTeX-org/lshort-zh-cn

posted @   Saint_Z  阅读(28)  评论(0编辑  收藏  举报
相关博文:
阅读排行:
· 被坑几百块钱后,我竟然真的恢复了删除的微信聊天记录!
· 没有Manus邀请码?试试免邀请码的MGX或者开源的OpenManus吧
· 【自荐】一款简洁、开源的在线白板工具 Drawnix
· 园子的第一款AI主题卫衣上架——"HELLO! HOW CAN I ASSIST YOU TODAY
· Docker 太简单,K8s 太复杂?w7panel 让容器管理更轻松!
点击右上角即可分享
微信分享提示