LaTex学习笔记

LaTex的Hello World


/documentclass{article}

 

/begin{document}

Hello World!

/end{document}

 


 

LaTex写论文的一般格式

/documentclass{article}

/begin{document}

 

%%% 题目 %%%

/title{An Introduction to LaTex}

/author{krrrr}

/maketitle

 

%%% 摘要 %%%

/begin{abstract}

In recently years, LaTex has been widely used in academic areas ...

/end{abstract}

 

%%% 小节 %%%

/section{Introduction}

Latex is a very powerful tool for text editing...

%%% 注脚 %%%

/footnote{MS Word is not as powerful as LaTex}

/section{Proposed Method}

The proposed method consists of the basic part and the extention part...

%%% 小小节 %%%

/subsection{The Algorithm}

this is the work flow of the proposed algorithm.

/paragraph{The method}

Here we present the method for ...

 

%%% 图片 %%%%

/begin{figure}[!htb]
  /centering
  /includegraphics[width=/linewidth]{images/sample_im.eps}
  /caption{Sample illustration.}

/label{fig:label1}
/end{figure}

 

Figure /ref{fig:label1} shows our result.

 

%%% 图片(全栏) %%%%

/begin{figure*}[!htb]
  /centering
  /includegraphics[width=/linewidth]{images/sample_im2.eps}
  /caption{Sample illustration.}
/end{figure*}

 

%%% 多个图片 %%%%

/begin{figure}[!b]
/centering
/begin{tabular}{@{/hspace{0mm}}c@{/hspace{0.5mm}}c}
/includegraphics[height=3cm]{images/img1.eps}&
/includegraphics[height=3cm]{images/img2.eps}//
(a) & (b)//
/end{tabular}
/caption{(a) image A
(b) image B
}
/label{fig:two images}
/end{figure}

 

/section{Conclusion}

In summary, Latex is an easy tool for text editing...

 

%%% 引用 %%%

/begin{thebibliography}{0}
/bibitem{rubbish} The rubbish book for Latex
/end{thebibliography}

 

/end{document}


LaTex中的字体控制

粗体

/textbf{Bold Face}

意大利体

/textit{Italic }

斜体

/textsl{slanted}

下划线

/underline{Is there a line below?}

强调

/emph{important notice}


label的一般缩写:

chap: chapter
sec: section
fig: figure
tab: table
eq: equation
lst: code listing

LaTex中的字体大小依次递增

 

/tiny -> /sriptsize -> /footnotesize -> /small -> /large -> /Large ->/LARGE -> /huge -> /Huge

 


 

LaTex中的文字位置关系控制

//或/newline新起一行

/par 新起一段

/newpage 新起一页

 


LaTex的数学公式形式为: $公式$

一些常用命令

分数/frac
上标^
下标_
分数/frac
求和/sum
大于或等于 /geq
包含于 /in
粗体 /mathbf
开方 /sqrt
向量 /vec /overrightarrow
积分 /int
空行 /, /quad /qquad
省略号 /ldots /cdots

 


 

ps2pdf使用方法:

ps2pdf -sPAPERSIZE=a4 /
-dMaxSubsetPct=100 -dCompatibilityLevel=1.3 /
-dSubsetFonts=true -dEmbedAllFonts=true /
-dAutoFilterColorImages=false /
-dAutoFilterGrayImages=false /
-dColorImageFilter=/FlateEncode /
-dGrayImageFilter=/FlateEncode /
-dMonoImageFilter=/FlateEncode /
paper.ps paper.pdf

 

### LaTeX 学习笔记模板示例 为了创建一份结构清晰且美观的学习笔记,可以采用如下所示的 LaTeX 模板。此模板不仅适用于记录日常学习心得,也适合撰写较为正式的技术文档。 #### 文档类声明与包导入 ```latex \documentclass[a4paper,12pt]{article} % 导入必要的宏包 \usepackage{amsmath} % 数学公式支持 \usepackage{graphicx} % 插图功能 \usepackage{hyperref} % 超链接支持 \usepackage{geometry} % 页面布局调整 \usepackage{listings} % 代码高亮显示 \usepackage{xcolor} % 颜色定义和支持 ``` #### 设置页面参数 ```latex \geometry{left=3cm,right=3cm,top=2.5cm,bottom=2.5cm} ``` #### 定义颜色用于代码高亮 ```latex \definecolor{codegreen}{rgb}{0,0.6,0} \definecolor{codegray}{rgb}{0.5,0.5,0.5} \definecolor{codepurple}{rgb}{0.58,0,0.82} \definecolor{backcolour}{rgb}{0.95,0.95,0.92} \lstdefinestyle{mystyle}{ backgroundcolor=\color{backcolour}, commentstyle=\color{codegreen}, keywordstyle=\color{magenta}, numberstyle=\tiny\color{codegray}, stringstyle=\color{codepurple}, basicstyle=\ttfamily\footnotesize, breakatwhitespace=false, breaklines=true, captionpos=b, keepspaces=true, numbers=left, numbersep=5pt, showspaces=false, showstringspaces=false, showtabs=false, tabsize=2 } ``` #### 开始文档主体部分 ```latex \begin{document} \title{LaTeX 学习笔记} \author{} \date{\today} \maketitle \tableofcontents \newpage \section{前言} 本篇笔记旨在记录个人在探索 LaTeX 排版系统的历程中的点滴体会[^2]. \section{基础语法概览} 介绍一些常用的命令和环境... \subsection{段落与分行} 描述如何控制文本格式... \subsection{列表构建} 列举几种不同类型的列表及其用法... \section{数学模式入门} 讲解怎样输入简单的数学表达式以及更复杂的方程式组... \section{图形处理指南} 分享关于插入图片的方法及注意事项... \section{表格设计实例} 展示 table 和 array 环境的区别,并给出具体的应用场景[^4] \section{参考文献管理} 说明 bibtex 的基本概念并提供实际案例来演示其应用方式[^3] \end{document} ``` 上述模板涵盖了从标题页到目录再到各个章节的具体内容框架,还包括了对数学公式、图表的支持,同时也涉及到了参考文献管理和代码片段嵌入等功能模块的设计思路。通过这样一个完整的例子可以帮助新手更好地理解 LaTeX 的工作原理并快速上手实践。
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值