# Change subsubsection to medium series

I am using Lyx on Windows. How do I get the formatting of the whole document to look like:

``````\subsubsection{\textmd{Blah blah blah}}
``````

without manually setting it for each line?

-

If you want to only change the text:

``````\let\OriginalSubsubsection\subsubsection%
\renewcommand{\subsubsection}[1]{\OriginalSubsubsection{\textmd{#1}}}%
``````

As per Stefan's suggestion if you also want to also adjust the numbering:

``````\let\OriginalTheSubsubsection\thesubsubsection
\renewcommand{\thesubsubsection}{\textmd{\OriginalTheSubsubsection}}
``````
-
No, it does not seem to change it for me. I am new to lyx/tex, I just put it in to the preamble, is this correct? – Casey Aug 14 '11 at 5:21
If you add it in your preamble, it should change the formatting of the sub-subsection to `\mdseries` (via `\textmd{...}`), but the numbering will still remain and be typeset using `\bfseries`. That is, in bold. Is this what you want? – Werner Aug 14 '11 at 5:36
CORRECTION- This does work, I was not seeing the change inside Lyx, but when I viewed as PDF it displayed correctly. Thank you. – Casey Aug 14 '11 at 5:57
@Peter: Perhaps add `\let\OriginalTheSubsubsection\thesubsubsection` `\renewcommand{\thesubsubsection}{\textmd{\OriginalTheSubsubsection}}`, this would also adjust the number. Of course for the complete text, but this might be desirable. – Stefan Kottwitz Aug 14 '11 at 11:25

You can use the `titlesec` package to format any sectional command. For example, obtaining a medium formatting for `\subsubsection` use

``````\usepackage{titlesec}% http://ctan.org/pkg/titlesec
...
\titleformat{\subsubsection}{\mdseries}{\thesubsubsection}{1em}{}%
``````

In a more general setting, the respective arguments of `\titleformat` is

``````\titleformat{<command>}[<shape>]{<format>}{<label>}{<sep>}{<before-code>}[<after-code>]
``````

Note that optional arguments are specified using `[...]`, while mandatory arguments use `{...}`. Consequently, in the above redefinition of `\subsubsection`, `<format>=\mdseries` for medium font, `<label>=\thesubsubsection` to print the number of the sub-subsection, `<sep>=1em` to provide a space of `1`em`between the``sub-subsection title, and`` is also empty. Play around with these settings to see what fits you, or leave a comment.

Good explanation! In contrast to the subsubsection patch, the number matches the title, i.e. is not bold. And using `titlesec` further customizations would be easy. – Stefan Kottwitz Aug 14 '11 at 11:17