MWE:
\documentclass[12pt,english,a4paper]{report}
\usepackage{lipsum}
\begin{document}
\section{first section}
\lipsum[1-1]% in section, \textwidth = x
\subsection{first subsection}
\lipsum[1-1]% in subsection, \textwidth = y
\begin{description}% \textwidth = z
\item{one} text
\item{two} texts
\end{description}
\subsection{second subsection}
\lipsum[1-1]% in subsection, \textwidth = y
% how to exit from subsection but remain in section
\lipsum[1-1] % in section, \textwidth = x
\end{document}
As shown above, how to change textwidth of different section, subsection, subsubsection, description etc.
(I don't know what tags to give, basic tex question related to textwidth)
Best Answer
You could use the environment
adjustwidth
from thechangepage
-package. It lets you adjust your textareas left and right edges. The code below will make the left edge 1cm shorter, and the right edge 2cm short. If you want to increase the width, just use negative values. At the end of the environment, the change is of course reset.EDIT
I've created a new environment, called
indentLevel
, which takes one input, an integer of how many levels of indentations you want. I've included two different codes for this one, one simple which only adds the space of the length\parindent
for each specified level of indentations, and only for the left hand side. This one is currently disables, but just uncomment the line in the environment, and comment the other one. If using the simple method, you don't need the helper macros ndentRightand
indentLeft`.I've also added a different approach, where you can customize each level of indentation, both left and right side. To change the settings, you change the lengths specified in the helper macro
indentRight
andindentLeft
for the levels you want.Code