Hey!
Let's say I wanted to make a new environment that looks like a description list item, that is, the first line is not indented, but the rest of the lines are. How can I do that?
And, just out of curiosity, could I make an environment that would indent every two lines?
General ⇒ A new env. like description items
NEW: TikZ book now 40% off at Amazon.com for a short time.

- localghost
- Site Moderator
- Posts: 9202
- Joined: Fri Feb 02, 2007 12:06 pm
A new env. like description items
Search the forum for the xlist environment. This could be suitable solution for your problem. You can also try customize the standard list environments with enumitem.
Best regards
Thorsten¹
Best regards
Thorsten¹
How to make a "Minimal Example"
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
Re: A new env. like description items
Thank you for your answer!
Oh, maybe I wasn't clear enough... I dont want to make some kind of list, I want to make an env that looks kind of like a description item, but that has nothing to do with some kind of list.
Oh, maybe I wasn't clear enough... I dont want to make some kind of list, I want to make an env that looks kind of like a description item, but that has nothing to do with some kind of list.
A new env. like description items
Dou you mean a hanging indent? Try this:
Code: Select all
\parindent=0pt
\hangindent=24pt
\hangafter=1
Text...
A new env. like description items
Yes, with the \parshape command you can use every possible combination of indentations:tufflax wrote:And, just out of curiosity, could I make an environment that would indent every two lines?
Code: Select all
\newcommand*\AltIndentParShape[2]{%
\ifnum#1>0 %
0pt \linewidth \dimexpr(#2) \dimexpr\linewidth-(#2) %
\expandafter\AltIndentParShape\expandafter{\number\numexpr#1-2}{#2}%
\fi
}
\newenvironment{AlternatingIndent}[2]{%
\everypar{\parshape#1 \AltIndentParShape{#1}{#2}}%
}{}
Code: Select all
\begin{AlternatingIndent}{100}{6pt+12pt}
... Text ...
\end{AlternatingIndent}