我正在使用该outlines
软件包,我很想知道如何修改大纲中条目/项目之间的垂直间距。我很乐意使用它\onehalfspacing
来设置单个条目/项目中行之间的垂直间距。但是我如何将不同条目/项目之间的间距设置为其他值(例如双倍间距)?
这是一个工作示例,其中行距设置为一半。我该如何修改它,以便大纲中的条目/项目间隔超过一半?(此工作示例有一些自定义项,当前请求的解决方案需要与之兼容。)
\documentclass[11pt,a4paper]{article}
\usepackage{setspace}
% Outlines configurations
\usepackage{outlines}
\usepackage{enumitem}
\setenumerate[1]{label=\Roman*.}
\setenumerate[2]{label=\Alph*.}
\setenumerate[3]{label=\roman*.}
\setenumerate[4]{label=\alph*.}
\makeatletter
\newenvironment{myoutline}[1][]{%
\ifthenelse{\equal{#1}{}}{}{\renewcommand{\ol@type}{#1}}%
\ol@z%
\newcommand{\0}{\ol@toz\ol@z}%
\newcommand{\1}{\ol@toi\scshape\bfseries\LARGE\ol@i\item}%
\newcommand{\2}{\ol@toii\normalfont\Large\bfseries\ol@ii\item}%
\newcommand{\3}{\ol@toiii\normalfont\normalsize\ol@iii\item}%
\newcommand{\4}{\ol@toiiii\normalfont\normalsize\ol@iiii\item}%
}{%
\ol@toz\ol@exit%
}
\makeatother
\begin{document}
\onehalfspacing
\begin{outline}[enumerate]
\1 Mathematics
\2 The study of topics such as quantity (numbers), structure, space, and change. There is a range of views among mathematicians and philosophers $\ldots$
\2 Often, mathematics is conceptually divided into two camps: applied and pure mathematics. In reality, however, mathematics does not rigidly abide by this dichotomy.
\1 Computer Science
\2 Computer Science (abbreviated CS or CompSci) is the scientific and practical approach to computation and its applications. It is the systematic study of the $\ldots$
\3 Famous computer scientists
\4 Charles Babbage
\4 Donald Knuth
\3 History of computer science
\end{outline}
\end{document}
理想情况下,我正在寻找一个可以修改单个标量值的解决方案,例如:
\newcommand{\outlinespacingscalar}{1.5}
这样我就可以调整这个标量来获得最适合给定文档的外观和感觉。
答案1
我更新了环境的定义outline
,坚持\vspace
使用 的值outlinespacingscalar
,如请求的那样。我认为您的请求意味着您只想要 实例的额外空间\1
,尽管显然可以为其他实例设置不同的 gap 值。
\documentclass[11pt,a4paper]{article}
\usepackage{outlines}
\usepackage{setspace}
% Outlines configurations
\usepackage{enumitem}
\setenumerate[1]{label=\Roman*.}
\setenumerate[2]{label=\Alph*.}
\setenumerate[3]{label=\roman*.}
\setenumerate[4]{label=\alph*.}
\makeatletter
% the outline environment provides commands \1..\4 for
% introducing items at level 1..4, and \0 for normal paragraphs
% within the outline section.
\renewenvironment{outline}[1][]{%
\ifthenelse{\equal{#1}{}}{}{\renewcommand{\ol@type}{#1}}%
\ol@z%
\newcommand{\0}{\ol@toz\ol@z}%
\newcommand{\1}{\vspace{\dimexpr\outlinespacingscalar\baselineskip-\baselineskip}\ol@toi\ol@i\item}%
\newcommand{\2}{\ol@toii\ol@ii\item}%
\newcommand{\3}{\ol@toiii\ol@iii\item}%
\newcommand{\4}{\ol@toiiii\ol@iiii\item}%
}{%
\ol@toz\ol@exit%
}
\makeatother
\def\outlinespacingscalar{1.5}
\begin{document}
\onehalfspacing
\begin{outline}[enumerate]
\1 Mathematics
\2 The study of topics such as quantity (numbers), structure, space, and change. There is a range of views among mathematicians and philosophers $\ldots$
\2 Often, mathematics is conceptually divided into two camps: applied and pure mathematics. In reality, however, mathematics does not rigidly abide by this dichotomy.
\1 Computer Science
\2 Computer Science (abbreviated CS or CompSci) is the scientific and practical approach to computation and its applications. It is the systematic study of the $\ldots$
\3 Famous computer scientists
\4 Charles Babbage
\4 Donald Knuth
\3 History of computer science
\end{outline}
\end{document}
答案2
由于您正在使用,因此enumitem
您可以将itemsep=
and/or添加parsep=
到\setenumerate
:
下面我已经定义\ItemSpacing
并且\ParSpacing
两者都适用于全部列表级别,但如果需要,您可以为每个级别定义一个单独的级别。
代码:
\documentclass[11pt,a4paper]{article}
\usepackage{setspace}
\newcommand{\ItemSpacing}{15pt}%
\newcommand{\ParSpacing}{10pt}%
% Outlines configurations
\usepackage{outlines}
\usepackage{enumitem}
\setenumerate[1]{itemsep={\ItemSpacing},parsep={\ParSpacing},label=\Roman*.}
\setenumerate[2]{itemsep={\ItemSpacing},parsep={\ParSpacing},label=\Alph*.}
\setenumerate[3]{itemsep={\ItemSpacing},parsep={\ParSpacing},label=\roman*.}
\setenumerate[4]{itemsep={\ItemSpacing},parsep={\ParSpacing},label=\alph*.}
\makeatletter
\newenvironment{myoutline}[1][]{%
\ifthenelse{\equal{#1}{}}{}{\renewcommand{\ol@type}{#1}}%
\ol@z%
\newcommand{\0}{\ol@toz\ol@z}%
\newcommand{\1}{\ol@toi\scshape\bfseries\LARGE\ol@i\item}%
\newcommand{\2}{\ol@toii\normalfont\Large\bfseries\ol@ii\item}%
\newcommand{\3}{\ol@toiii\normalfont\normalsize\ol@iii\item}%
\newcommand{\4}{\ol@toiiii\normalfont\normalsize\ol@iiii\item}%
}{%
\ol@toz\ol@exit%
}
\makeatother
\begin{document}
\onehalfspacing
\begin{outline}[enumerate]
\1 Mathematics
\2 The study of topics such as quantity (numbers), structure, space, and change. There is a range of views among mathematicians and philosophers $\ldots$
\2 Often, mathematics is conceptually divided into two camps: applied and pure mathematics. In reality, however, mathematics does not rigidly abide by this dichotomy.
\1 Computer Science
\2 Computer Science (abbreviated CS or CompSci) is the scientific and practical approach to computation and its applications. It is the systematic study of the $\ldots$
\3 Famous computer scientists
\4 Charles Babbage
\4 Donald Knuth
\3 History of computer science
\end{outline}
\end{document}