LaTeX Indentation within Section and Subsection

In summary, the conversation is about a person who is new to using LaTeX and is trying to create a basic template. They are having trouble with indenting lines in their \section and \subsection commands. The suggested solution is to use the \parindent command and define the \section and \subsection commands accordingly.
  • #1
Saladsamurai
3,020
7
I am very new to LaTeX (outside of PF). I am trying to write up a basic Template to use as a reference.

Most issues I have been able to find documentation for. However, I am haveing trouble finding this one.

I am using \documentclass{article} and cannot seem to get my lines to indent within a \section or \subsection

Any thoughts?
 
Physics news on Phys.org
  • #2
Hi there,

Have you tried with the \parindent command?

Cheers
 
  • #3
you can define those:

\def\section{\@startsection {section}{1}{\z@}{-3.5ex plus -1ex minus
-.2ex}{2.3ex plus .2ex}{\bf }}
\def\subsection{\@startsection{subsection}{2}{\z@}{-3.25ex plus -1ex minus
-.2ex}{1.5ex plus .2ex}{\it }}

And adjust accordingly.
 

1. How do I change the indentation within a section or subsection in LaTeX?

In order to change the indentation within a section or subsection in LaTeX, you can use the \setlength command followed by the name of the indentation you want to adjust (e.g. \setlength{\parindent}{0.5in}). This will set the indentation to the desired length, such as 0.5 inches in this example.

2. Can I change the indentation for only a specific section or subsection?

Yes, you can change the indentation for a specific section or subsection by using the \setlength command within the corresponding section or subsection. This will only affect the indentation for that specific section or subsection and will not impact the rest of the document.

3. What is the default indentation for sections and subsections in LaTeX?

The default indentation for sections and subsections in LaTeX is 1.5em, which is equivalent to one and a half times the font size. This can be changed by using the \setlength command as mentioned in the first question.

4. How can I remove the indentation within a section or subsection altogether?

To remove the indentation within a section or subsection in LaTeX, you can use the \noindent command at the beginning of the section or subsection. This will override the default indentation and leave no indentation for that specific section or subsection.

5. Is it possible to have different indentation for different levels of sections and subsections?

Yes, it is possible to have different indentation for different levels of sections and subsections in LaTeX. This can be achieved by using the \setlength command within the corresponding section or subsection and adjusting the indentation accordingly. For example, you can have a smaller indentation for subsections compared to sections by setting the indentation to a smaller length for subsections.

Similar threads

  • MATLAB, Maple, Mathematica, LaTeX
Replies
5
Views
381
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
9
Views
3K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
5
Views
31K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
944
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
3
Views
993
  • MATLAB, Maple, Mathematica, LaTeX
Replies
11
Views
4K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
4
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
2
Views
2K
Back
Top