Is it possible to set a length specifically for an environment? I know it is possible to change lengths for parts of the document only, by placing the \setlength
command between {}
, but when using an environment many times in a document, it would be quite cumbersome to set the length as many times as the environment is used.
In my specific case I would like to change \parindent
only for the paracol
environment, but not for the rest of the document. An MWE of my problem is this.
\documentclass[a4paper]{article}
\usepackage{paracol,lipsum,microtype}
\usepackage[norsk,british]{babel}
\usepackage[utf8]{inputenc}
\begin{document}
\lipsum[1]
\begin{paracol}{2}
\newlength{\LeftHeader}
\switchcolumn[0]*[\subsection*{Norwegian\settowidth{\LeftHeader}{Norwegian}\hspace{0.5\textwidth}\hspace{-\LeftHeader} English}]
\selectlanguage{norsk} Universitetet i Oslo ble opprettet 2. september 1811, eller det vil si: Den gangen het det Det kongelige Frederiks Universitet, og det gjorde det helt frem til 1939.
\switchcolumn
\selectlanguage{british} The University of Oslo was founded the second of september 1811, or actually: then it was called The royal Frederiks University, and it did so until 1939.
\switchcolumn*
\selectlanguage{norsk} Påls mor ble født syv år senere, unnfanget i de elleville fredsdager, født en kald februarlørdag i 1946.
\switchcolumn
\selectlanguage{british} Paul's mother was born seven years earlier, conceived during those wild days of peace, born on a cold february saturday in 1946.
\end{paracol}
\end{document}
The \parindent
should be maintained at the green block, but be removed at the red blocks. How does one change this length only for the paracol
environment, and for all paracol
environments that are used throughout the document?