[Tex/LaTex] Changing default paragraph style in LyX

lyxparagraphs

I tried for couple hours changing Chapter, Paragraph…etc styles (especially font and it's color) in LyX, I managed to do that by modifying layout files (for example db_stdsections.inc) by simply adding:

Font
Color Green
End Font

Inside Style Paragraph did the job, and LyX displayed the green paragraphs, but for my surprise, converting it to PDF left it unchanged! It it still Black as usual, what I'm doing wrong?

P.S

I don't what to use local Style, I think it silly to mark text as paragraph environment and then also styling text to give him green color manually, I want both to be applied simultaneously, like in MS Word.

Best Answer

I think also that is more useful redefine the paragraph in the preamble or even in the body. Moreover it works with or without Lyx. I left anyway a MWE that I have made before of before seeing your comment.

\documentclass{article}
\usepackage{xcolor}
\setcounter{secnumdepth}{5}
\usepackage{lipsum}

\makeatletter
\renewcommand\paragraph{
\@startsection{paragraph}{4}{0em}%
{-1.3\baselineskip}%
{0.3\baselineskip}%
{\normalfont\bfseries\color{red}}%
}%
\makeatother 

\setcounter{secnumdepth}{4}% numbered
\setcounter{tocdepth}{4}% in toc

\newcommand\PARA[1]{\paragraph{\textcolor{blue}{#1}}}


\begin{document}
\tableofcontents
\section{Section}
\subsection{Subection}
\subsubsection{Sub-subsection}

\paragraph{Lore ipsum} \lipsum[4]

\renewcommand\theparagraph{\hspace{-3em}
\rlap{\textcolor{green}{\Roman{paragraph}.}}\hspace{2em}}

\paragraph{Sed commodo} \lipsum[2]
\PARA{Nulla malesuada} \lipsum[6]

\end{document}