figure字体 latex_Latex字体大小和样式

本文概述

Latex字体

Latex纸尺寸和字体大小

我们通常在方括号[]中定义纸张大小和字体大小。

点大小可以用[10pt]的方式描述。其他字体大小为8pt, 9pt, 10pt, 11pt, 12pt, 14pt, 17pt, 20pt。

Latex的默认字体大小为10pt。

纸张类型及其尺寸如下:

信纸(11 x 8.5英寸)

法律纸(14 x 8.5英寸)

a5纸(5.8 x 8.3英寸)

a4纸(8.3 x 11.7英寸)

执行纸(10.5 x 7.25英寸)

b5纸(25 x 17.6厘米)

Latex尺寸

Tex生成的默认字体大小或类型大小为10pt。有一些声明用于更改类型大小。所有类型大小以及命令的表如下所示:

在上述顺序中, \ tiny是最小的, 而\ Huge是最大的。为了理解, 让我们考虑以下示例:

\documentclass[a4paper]{letter}

\begin{document}

\begin{center}

\begin{huge}

\textbf{The \LaTeX\ Technical Institute}\

\end{huge}

\begin{LARGE}

\textsc{\Certification}

\end{LARGE}

\end{center}

\noindent This to certify that Mr. R.P Sharma has undergone a course in this institute and is qualified to be Technical Expert.

\begin{flushright}

\textsf{The Director}\

The \LaTeX\ Technical Institute

\end{flushright} %used for aligning to the right

\end{document}

下图显示了此代码的输出:

同样, 你可以根据要求更改字体和样式。

Latex风格

样式分为家庭, 系列和形状。输出中的字体由这三个特征组成。

样式表如下:

样式

命令

Roman

\textrm{roman}

Typewriter

\texttt{typewriter}

Sans serif

\ textsf {无衬线}

该系列的表格如下:

样式

命令

boldface

\textbf{boldface}

medium

\textmd{medium}

形状表如下:

样式

命令

italic

\textit{italic}

slanted

\textsl{slanted}

upright

\textup{upright}

小盖

\textsc{small cap]

下面给出了使用这三种类别的方式或过程:

\documentclass{article}

\begin{document}

\textit{\textbf{ the topic discussed is Latex.}}

\textrm{\textsl{ it contains the process and characteristics}}

\end{document}

此代码的输出将是:

如果要以单独的行显示以上文本, 则使用\ newline命令, 如下所示:

\documentclass{article}

\begin{document}

\textit{\textbf{ the topic discussed is Latex.}\newline}

\textrm{\textsl{ it contains the process and characteristics}}

\end{document}

输出:

Latex替代了你的计算机上不可用的字体样式的近似值。

还有另一个称为\ emph的命令, 用于样式目的。它使用系列系列和当前字体。

当我们位于普通(竖立)文本的中间时, \ emph用于产生斜体形状。如果当前形式为斜体, 则将其切换为直立形状。

示例如下所示:

\documentclass[12pt]{article}

\begin{document}

\textit{ a figure with six sides is called \emph{hexagon} and with five sides is called \emph{pentagon}.}

\end{document}

下图显示了以上代码的输出:

你可以看到使用\ emph命令的单词与其他单词之间的区别。

在另一个示例中, 我们使用粗体字代替了上面的斜体字, 如下所示:

\documentclass[16pt]{article}

\begin{document}

\textbf{ a figure with six sides is called \emph{hexagon} and with five sides is called \emph{pentagon}.}

\end{document}

下图显示了上述代码的输出:

文件资料

总览

它包括开始和结束时使用的基本命令。它还包括编写文本的过程。在此模块中, 我们已使用TEXMAKER编写代码。Latex的概述如下:

\documentclass[a5paper, 14pt]{article}

\begin{document}

The text you type is written here.

\end{document}

在Texmaker中写入此文档后, 你必须将此文件保存在任何特定文档中。单击菜单栏上的“快速构建”按钮, 如下所示:

上述文档文件的输出将是:

注意:如果不保存文件或文档, 则无法编译代码。因此, 请确保在编译之前保存文档。

下面给出了常用的其他命令, 这些命令将在本项目中进一步实现。

flushright和flushleft:这些命令写为\ begin {flushright}或\ begin {flushleft}。这些用于使文本在文档的左右对齐。

\ noindent:如果要在不缩进的情况下开始任何段落或在不中断的情况下继续该段落, 则使用此命令。

故障排除

在Latex中, 如果文档文件中有错误, 那么它将在编译后在底部以红色显示所有错误。错误将得到详细说明。

错误看起来将如下图所示:

之后, 转到特定的行并删除错误。保存文件, 然后可以再次编译。

其他字体样式

其他使用的字体样式和相应的代码如下:

如果你希望文档的大小不同, 则可以使用extsizes包。使用的命令是\ documentclass [10pt] {extarticle}和\ documentclass [14pt] {extreport}。

你还可以使用其他样式来设置文本样式。代码如下:

\documentclass[9pt]{extarticle}

\begin{document}

This text can be arranged in a unique way as given below:\\

{\fontsize{50}{60}\selectfont \LaTeX}{\fontsize{5}{6}\selectfont TeX!}

{\Huge \LaTeX}{\tiny TeX!}

\end{document}

输出如下所示:

\ fontsize和\ selectfont命令用于修改文本的大小。你可以根据要求设置尺寸。

字体家族

下面列出了常见的字体系列:

字体家族

完整形式

cmm

计算机现代斜体

cmsy

计算机现代符号

cmex

计算机现代扩展

cmr

现代计算机罗马

cmss

现代计算机

cmtt

现代计算机打字机

ptm

Adobe Times

phv

Adobe Helvetica

pcr

Adobe快递

下表列出了字体系列的粗细和粗细支持的标准:

sb-半粗体

ub-超粗体

b-加粗

eb-特粗体

ul-超轻

el-超轻

l灯

sl-半光

m-中(正常)

标准

完整形式

百分比百分比

uc

超浓缩

50%

ec

超浓缩

62.5%

c

Condensed

75%

sc

半冷凝

87.5%

x

Expanded

125%

ex

额外扩展

150%

ux

超扩展

200%

m

Medium

100%

sx

半展开

112.5%

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值