LaTeX学习笔记

LaTeX学习笔记

1 使用TeXStudio实现LaTeX文档的编写

`\documentclass{article}`

`\usepackage{ctex}`

`\begin{document}
	`你好,LaTeXe.`
`\end{document}`

在这里插入图片描述

2 LaTex 源文件的基本结构与中文处理方法

`% 导言区`
`\documentclass{article}%book,report, letter`

`\usepackage{ctex}%中文显示 ctex宏包有什么作用呢?cmd->texdoc ctex可以打开ctex宏包手册,查看ctex使用方法 。若上面用ctexart,ctexbook,ctexrep,此条命令可注释掉。查看帮助文件:cmd->texdoc lshort-zh`


`\newcommand\degree{^circ}%定义degree命令`

`\title{\heiti 杂谈勾股定理}%指定字体是黑体`
`\author{\kaishu WuKong Sun}`
`\date{\today}`

`% 正文区`
`\begin{document}`
	`\maketitle`
	`Hello,world!`
``	

	%here is my big formula
	Let $f(x)$ be defined by the formula
	$$f(x) = 3x^2 + x - 1$$   %$行内公式;$$公式另起一行
	which is a polynomial of degree 2.

	勾股定理可以用现代语言表述如下:
	
	直角三角形斜边的平方等于两腰的平方和。
	
	可以用符号语言表述为:设指教三角形$ABC$,其中$\angle C=90\degree$,则有:
	
	\begin{equation}%产生带编号的行间公式    
	AB^2 = BC^2 + AC^2
	\end{equation}
`\end{document}`

在这里插入图片描述

3 LaTex字体字号设置

%导言区
\documentclass[12pt]{article}

\usepackage{ctex}

%LaTex思想:格式与内容分离
%定义myfont命令(方便修改)
\newcommand{\myfont}{\textit{\textbf{\textsf{Fancy Text}}}}



%正文区(文稿区)
\begin{document}
	
	% 字体族设置(罗马字体,无衬线字体,打字机字体)
	% 方法一:字体设置命令
	\textrm{Roman Family}  \textsf{Sans Serif Family} \texttt{Typewriter Family}
	
	%方法二:字体设置声明
	{\rmfamily Roman Family} {\sffamily Sans Serif Family} {\ttfamily Typewriter Family}
	
	{\sffamily sfasfdasfdasfasdfargegrergasdfasddddddddddddddddddhbjk!}
	
	
	{\ttfamily asdfasdgfagergwefasdfag
	wef}
	
	
	%字体系列设置(粗细、宽度)
	\textmd{Medium Series} \textbf{Boldface Serise}
	
	
	{\mdseries Medium Series} {\bfseries Boldface Series}
	
	
	
	%字体形状(直立、斜体、伪斜体、小型大写)
	\textup{Upright Shape} \textit{Italic Shape}
	\textsl{Slanted Shape} \textsc{Small Caps Shape}
	
	{\upshape Upright Shape} {\itshape Italic Shape} {\slshape Slanted Shape} {\scshape Small Cap Shape}
	
	%中文字体
	{\songti 宋体} \quad {\heiti 黑体} \quad {\fangsong 仿宋} \quad {\kaishu 楷书}%\quad 代表当前字体下两个汉字的空白距离
	
	中文字体的\textbf{粗体}与\textit{斜体}%中文粗体用黑体表示,斜体用楷书表示
	
	%字体大小 与导言区documentclass[10pt]{article}有关10pt~12pt
	{\tiny			Hello}\\
	{\scriptsize	Hello}\\
	{\footnotesize	Hello}\\
	{\small			Hello}\\
	{\normalsize	Hello}\\
	{\large			Hello}\\
	{\Large			Hello}\\
	{\LARGE			Hello}\\
	{\huge			Hello}\\
	{\Huge			Hello}\\
	
	
	% 中文字号设置命令
	\zihao{-0} 你好 %小初号
	\zihao{5} 你好  %五号
	
	
	%使用导言区定义的字体
	\myfont
	
\end{document}

在这里插入图片描述
代码:
1
2
3
查看帮助文档:

  • cmd->texdoc ctex
  • cmd->texdoc lshort-zh
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值