LaTeX字体族、字体系列、字体形状和字体大小设置

版权声明:转载时请备注来源 https://blog.csdn.net/wangmeitingaa/article/details/88778183

LaTeX字体族、字体系列、字体形状和字体大小设置

以下是LaTeX代码

%导言区
\documentclass[12pt]{article}%设置normal字体的大小为12磅
\usepackage{ctex}
\newcommand{\myfont}{\textit{\textbf{fancy text}}}%内容与格式分离,定义新的格式。

%正文区(文稿区)
\begin{document}
\section{字体族设置(罗马字体、无衬线字体、打字机字体)}
%字体族设置(罗马字体、无衬线字体、打字机字体)
\textrm{Roman Family} \textsf{Sans Serif Samily} \texttt{Typewriter Family}\\
{\rmfamily Roman Family} {\sffamily Sans Serif Samily} {\ttfamily Typewriter Family}\\
{\rmfamily TeX Live is an easy way to get up and running with the TeX document production system.}\\	
{\ttfamily TeX Live is an easy way to get up and running with the TeX document production system.}\\	

\section{字体系列设置(粗细,宽度——半粗体,粗体)}
%字体系列设置(粗细,宽度——半粗体,粗体)
\textmd{Medium series} \textbf{Boldface series}\\

{\mdseries Medium series} {\bfseries Boldface series}\\

\section{字体形状(直立、斜体、伪斜体、小型大写)}
%字体形状(直立、斜体、伪斜体、小型大写)
\textup{Upright Shape} \textit{Italic Shape} \textsl{Slanted Shape} \textsc{Small Caps}\\
{\upshape Upright Shape} {\itshape Italic Shape} {\slshape Slanted Shape} {\scshape Small Caps}\\

\section{中文字体}
%中文字体
{\songti 宋体} \quad {\heiti 黑体} \quad {\fangsong 仿宋} \quad {\kaishu 楷书}\\
中文字体的\textbf{黑体}与\textit{斜体}\\%中文的textit中文本身中的楷书

\section{字体大小}
%字体大小
\noindent{\tiny Hello}\\
{\scriptsize Hello}\\
{\footnotesize Hello}\\
{\small Hello}\\
{\normalsize Hello}\\
{\large Hello}\\
{\Large Hello}\\
{\LARGE Hello}\\
{\huge Hello}\\
{\Huge Hello}\\

\section{中文字号设置命令}
%中文字号设置命令
\noindent\zihao{-0} 你好\\
\zihao{5} 你好\\

\section{用新命令定义的字体}
\noindent\myfont %这是前面新定义的命令

\end{document}

编译后具体显示的内容

在这里插入图片描述

新浪微博

可关注我的新浪微博,里边动不动会发一些Stata,Latex,Matlab的tips。当然,本人时不时会背一些英语单词,请不要感到烦躁。

猜你喜欢

转载自blog.csdn.net/wangmeitingaa/article/details/88778183