I need to center some sections using normal size fonts in the front sections of a document, but not the chapter headings. So, I need a "Contents" and "List of Tables" and "List of Figures" centered before the list of the appropriate entries. Then, when I have chapter headings (1, and 1.1) those headings need to be on the left of the page (not centered, also in normal size fonts). References at the end, also needs to be centered like "Contents." The table of contents list all need to be in plain fonts (as shown). So, basically, I need to have "Contents," "List of Figures," etc., and "References" centered, without disturbing anything else. Any help is appreciated.
%% LyX 2.0.7 created this file. For more info, see http://www.lyx.org/. %% Do not edit unless you really know what you are doing. \documentclass[english]{article} \usepackage[T1]{fontenc} \usepackage[latin9]{inputenc}
\makeatletter %%%%%%%%%%%%%%%%%%%%%%%%%%%%%% User specified LaTeX commands. \usepackage{titlesec} \titleformat*{\section}{\bfseries\normalsize} \titleformat*{\subsection}{\bfseries\normalsize} \titleformat*{\subsubsection}{\bfseries\normalsize}
\usepackage{titletoc}
\titlecontents{section} % set formatting for \section - % \subsection must be formatted separately [2.3em] % adjust left margin {\rmfamily} % font formatting {\contentslabel{2.3em}} % section label and offset {\hspace*{-2.3em}} {\titlerule*[1pc]{.}\contentspage}
\makeatother
\usepackage{babel} \begin{document} This is a test...
\tableofcontents{}
\listoffigures
and this is after the table of contents
\section{This is a section}
test one two three as seen on TV
\subsection{this is sub}
test sub...
\section{this is the second section}
\addcontentsline{toc}{section}{\protect\underline{\refname}}\bibliographystyle{plain} \bibliography{C:/Users/csibona/Documents/SocialNetwork}
\appendix
\addcontentsline{toc}{section}{\protect\underline{Appendix}}
\pagebreak{}
\pagebreak{}
\section{Ah, an appendix} \end{document}
Aucun commentaire:
Enregistrer un commentaire