How to Underline Section-Headings In Latex?

7 minutes read

In order to underline section headings in LaTeX, you can use the command "\section" and then the title of the section in curly braces. To actually underline the section heading, you can use the package "sectsty" and the command "\underline" before the section title. This will add an underline to the section heading when the LaTeX document is compiled. Make sure to include the "sectsty" package in the preamble of your document in order to make use of this command.

Best LaTeX Books To Read in November 2024

1
The LaTeX Companion: Parts I & II, 3rd Edition (Tools and Techniques for Computer Typesetting)

Rating is 5 out of 5

The LaTeX Companion: Parts I & II, 3rd Edition (Tools and Techniques for Computer Typesetting)

2
Text and Math Into LaTeX

Rating is 4.9 out of 5

Text and Math Into LaTeX

3
LaTeX Cookbook: Over 100 practical, ready-to-use LaTeX recipes for instant solutions

Rating is 4.8 out of 5

LaTeX Cookbook: Over 100 practical, ready-to-use LaTeX recipes for instant solutions

4
LaTeX: A Document Preparation System

Rating is 4.7 out of 5

LaTeX: A Document Preparation System

5
LaTeX Beginner's Guide - Second Edition: Create visually appealing texts, articles, and books for business and science using LaTeX

Rating is 4.6 out of 5

LaTeX Beginner's Guide - Second Edition: Create visually appealing texts, articles, and books for business and science using LaTeX

6
The LaTeX Companion (Tools and Techniques for Computer Typesetting)

Rating is 4.5 out of 5

The LaTeX Companion (Tools and Techniques for Computer Typesetting)

7
LaTeX Graphics with TikZ: A practitioner's guide to drawing 2D and 3D images, diagrams, charts, and plots

Rating is 4.4 out of 5

LaTeX Graphics with TikZ: A practitioner's guide to drawing 2D and 3D images, diagrams, charts, and plots

8
Learning LaTeX, Second Edition

Rating is 4.3 out of 5

Learning LaTeX, Second Edition


How to left-align section headings in LaTeX?

To left-align section headings in LaTeX, you can use the titlesec package. Here's a simple example:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
\documentclass{article}
\usepackage{titlesec}

\titleformat{\section}[hang]{\normalfont\bfseries}{\thesection}{1em}{} % left-align section headings

\begin{document}

\section{Introduction}
This is the introduction section.

\section{Methodology}
This is the methodology section.

\end{document}


In this example, we used the \titleformat command from the titlesec package to specify the format for section headings. The [hang] argument indicates that the heading should be left-aligned. You can adjust the spacing and formatting as needed by modifying the arguments passed to \titleformat.


How to bold section headings in LaTeX?

To bold section headings in LaTeX, you can use the \textbf{} command within the \section{} command. For example:

1
\section{\textbf{Introduction}}


This will make the section heading "Introduction" bold. You can also use the titlesec package to customize the appearance of section headings further.


How to change the font size of section headings in LaTeX?

To change the font size of section headings in LaTeX, you can use the titlesec package. Here's an example of how to change the font size of section headings to \Large:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
\documentclass{article}
\usepackage{titlesec}

\titleformat{\section}
{\Large\bfseries} % Set the font size to \Large
{} % No additional formatting needed
{0pt} % No space before the title
{} % Title of the section

\begin{document}
\section{Introduction}
This is the introduction section.
\end{document}


You can change the font size to other values such as \small, \footnotesize, \normalsize, \large, \huge, etc., according to your preference.

Facebook Twitter LinkedIn Whatsapp Pocket

Related Posts:

To install a package in LaTeX, you first need to download the package files from a reliable source. Then, place the package files in the appropriate directory within your LaTeX installation. This directory is typically named "texmf" and can be found in...
To print out a backslash () in LaTeX, you need to use two backslashes in a row in your code. This is because the backslash is a special character in LaTeX that is used to denote commands and special characters. By using two backslashes (\) in your code, you ar...
To include a large block of regex in LaTeX, you can use the "verbatim" environment. This environment will allow you to typeset the regex code exactly as it appears, without any formatting changes. Simply begin the block of regex code with \begin{verbat...