Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

How can I accomplish something like this:

enter image description here

Basically, I want my text to be "indented" after the first line. It would be great if somebody knew an answer. Ideally I would like to do this, because I want my theorems/proofs to look like this:

enter image description here

In my opinion, it makes the whole format much clearer.

share|improve this question
    
Welcome to TeX.sx! May I ask why you want to do this? In my opinion it is not a good typography ... –  Kurt Feb 21 '13 at 22:55
1  
have a look at this answer tex.stackexchange.com/questions/2787/… –  prettygully Feb 21 '13 at 22:58
    
It seems \hangindent1em does the job perfectly. Thanks a lot prettygully. :) –  Thomas Feb 21 '13 at 23:10
2  
The fact that something is easily doable with a word processor doesn't mean it's typographycally sound. I always teach this golden rule: if something is not easy to attain with LaTeX, then it's probably wrong. ;-) –  egreg Feb 21 '13 at 23:41
    
If you are doing this sort of indent for every X (theorem, etc., etc.), it is better to use/design an environment that achieves what you want. This will make modifying the style much easier to maintain. Manual intervention each time is best suited for things like word processors (and even then there are 'styles' or something that one can use for a similar reason). –  jon Feb 21 '13 at 23:46

1 Answer 1

Using the enumitem package, you can fairly easily muck around with the dimensions of a list:

\documentclass{article}
\usepackage{enumitem}
\usepackage{lipsum}
\pagestyle{empty}
\begin{document}
\lipsum[1]
\begin{itemize}[label={},itemindent=-2em,leftmargin=2em]
\item \lipsum[1]
\end{itemize}

\end{document}

enter image description here

If you want to do this for every paragraph, that's a bit more involved.

It doesn't appear that amsthm, or even thm-tools, provide the means for easily creating a theorem with a hanging indent. But, theorem-like environments are built up from \trivlist. So, if you know what you want, you can define your own theorem style from a list environment. You'll probably also want to define your own counter to go with it.

To begin to get a theorem-like structure, you can do something like the following:

\newcounter{mytheoremcounter}[chapter]%% to number within chapters
\newenvironment{mytheorem}
    {\refstepcounter{mytheoremcounter}%% so ref/labels work as you expect
     \begin{list}
           {\bfseries\upshape Theorem \arabic{mytheoremcounter}.}
           {\setlength{\labelwidth=2em}
            \em%
          }
          \item 
    }
    {\end{list}}

enter image description here

Per @GonzaloMedina You can get the amsthm package to work for this purpose. You cleverly sneak the formatting through the argument of a \newtheoremstyle for the body font. As in

\documentclass{book}
\usepackage{enumitem}
\usepackage{lipsum}
\pagestyle{empty}
\usepackage{amsthm}
\newtheoremstyle{mythrm}%
    {0pt}{0pt}
    {\hangindent 2.5em}% body font
    {}
    {\bfseries}
    {.}% punctuation
    {0.5em}
    {}
\theoremstyle{mythrm}
\newtheorem{mytheorem}{Theorem}

\setlength{\parindent}{0pt}
\pagestyle{empty}
\begin{document}

\chapter{Hi}

\lipsum[2]

\begin{mytheorem}{}
\lipsum[2]
\end{mytheorem}

A second theorem
\begin{mytheorem}{}
\lipsum[3]
\end{mytheorem}

\chapter{There}


\begin{mytheorem}{}
\lipsum[2]
\end{mytheorem}

A second theorem
\begin{mytheorem}{}
\lipsum[3]
\end{mytheorem}

\end{document}

enter image description here

share|improve this answer
1  
Your affirmation about amsthm is not entirely true, as the following example shows (sorry, but the code formatting gets lost in comments): \documentclass{article} \usepackage{amsthm} \usepackage{lipsum} \newtheoremstyle{hindent} {\topsep}{\topsep} {\hangindent 2.5em}{} {\bfseries}{:} {.5em}{} \theoremstyle{hindent} \newtheorem{theo}{Theorem} \begin{document} \begin{theo} \lipsum[4] \end{theo} \end{document} –  Gonzalo Medina Feb 22 '13 at 1:21
    
@GonzaloMedina very clever. Why not make that another answer? –  A.Ellett Feb 22 '13 at 1:27
    
I think it would be better if you add this possibility to your answer, to make it comprehensive. What do you think? –  Gonzalo Medina Feb 22 '13 at 1:57

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.