LaTex字体设置

%导言区
\documentclass[10pt]{article}%文档类参数控制normalsize大小

\usepackage{ctex}

%LaTex思想是格式与内容分离,不建议在文档中使用大量命令
%可使用newcommand命令定义一个新的命令,需要修改时直接修改命令即可
\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 who you are? you find self on everyone ground. take you as the same as the others!}%使用大括号限定声明范围

    \ttfamily who you are? you find self on everyone ground. take you as the same as the others!%声明不使用大括号,后续字体全部是一样的字体



    %字体系列设置(粗细、宽度)
    \textmd{Medium Series}
    \textbf{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 Caps Shape}

    %中文字体
    {\songti 宋体}\quad{\heiti 黑体}\quad{\fangsong 仿宋}\quad{\kaishu 楷书}

    %字体大小设置
    {\tiny hello}\\%\\代表换行
    {\scriptsize hello}\\
    {\footnotesize hello}\\
    {\small hello}\\
    {\normalsize hello}\\
    {\large hello}\\
    {\Large hello}\\
    {\LARGE hello}\\
    {\huge hello}\\
    {\Huge hello}\\

    %中文字号设置命令
    %命令细节可在命令行窗口用texdoc ctex查看
    \zihao{5} 你好!%-0代表小初

    \myfont

\end{document}
  • 1
    点赞
  • 5
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值