LyX ⇒ Problems with contents page
Problems with contents page
Hi
I'm using lyx 1.6.7-4. I have a deadline in two day and would appreciate some quick solutions. My contents page looks really distorted. I'm using the report document class. I need to know how I can change the content page font, page margin etc without it effecting the entire document.
Thanks in advance.
I'm using lyx 1.6.7-4. I have a deadline in two day and would appreciate some quick solutions. My contents page looks really distorted. I'm using the report document class. I need to know how I can change the content page font, page margin etc without it effecting the entire document.
Thanks in advance.
NEW: TikZ book now 40% off at Amazon.com for a short time.
Re: Problems with contents page
Thanks but my problem is that I dont know how to use these packages...
- localghost
- Site Moderator
- Posts: 9202
- Joined: Fri Feb 02, 2007 12:06 pm
Problems with contents page
I can't imagine that this isn't documented somewhere (online help, wiki, …).hooman wrote:Thanks but my problem is that I dont know how to use these packages...
Best regards
Thorsten
How to make a "Minimal Example"
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
Problems with contents page
Then please specify what exactly do you want to change and provide an example .lyx file.hooman wrote:Thanks but my problem is that I dont know how to use these packages...
Re: Problems with contents page
Thanks. All I need to know is how to change the page margins and font on a page without it effecting the other pages. It could be any page or .lyx file. I'm using the report document class.
Problems with contents page
1. For changing margins on some pages, you may use geometry package. Put into the preamble (Document > Settings > LaTeX Preamble) \usepackage{geometry} and set parameters as you like, e.g.:
When you want to change margins and other settings*, use \newgeometry command in your document (Ctrl+L, and then enter the command), e.g.:
And, when you want to restore default settings (i.e.those set in the preamble), use \restoregeometry:
Note: Both these commands automatically insert \clearpage command, which means there's a clear page break immediately after they are called.
2. For changing fonts and other properties of TOC, you may try experimenting with this example code (which goes into the preamble, together with \usepackage{titletoc}):
In the attachment you may find an example .lyx file with these suggestion implemented.
_______________
* Note that some settings cannot be changed on the fly. Also, for these changes to work you'll need geometry package version 5 or later. Check geometry documentation for details, section 7.
Code: Select all
\usepackage{geometry}
\geometry{hmargin={3cm,1.5cm},vmargin={2cm,3cm}}
Code: Select all
\newgeometry{hmargin={6cm,6cm},vmargin={6cm,6cm}}
Code: Select all
\restoregeometry
2. For changing fonts and other properties of TOC, you may try experimenting with this example code (which goes into the preamble, together with \usepackage{titletoc}):
Code: Select all
\usepackage{titletoc}
\titlecontents{chapter}
[1.5em]% left, indent
{\bfseries}% above, formatting
{\contentslabel{1.3em}}% before with label, stuff before title
{\hspace*{-1.3em}}% same as above, when there's no label
{\titlerule*[1pc]{.}\contentspage}% filler and page
[\hrule\vspace*{6pt}]% optional, code that is following an entry
\titlecontents{section}
[3.7em]
{\itshape}
{\contentslabel{2.2em}}
{\hspace*{-2.2em}}
{\titlerule*[1pc]{.}\contentspage}
[\vspace*{3pt}]
_______________
* Note that some settings cannot be changed on the fly. Also, for these changes to work you'll need geometry package version 5 or later. Check geometry documentation for details, section 7.
- Attachments
-
- Example.lyx.zip
- (1.55 KiB) Downloaded 163 times