我希望设计一个具有以下模型布局的文档,其中定理与文本主体通过某种边距分开:
\documentclass[11pt,a4paper]{article}
\usepackage{xcolor}
\usepackage[calcwidth]{titlesec}
\usepackage{tikz}
\usepackage{pgfplots} \pgfplotsset{compat=1.12}
%Underlining ruler for subsections
\titleformat{\section}%
{\normalfont\Large\bfseries}% format
{}% label
{0mm}% sep
{%
\vadjust pre{%
\color{gray}%
\hrule width \linewidth height 0.5pt\relax
}%
}% before-code
\begin{document}
\section{Example Section}
\end{document}
我如何实现这个目标?
答案1
我认为你想要的是paracol
包裹。
\documentclass[11pt]{article}
\usepackage[margin=1in]{geometry}
\usepackage{paracol}
\usepackage{amsthm}
\newtheorem{thm}{Theorem}
\newtheorem{mydef}{Definition}
\usepackage{xcolor}
\usepackage[calcwidth]{titlesec}
\usepackage{tikz}
\usepackage{pgfplots}
\pgfplotsset{compat=1.12}
%Underlining ruler for subsections
\titleformat{\section}%
{\normalfont\Large\bfseries}% format
{}% label
{0mm}% sep
{%
\vadjust pre{%
\color{gray}%
\hrule width \linewidth height 0.5pt\relax
}%
}% before-code
\begin{document}
\columnratio{0.3}
\begin{paracol}{2}[\section{Example Section}]
\begin{thm}
Blah blah blah blah blah blah blah blah blah
\end{thm}
\switchcolumn
Some text blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah
\switchcolumn
\begin{mydef}
Blah blah blah blah blah blah blah blah blah
\end{mydef}
\switchcolumn
Some other text blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah
\end{paracol}
\end{document}