2

I wish to design a document with the following mock-up layout, where theorems are separated from the main body of the text in a sort of margin:

enter image description here

\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}

How do I achieve this?

wrb98
  • 876

1 Answers1

2

I think what you want is paracol package.

\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}

enter image description here

CarLaTeX
  • 62,716