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'm a newbie using LyX and was wondering why when I put a standard paragraph after a *subparagraph it always renders the first standard paragraph after the *subparagraph on the same line?

share|improve this question
    
Do you leave a blank line before the \paragraph{...} command? This should keep LaTeX from typesetting it on the same line as the material of the preceding \subparagraph. –  Mico Nov 13 '11 at 15:12
add comment

2 Answers

That's the standard behaviour for subparagraphs: the text will start in the same line as the title, and the title will be indented by \parindent. If you want to change the formatting, you can redefine \subparagraph; here's a little example of a possible redefinition:

\documentclass{article}
\usepackage{lipsum}
\makeatletter
\renewcommand\subparagraph{\@startsection{subparagraph}{5}{\z@}%
                                     {-3.25ex\@plus -1ex \@minus -.2ex}%
                                     {1.5ex \@plus .2ex}%
                                     {\normalfont\itshape}}
\makeatother
\begin{document}
\subsubsection{Test subparagraph}\lipsum[1]
\paragraph{Test subparagraph}\lipsum[1]
\subparagraph{Test subparagraph}\lipsum[1]
\end{document}

Now, the title will be italicized and won't be indented; the text will start on a new line.

enter image description here

I, however, don't know how to implement this in LyX.

share|improve this answer
add comment

The Code works for lyx too, just add possibly the redefinition also for the paragraph

\makeatletter
\renewcommand\paragraph{\@startsection{subparagraph}{5}{\z@}%
                                     {-3.25ex\@plus -1ex \@minus -.2ex}%
                                     {1.5ex \@plus .2ex}%
                                     {\normalfont\itshape}}

\renewcommand\subparagraph{\@startsection{subparagraph}{5}{\z@}%
                                     {-3.25ex\@plus -1ex \@minus -.2ex}%
                                     {1.5ex \@plus .2ex}%
                                     {\normalfont\itshape}}
\makeatother

You have too add these lines to Document->Settings->LaTex Preamble Preview in lyx wont work, but the pdf output is just fine.

share|improve this answer
1  
There's a typo in your answer: the redefinition for \paragraph should start with \renewcommand\paragraph{\@startsection{paragraph}{4}{\z@}% –  Gonzalo Medina Nov 13 '11 at 16:45
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.