72 votes
Accepted

Remove indent when using enumerate

It is not entirely clear whether you want to eliminate the indentation entirely or whether you want the items to be indented but not the labels. A.Ellett interpreted your question in one way and I in ...
  • 184k
41 votes

Indenting a whole paragraph

Perhaps the easiest way to do that is to use \begin{quote} ... \end{quote} environment. It has a pretty similar effect: \documentclass{article} \usepackage{lipsum} \begin{document} \lipsum[1] \...
38 votes

How to add indentation

To forcibly insert a space that is the same length as an indentation you can use the following: \hspace{\parindent} This can be useful if you start a new section with a framed theorem, etc., and ...
35 votes

How to remove indentation in footnote?

cfr's solution clearly works. For people without much experience like myself, I found a simpler solution from stackoverflow and would like to share here: Use footmisc package: \usepackage[hang,...
  • 751
35 votes
Accepted

Leading spaces are not preserved when pasting text

TeXstudio offers three indentation modes: Ignore Indentation: turns auto-indentation off. Keep Indentation: copies the indentation from the previous line. Indent and Unindent Automatically: re-...
  • 1,317
33 votes

break lines in minted code

Version 2.1 of minted has breaklines and linenos: \documentclass[a5paper]{article} \usepackage[T1]{fontenc} \usepackage[]{minted} \begin{document} \begin{minted}[linenos,tabsize=2,breaklines]{text} ...
  • 1.0m
27 votes

Changing left margin in itemize environment of beamer class

This seemed to work for me: \settowidth{\leftmargini}{\usebeamertemplate{itemize item}} \addtolength{\leftmargini}{\labelsep}
22 votes

Writing an algorithm in LaTeX

You have to use \State instead of \\ to indent your lines inside the \For statement. MWE \documentclass{article} \usepackage{algorithm} \usepackage{algpseudocode} \usepackage{pifont} \begin{...
21 votes

Indenting lines of code in algorithm

Define: \algdef{SE}[SUBALG]{Indent}{EndIndent}{}{\algorithmicend\ }% \algtext*{Indent} \algtext*{EndIndent} Then in the algorithmic block, write: \begin{algorithmic}[1] \State Outside indent ...
  • 327
21 votes
Accepted

How do I indent text within a tabular environment?

You could insert an \hspace{<some length>} directive at the start of cells. In the example below, I've set the length to 3mm; you're obviously free to choose a different length. \documentclass{...
  • 448k
20 votes
Accepted

What is the width of the standard paragraph indent in LaTeX's article class?

The standard classes article and report use sizeXY.clo to set parameters for the XYpt option, that is 10pt (default), 11pt and 12pt. In size10.clo we find \if@twocolumn \setlength\parindent{1em} \...
  • 1.0m
20 votes
Accepted

Itemize within itemize and reducing indent in beamer

Don't change the \itemindent but the \leftmargini (for the first level list) or \leftmarginii (second level list). \documentclass{beamer} \begin{document} \begin{frame} \setlength{\leftmargini}{0....
20 votes

When does LaTex add indentation at the start of a paragraph?

The "standard" LaTeX document classes article, report, and book implement a set of conventions that are common in U.S. typography. Among these conventions -- and let me stress that they're conventions,...
  • 448k
18 votes

LaTeX code sniffer and/or beautifier?

I created a website that reformats the latex code to make indents consistent. This uses latexindent in the backend. This if a very rudimentary system but will do all simple indentation of items inside ...
  • 1,221
17 votes
Accepted

How can I indent paragraphs within an itemize environment?

Just to supplement @cfr, I usually use this general configuration \usepackage{enumitem} \setlist{ listparindent=\parindent, parsep=0pt, } To have paragraphs indented as in the normal doc, and ...
  • 49.9k
17 votes
Accepted

How to do certain indentations

Environment tabular A solution with a simple tabular: \documentclass{article} \begin{document} Published by:\quad \begin{tabular}[t]{@{}l@{}} Harry Potter\\ Jack Sparrow\\ Frodo ...
16 votes

No indent in description list

Just to add to @Werner's excellent answer: If you have very long labels in a description environment, sometimes it actually looks nicest to have the text wrap underneath the start of the labels, like ...
  • 3,822
16 votes

Remove indent when using enumerate

\documentclass[12pt,a4paper]{article} \usepackage{enumitem} \usepackage[showframe]{geometry} \begin{document} \begin{enumerate}[leftmargin=2cm] \item first item here \item second item here \item ...
  • 460
15 votes

paragraph style - how to force line break? \paragraph{} \\ - make paragraph a header?

I have seen many hacks for this, including \mbox{} and other approaches but this one is the most convenient! \paragraph ~\\ Source for the answer
15 votes
Accepted

\indent and \noindent: details from Knuth's The TeXbook

Both statements are correct but perhaps nether tell the full truth. In hmode, \indent adds a box of width \parindent so looks like a horizontal space, \noindent adds an empty hlist, which, as your ...
14 votes
Accepted

How to achieve no indentation for a single equation?

\documentclass[a4paper,12pt]{article} \usepackage[fleqn]{amsmath} \begin{document} \noindent Default indentation: \begin{equation} a+b=42 \end{equation} % Now I want no indention for a single ...
14 votes

How can I indent paragraphs within an itemize environment?

\documentclass{article} \usepackage{enumitem,kantlipsum} \begin{document} \begin{enumerate}[label=\arabic*., listparindent=1.5em] \item \kant[1-2] \item \kant[3-4] \end{enumerate} \end{...
  • 184k
14 votes
Accepted

Reduce indent in description in beamer

You can modify the indention with \setbeamersize{description width=0.57cm}, just play around to whatever value you need. \documentclass[14pt,handout]{beamer} \setbeamersize{description width=0.57cm} ...
13 votes
Accepted

Have an indentation for a line after \\ (no, I can't change it into a blank line)

If you process \documentclass{article} \newcommand*\zzz[1]{#1}%does not allow paragraphs \begin{document} \zzz{aaa\endgraf bbb} % two paragraphs \zzz{aaa bbb} \end{document} then you get the ...
12 votes

How to add indentation

\vspace*{6mm} will work by default. Similarly, \hspace*{10mm} will add a line spacing, but you have to reuse it every time you need the space.
  • 153
12 votes

How to add more indentation for section in table of contents

In order to modify indentation in the table of contents, you can modify the definition of \l@chapter, l@section or l@subsection (as you wish). The first value (1.5em in the example below) affects the ...
  • 121
12 votes
Accepted

\hphantom in \tabulary produces extra vertical space instead of horizontal

\hphantom isn't really a documented LaTeX command and it's a good occasion for talking about it. The problem can be seen also in this simpler document, which shows that tabulary is not involved: \...
  • 1.0m
12 votes
Accepted

When does LaTex add indentation at the start of a paragraph?

The short answer is that TeX always indents a new paragraph. However, in some cases the indentation box is removed: just after a sectional title (from \chapter, \section, \subsection and so on) ...
  • 1.0m

Only top scored, non community-wiki answers of a minimum length are eligible