General ⇒ How to automatically indent section + all corresponding txt?
How to automatically indent section + all corresponding txt?
I think, subject describes the problem. I mean - it all together and automatically.
Thank you!
Learn LaTeX easily with newest books:
The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis
The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more
LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis
How to automatically indent section + all corresponding txt?
Code: Select all
\documentclass{article}
\usepackage{titlesec}
\usepackage{lipsum}
\newenvironment{myindentpar}[1]%
{\begin{list}{}%
{\setlength{\leftmargin}{#1}}%
\item[]%
}
{\end{list}}
\titlespacing{\section}{1cm}{*4}{*1.5}
\begin{document}
\section{First section}
\begin{myindentpar}{1cm}
\lipsum[1]
\end{myindentpar}
text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text
\end{document}