Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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?

share|improve this question
add comment

2 Answers

up vote 0 down vote accepted

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}}
share|improve this answer
    
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
1  
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
add comment

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 1embetween thesub-subsection title, and` is also empty. Play around with these settings to see what fits you, or leave a comment.

Finally, read the package documentation for more information on the details of each component.

share|improve this answer
    
Thanks you for the help, however your first example removed the subsubsection numbers from the document, which is not what I am looking for. Thanks for the reply. –  Casey Aug 14 '11 at 5:59
    
For completeness, I've updated my answer to reflect your request. –  Werner Aug 14 '11 at 6:09
    
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
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.