收藏 分销(赏)

tex 间距相关.doc

上传人:pc****0 文档编号:7458389 上传时间:2025-01-05 格式:DOC 页数:5 大小:57.50KB 下载积分:10 金币
下载 相关 举报
tex 间距相关.doc_第1页
第1页 / 共5页
tex 间距相关.doc_第2页
第2页 / 共5页


点击查看更多>>
资源描述
tex 间距相关 From: +------------------------------+ |段落、行距、水平间距、缩进命令| +------------------------------+ 强制分行:\\或\\*[和下行间距离]、\newline 建议分行:\linebreak[0-4,数越大建议力度越大] \linebreak增加字间距,强制换行 \nolinebreak[n]建议不分行 \mbox{内容}内容保持在同一行 分段:\par,或两个回车 分页:自动分页 强制分页:\newpage 建议分页:\pagebreak[n],\nopagebreak[n] 增加当前页高度有时可以避免难看的分页 \enlargethispage{尺寸}可增加的最大高度 \enlargethispage*{尺寸}指定增加高度 水平间距: \quad 插入空白相当于当前字体大小 \qquad=\quad×2 \ ,=\quad×3/18 ~=???好象比\ 小 \hspace{宽度大小},\hspace*{宽度大小} \hfill弹性长度:hspace{\hfill}插入空白,撑满整行 \hphantom{文本内容},占据文本内容的宽度 \vphantom[文本内容},\phantom{文本内容} 导引线:\dotfill,\hrulefill 垂直间距: \vspace{高度}和\vspace*{高度} \vfill:相当于\vspace{\fill} \smallskip:-->\vspace{\smallskipamount} \medskip:-->\vspace{\medskipamount} \bigskip:-->\vspace{\bigskipamount} 段落首行缩进: \setlength{\parindent}{2em},2个M \setlength{\parindent}{0pt},首行不缩进 \CJKindent:两个汉字 \indent与\noindent 每节的第一段首行不会自动缩进 \hspane{\parindent} 在导言区加入:\usepackage{indentfirst} 段落间距:\lineskip+\parskip 可用\setlength修改以上值 行距: \baselineskip:相邻两行基线间距离 \baselinestretch:伸展因子 修改改变行距:\renewcommand{\baselinestretch}[1.2] 放在\begin{document}之后,字体尺寸改变时才生效 LaTeX中常见段落格式的设定-字间距,行间距,段间距,缩进 From: 字间距 只适用于CJK和xeCJK \renewcommand{\CJKglue}{\hskip 宽度} 最好设置为弹性长度比如 \renewcommand{\CJKglue}{\hskip 1pt plus 0.08\baselineskip} 行间距 \linespread{因子} 或者 \renewcommand{\baselinestretch}{因子} 比如 \linespread{1.5} 或者 \renewcommand{\baselinestretch}{1.5} 段间距 设置\parskip的值,比如 \setlength{\parskip}{0.5\baselineskip} 首行缩进 如果默认首行不缩进,则使用indentfirst宏包 \usepackage{indentfirst} 指定某段首行缩进,在段首加 \indent 指定某段首行不缩进,在段首加 \noindent 设置缩进量 \setlength\parindent{2em} 悬挂缩进 在要悬挂缩进的段落前加上 \noindent \hangafter=1 \setlength{\hangindent}{2em} 分别是: 1. 取消首行缩进;2. 设置从第1行之后开始悬挂缩进;3. 设置悬挂缩进量 居中、左对齐、右对齐 如何调整公式间距即公式和正文的间距 来源: 通常两种情况: 第一,我们输入代码的问题。即我们输入公式时,自动自己空行了,会导致间距扩大。如: \documentclass{article} \usepackage{type1cm} \usepackage[fleqn]{amsmath} \begin{document} the  text  \begin{equation} a+b=c \end{equation} the text \begin{equation} a+b=c \end{equation} \end{document} 显示效果为: 正确的代码输入才能保证其美观。 第二,的确是系统提供的公式到文本的间距过大。我以book类为例。公式和文本之间的间距由\abovedisplayshortskip 和 \belowdisplayshortskip 两个距离来控制的。book类10号字体的定义为: \renewcommand\normalsize{%    \@setfontsize\normalsize\@xpt\@xiipt    \abovedisplayskip 10\p@ \@plus2\p@ \@minus5\p@    \abovedisplayshortskip \z@ \@plus3\p@    \belowdisplayshortskip 6\p@ \@plus3\p@ \@minus3\p@    \belowdisplayskip \abovedisplayskip    \let\@listi\@listI} \normalsize 所以我们可以通过修改这些参数来控制文本和公式的间距: 如下: {\setlength\abovedisplayskip{1pt plus 3pt minus 7pt} \setlength\belowdisplayskip{1pt plus 3pt minus 7pt} ... (Equation(s)) ... } 注意 { }的作用。 修改后的显示效果为: 这样修改只能起到局部的作用。 我们可以在导言区重定义normalsize的长度,即可修改文本和公式的间距如: \makeatletter \renewcommand\normalsize{%    \@setfontsize\normalsize\@xpt\@xiipt    \abovedisplayskip 1\p@ \@plus2\p@ \@minus5\p@    \abovedisplayshortskip \z@ \@plus3\p@    \belowdisplayshortskip 6\p@ \@plus3\p@ \@minus3\p@    \belowdisplayskip \abovedisplayskip    \let\@listi\@listI} \makeatother 显示效果如图: 这个值修改得比较小,为了演示效果,大家可根据自己的需要来调整其大小。 TEX标题与正文间距,标题与上下文距离调整 引用来源: \usepackage{titlesec}宏包 \titleformat{\chapter}[display]{\normalfont\huge\bfseries\center}{\chaptertitlename\ \thechapter}{10pt}{\Huge} \titleformat{\section}{\normalfont\Large\bfseries}{\thesection}{1em}{} \titleformat{\subsection}{\normalfont\large\bfseries}{\thesubsection}{1em}{} \titleformat{\subsubsection}{\normalfont\normalsize\bfseries}{\thesubsubsection}{1em}{} \titleformat{\paragraph}[runin]{\normalfont\normalsize\bfseries}{\theparagraph}{1em}{} \titleformat{\subparagraph}[runin]{\normalfont\normalsize\bfseries}{\thesubparagraph}{1em}{} 下面的命令用于调节标题与上下文,段落之间间距命令 \titlespacing*{\chapter} {0pt}{50pt}{40pt} \titlespacing*{\section} {0pt}{3.5ex plus 1ex minus .2ex}{2.3ex plus .2ex} \titlespacing*{\subsection} {0pt}{3.25ex plus 1ex minus .2ex}{1.5ex plus .2ex} \titlespacing*{\subsubsection}{0pt}{3.25ex plus 1ex minus .2ex}{1.5ex plus .2ex} \titlespacing*{\paragraph} {0pt}{3.25ex plus 1ex minus .2ex}{1em} \titlespacing*{\subparagraph} {\parindent}{3.25ex plus 1ex minus .2ex}{1em}
展开阅读全文

开通  VIP会员、SVIP会员  优惠大
下载10份以上建议开通VIP会员
下载20份以上建议开通SVIP会员


开通VIP      成为共赢上传

当前位置:首页 > 百科休闲 > 其他

移动网页_全站_页脚广告1

关于我们      便捷服务       自信AI       AI导航        抽奖活动

©2010-2026 宁波自信网络信息技术有限公司  版权所有

客服电话:0574-28810668  投诉电话:18658249818

gongan.png浙公网安备33021202000488号   

icp.png浙ICP备2021020529号-1  |  浙B2-20240490  

关注我们 :微信公众号    抖音    微博    LOFTER 

客服