美文网首页
2.快速参考

2.快速参考

作者: 相思清狂 | 来源:发表于2021-07-15 10:54 被阅读0次

The easiest way to change the format is by means of a set of package options and a couple of commands. If you feel happy with the functionality provided by this set of tools, you need not go further in this manual. Just read this section and ignore the subsequent ones.
更改格式的最简方法是使用宏包提供的一系列选项和命令。如果您对这些工具提供的功能感到满意,则无需进一步阅读本手册。只需阅读本节,忽略后面的内容。

2.1. 格式

There are three option groups controlling font, size and align. You need not set all of these groups, since a default is provided for each one; however, you must use at least an option from them if you want this easy setup."
有三组选项用于控制字体、大小、对齐。并不需要设置所有选项,因为每组选项都设有默认值;尽管如此,如果你希望使用这种 “简单设置”,则至少要使用其中的一个选项。

  • rm·sf·tt·md·bf·up·it·sl·sc
    Select the corresponding family/series/shape. Default is bf.
    选择相应的字体/衬线/样式。默认为 bf。
  • big·medium·small·tiny
    Set the size of titles. Default is big, which gives the size of standard classes. With tiny, sections (except chapters) are typed in the text size. medium and small are intermediate layouts.
    设置标题的大小。默认为 big,它是标准文档类的大小。使用 tiny 的话,节(章除外)会按照文本的大小打印。 medium 和 small 是介于两者之间的布局。
  • raggedleft·center·raggedright
    Control the alignment.
    控制对齐方式。

2.2. 间距

  • compact
    This option is independent from those above and reduces the spacing above and below the titles.
    此选项独立于上面的选项,用于减少标题上方和下方的间距。

2.3. 大写

  • uppercase
    Uppercases titles. Depending on the class, it might not work in \chapter and \part.
    大写标题。根据类的不同,它可能无法在\chapter\part中工作。

2.4. 工具

  • \titlelabel{<label-format>}
    Changes the label format in sections, subsections, etc. A \thetitle command is provided which is respectively \thesection, \thesubsection, etc. The default value in standard classes is
    更改节、子节等的标签格式。\thetitle命令的可选值为\thesection、
    \thesubsection 等。标准类中的默认值为
    \titlelabel{\thetitle\quad}
    and you may add a dot after the counter simply with
    您可以在计数器后面添加一个点
    \titlelabel{\thetitle.\quad}
  • \titleformat*{<command>}{<format>}
    This command allows to change the <format> of a sectioning command, as for example:
    这个命令允许变更分节命令的<format>,比如下面的例子:
    \titleformat*{\section}{\itshape}

2.5 示例

键入如下代码,其显示效果附后。

\documentclass[12pt,a4]{report}    % 文档类声明
\usepackage[]{titlesec}           %引入宏包
\begin{document}
\tableofcontents                %列出目录
\chapter{Advanced Interface}
    \section{Format}
    \section{Spacing}
    \section{Spacing related tools}
    \section{Rules}
\chapter{Advanced Interface}
    \section{Breaks}
    \section{Other Package}
    \section{Extended Settings}
    \section{Creating new levels}
\end{document} 

\usepackage{titlesec}命令加入选项,效果附后

\usepackage[sf,small,raggedleft,compact,uppercase]{titlesec}%引入宏包

加入\titleformat命令:
\usepackage[sf,small,raggedleft,compact,uppercase]{titlesec}%引入宏包
\titleformat{\section}{\LARGE\sffamily\slshape}
{\thesection.\quad}{1em}{}

相关文章

  • 2.快速参考

    The easiest way to change the format is by means of a set...

  • LeetCode 148——排序链表

    1. 题目 2. 解答 2.1 快速排序 可参考 快速排序和归并排序 中的第一种快速排序思想,与在数组中排序有两点...

  • [ Git ] 快速参考

    配置 常用的用户信息配置 常用的别名配置 git rm 的用法 git reset 的用法 git stash 的...

  • [ AJAX ] 快速参考

    参考阮一峰老师的教程 一般用法 ajax对象的readyState (0)表示 XMLHttpRequest 实例...

  • SQL 快速参考

    常用的SQL 语句记录一下: AND / OR:SELECT column_name(s) FROM table_...

  • Unity快速参考

    当在用Unity工作的时侯,我发现我会被重复地问同样的问题。 Awake()和Start()区别是什么? 再次启动...

  • Linux设备驱动程序学习----8.模块构造快速参考

    8.模块构造快速参考 更多内容请参考Linux设备驱动程序学习----目录 模块构造-快速参考 insmodmod...

  • Bash 终端/云端控制台知识库

    Bash 参考手册 Bash 快速参考表 了解 Shell

  • 2.快速排序

    1.原理划分交换排序。它采用了一种分治的策略,通常称其为分治法(Divide-and-ConquerMethod)...

  • 2.快速排序

    Array.prototype.quick_sort = function() { var len = this....

网友评论

      本文标题:2.快速参考

      本文链接:https://www.haomeiwen.com/subject/kjlppltx.html