I'm writing a document optimized for mobile usage, and as such I want to conserve my space. The spacing that titlesec
adds to sections, subsections, etc. is getting somewhat annoying. Is there a (simple) method to remove this? My desire is to just change the look of the title while retaining all LaTeX default spacing, etc.
The sectsty
package doesn't add any spacing and works great, but I'd like to make use of some of titlesec
's features.
I've looked at the following questions and they don't seem to fix my problem:
- Titlesec: remove space after empty margin section
- Space above chapter with titlesec
- Increase title spacing stretchability using titlesec with compact
- Vertical space before section title with titlesec
- Change whitespace above and below a section heading
Please close this if I've overlooked something in the solutions above.
\documentclass[11pt]{article}
\usepackage{geometry}
\geometry{margin=5mm, paper=a6paper, showframe=true}
\usepackage{titlesec}
\titleformat*\section{\Large}
\titleformat*\subsection{\large}
\usepackage{lipsum}
\begin{document}
\section*{Using titlesec}
\subsection*{Lorem Ipsum}
\lipsum[3]
\end{document}
Note: Remove the three titlesec
lines to obtain the LaTeX default result.
titlesec
's formatting is not immediately setup for this kind of thing. Instead, and often very typically, you have to specify all of the options in order to change just one thing, without even knowing the defaults of the other. That's the advantage of providing a key-value driven input rather than a full argument-based macro (astitlesec
does). What's needed here is something liketitleseckv
(doesn't exist) that does everythingtitlesec
does, but allows for a `key-value interface with LaTeX defaults otherwise.