You can use titlesec
's commands anywhere and their effect will be limited to the group, or environment, containing them. The following document works with changing of sections and chapters. For illustration, I have only demonstrated sections; uncomment the lines in the body with \chapter
commands to see these working too.
\documentclass{report}
\usepackage{titlesec}
\titleformat{\section}{\normalfont\Large\itshape}{\thesection}{1em}{}{}
\newenvironment{alttitles}{\titleformat{\chapter}[display]%
{\normalfont\huge\itshape}{\chaptertitlename\ \thechapter}{20pt}{\Huge}%
\titleformat{\section}{\normalfont\Large\scshape}{\thesection}{1em}{}{}}{}
\begin{document}
%\chapter{First chapter}
\section{A section}
\begin{alttitles}
%\chapter{Next chapter}
\section{Another section}
\end{alttitles}
\section{A last section}
\end{document}
When trying to implement this with your own styles, I suggest you first get the titlesec commands working globally in a spearate document to help debugging. After that you can build them in to an environment, if you so wish, or simply include them in the appropriate group, e.g.
{
\titleformat{\section}{\normalfont\Large\scshape}{\thesection}{1em}{}{}
\section{A small caps section}
Text.
}
You can create a 'webography' with the thebibliography
environment and the \url
command. To redefine the name, you can use the techniques described in How to change the name of document elements like "Figure", "Contents", "Bibliography", "Appendix", etc.?, but it seems a small change must be made due to how LyX loads packages (specifically, babel
).
Adding the list
Where you want to have this webography, choose the Bibliography-element from the drop-down menu in the top left. This will add a thebibliography
environment to your document, and it will look like this:
Place the cursor right after the key-1 [1]
inset, and choose Insert --> URL. Type a URL in the box that appears. To add a new URL to the webography, move the cursor outside the URL-inset, and hit enter. Finally, you can change the label (key-N
) by clicking it.
Changing the heading
LyX loads babel
by default as far as I know, so in How to change the name of document elements like "Figure", "Contents", "Bibliography", "Appendix", etc.? it is the 'With babel
' section that is relevant, but with a small change. Add the following to Document --> Settings --> LaTeX Preamble:
\AtBeginDocument{%
\addto\captionsenglish{%
\renewcommand{\bibname}{Webography}
}}
If English is not your chosen language, you have to change that.
The reason for the \AtBeginDocument
is that when I tried this, LyX added babel
to the very end of the preamble, the stuff you add to the preamble yourself is placed before the loading of babel
. Therefore, \addto\captionsenglish
is not available at the time it is used, but with AtBeginDocument
the use is postponed until after the entire preamble.
Note that the heading will not change within LyX, but it will change in the PDF.
Don't use natbib
LyX seems to behave a little silly (or maybe it's just me), so in Document --> Settings --> Bibliography, make sure that Default (Numerical) is selected, and not Natbib.
Best Answer
This is extending @Martin H's suggestion:
CV_old.lyx
file you haveCV.lyx
/usr/share/lyx/templates
or wherever your lyx templates are sittingFrom here, you should have a template with exactly the settings you like for each CV you write.