Re: How! -- Index with Balanced Columns
> Dear Lyxers > I am using Lyx 1.6.7, Book Class, on openSUSE 11.1. I want to convert > the standard two-column Index behavior to achieve balanced columns on > the last Index page.( that is, from a single column down the left-hand > side of the page with an empty column the right-hand side, to two > columns of equal length reaching approxmimately half-way down the page). > > I have searched and found the following advice and code. > Load the multicol package. > > \usepackage{multicol} > > Enter code in ERT just before the Index label > > %change the index environment to achieve balanced columns on last page > \let\orgtheindex\theindex > \let\orgendtheindex\endtheindex > \def\theindex{% > \def\twocolumn{\begin{multicols}{2}}% > \def\onecolumn{}% > \clearpage > \orgtheindex > } > \def\endtheindex{% > \end{multicols}% > \orgendtheindex > } > > This code is pasted from the Internet but not for the Lyx Book Class; > although the code appears in several places in almost indentical form. > It does not throw up an error, not does it have any effect on the Index; > but it does mess up the following page by moving a float picture. So > there is some interaction, but not that desired. There is one small > additional effect -- the word Index in normal font appears at the end of > the Index. > > Would anyone explain how this approach can be made to work? > > Thanks for your expertise. > > Kind Regards, > > -- Clive Libotte, IEng. MInstMC. > > The code works for me in the standard book environment. However for book it > might be a good idea to change the \clearpage to \cleardoublepage to be > certain that it does not change the floats. > > Why it does not work for you is difficult to know? I would suggest that you > make a copy of your book and remove all the hand painting and special stuff > and see if you can get the index to work. If it works start adding back the > hand painting and specials to it stops working :) > > Ingar > Hi Ingar, Thanks for your help. I came across the same code on the Internet but with an extra final line which is {\relax}. The explanation of this code was not altogether clear, so I inserted it to find out -- then everything worked perfectly. The consequences of my ignorance may become apparent when the book is printed -- I'll wait and see. > Hi Clive, > > I am going to suggest (again) the package idxlayout. I am worried > about weird interaction between packages as much as you, but I found > out a good package is often safer that adding several lines of latex > code in the preamble (as you found out). Here is what I use for the > index in my latest book project, the options are self-explanatory: > > \usepackage[indentunit=15 pt,% > itemlayout=relhang,% > justific=RaggedRight,% > columnsep=27 pt, > unbalanced=false, this line produces the balanced columns > initsep=13pt plus 5pt minus 3pt]{idxlayout} > > > Cheers, > > Stefano Hi Stefano. Thanks for you help and concern, Well I'm in full agreement here, I have now used two packages that came with Lyx 1.6.7 so I'm comfortable using them. They are tocloft and multicol, strangely, I have idxlayout in my notes as the next package to try if multicol did not work. So, for the time being I shall trust multicol, as I have finished my layout of the book internals. Thanks again. Kind Regards, -- Clive Libotte, IEng. MInstMC.
How! -- Index with Balanced Columns
Dear Lyxers I am using Lyx 1.6.7, Book Class, on openSUSE 11.1. I want to convert the standard two-column Index behavior to achieve balanced columns on the last Index page.( that is, from a single column down the left-hand side of the page with an empty column the right-hand side, to two columns of equal length reaching approxmimately half-way down the page). I have searched and found the following advice and code. Load the multicol package. \usepackage{multicol} Enter code in ERT just before the Index label %change the index environment to achieve balanced columns on last page \let\orgtheindex\theindex \let\orgendtheindex\endtheindex \def\theindex{% \def\twocolumn{\begin{multicols}{2}}% \def\onecolumn{}% \clearpage \orgtheindex } \def\endtheindex{% \end{multicols}% \orgendtheindex } This code is pasted from the Internet but not for the Lyx Book Class; although the code appears in several places in almost indentical form. It does not throw up an error, not does it have any effect on the Index; but it does mess up the following page by moving a float picture. So there is some interaction, but not that desired. There is one small additional effect -- the word Index in normal font appears at the end of the Index. Would anyone explain how this approach can be made to work? Thanks for your expertise. Kind Regards, -- Clive Libotte, IEng. MInstMC. -- Tel: 08 9403 0129 Mob: 043 571 5607
Customising Index Title & Body Text
On 12/02/11 18:23, Clive_Libotte wrote: > > On 07/02/11 16:42, Clive_Libotte wrote: > >> >> Dear Lyxers, >> >> I have spent hundreds of hours hand-crafting the front matter of a book, >> >> but one area has me stumped. How do I access a method of customising >> >> the Index title and it's body text. I have not found anything reliable >> >> on the Web or in this list. Where is the documentation on this -- plenty >> >> on the customising of the TOC, getting on with that. Thanks for your >> >> knowledgeable help. >> >> >> >> Clive Libotte. >> >> >> > > Replying to myself (I think, having just set up the list on my email) > > Thanks to Marcelo and Sefano for their prompt replies. I did not need > > the additional tex packages recommended, as I wanted only the titles and > > page numbering in the Index, TOC, List of Figures and List of Tables to > > match the graphics of the main text; the body text was all right. So my > > heading Customising Index Title & Body Text is too expansive -- sorry. > > Your replies sent me on new lines of research though, which were > > successful. For the benefit of other newcomers to Lyx; the lines of code > > that I used are as follows. Note, that I have the fancyhdr package > > loaded with document class book, Lyx version 1.6.7. The front matter > > page numbering style is set early and carries on though the Table of > > Contents on to the end of the front matter. The Index is numbered the > > same as the main text. You set the numbering styles with the package > > fancyhdr. > > > > To change the Index title font to match the chapter titles, do the > > following in ERT just before the embedded Index label:- > > > > \makeatletter > > \let\ps@plain\ps@fancy > > \makeatother > > \renewcommand\indexname{\bfseries \sffamily \Huge Index} > > \addcontentsline{toc}{chapter}{\bfseries \sffamily \large Index} > > > > You can do the same with the TOC, List of Figures, List of Tables by > > changing the "\indexname" to "\contentsname", \listfigurename" or > > "\listtablename" as required. The last line of the code "\addcontents > > ..." is to add the Index title to the TOC which is not done as default. > > > > > > > > Hope this help others. > > > Replying to myself once more for the benefit of the newsgroup. Upon proof reading the output, the last line in the above code \addcontentsline{toc}{chapter}{\bfseries \sffamily \large Index} is not correct, because the commands \bfseries \sffamily \large, cause an unexpected result which turns up in the TOC. The entry "Index" in the TOC does indeed appear, but in the serif font instead of the sanserif font with the associated page number in the correct serif font (all the page numbers in the TOC are in serif font, so that it matches). The correct way to change the "Index" entry to sanserif (to match the other chapter headings) in the TOC is like this. load the tocloft package in the preamble \usepackage{tocloft} insert the ERT code just before the "Table of Contents" label like this, \renewcommand{cftchapfont}{\bfseries \sffamily \normalsize}. Now the "Index" entry is sanserif matching the other chapter entries. So I did end up needing an additional package to do this job after all; can't always keep things simple! -- Clive Libotte, IEng. MInstMC. -- Tel: 08 9403 0129 Mob: 043 571 5607
Re: Customising Index Title & Body Text
On 12/02/11 18:23, Clive_Libotte wrote: > On 07/02/11 16:42, Clive_Libotte wrote: >> Dear Lyxers, >> I have spent hundreds of hours hand-crafting the front matter of a book, >> but one area has me stumped. How do I access a method of customising >> the Index title and it's body text. I have not found anything reliable >> on the Web or in this list. Where is the documentation on this -- plenty >> on the customising of the TOC, getting on with that. Thanks for your >> knowledgeable help. >> >> Clive Libotte. >> > Replying to myself (I think, having just set up the list on my email) > Thanks to Marcelo and Sefano for their prompt replies. I did not need > the additional tex packages recommended, as I wanted only the titles and > page numbering in the Index, TOC, List of Figures and List of Tables to > match the graphics of the main text; the body text was all right. So my > heading Customising Index Title & Body Text is too expansive -- sorry. > Your replies sent me on new lines of research though, which were > successful. For the benefit of other newcomers to Lyx; the lines of code > that I used are as follows. Note, that I have the fancyhdr package > loaded with document class book, Lyx version 1.6.7. The front matter > page numbering style is set early and carries on though the Table of > Contents on to the end of the front matter. The Index is numbered the > same as the main text. You set the numbering styles with the package > fancyhdr. > > To change the Index title font to match the chapter titles, do the > following in ERT just before the embedded Index label:- > > \makeatletter > \let\ps@plain\ps@fancy > \makeatother > \renewcommand\indexname{\bfseries \sffamily \Huge Index} > \addcontentsline{toc}{chapter}{\bfseries \sffamily \large Index} > > You can do the same with the TOC, List of Figures, List of Tables by > changing the "\indexname" to "\contentsname", \listfigurename" or > "\listtablename" as required. The last line of the code "\addcontents > ..." is to add the Index title to the TOC which is not done as default. > > > > Hope this help others. > Replying to myself once more for the benefit of the newsgroup. Upon proof reading the output, the last line in the above code \addcontentsline{toc}{chapter}{\bfseries \sffamily \large Index} is not correct, because the commands \bfseries \sffamily \large, cause an unexpected result which turns up in the TOC. The entry "Index" in the TOC does indeed appear, but in the serif font instead of the sanserif font with the associated page number in the correct serif font (all the page numbers in the TOC are in serif font, so that it matches). The correct way to change the "Index" entry to sanserif (to match the other chapter headings) in the TOC is like this. load the tocloft package in the preamble \usepackage{tocloft} insert the ERT code just before the "Table of Contents" label like this, \renewcommand{cftchapfont}{\bfseries \sffamily \normalsize}. Now the "Index" entry is sanserif matching the other chapter entries. So I did end up needing an additional package to do this job after all; can't always keep things simple! -- Clive Libotte, IEng. MInstMC.
How! -- Index with Balanced Columns.
Dear Lyxers I am using Lyx 1.6.7, Book Class, on openSUSE 11.1. I want to convert the standard two-column Index behavior to achieve balanced columns on the last Index page.( that is, from a single column down the left-hand side of the page with an empty column the right-hand side, to two columns of equal length reaching approxmimately half-way down the page). I have searched and found the following advice and code. Load the multicol package. \usepackage{multicol} Enter code in ERT just before the Index label %change the index environment to achieve balanced columns on last page \let\orgtheindex\theindex \let\orgendtheindex\endtheindex \def\theindex{% \def\twocolumn{\begin{multicols}{2}}% \def\onecolumn{}% \clearpage \orgtheindex } \def\endtheindex{% \end{multicols}% \orgendtheindex } This code is pasted from the Internet but not for the Lyx Book Class; although the code appears in several places in almost indentical form. It does not throw up an error, not does it have any effect on the Index; but it does mess up the following page by moving a float picture. So there is some interaction, but not that desired. There is one small additional effect -- the word Index in normal font appears at the end of the Index. Would anyone explain how this approach can be made to work? Thanks for your expertise. Kind Regards, -- Clive Libotte, IEng. MInstMC.
Re: Customising Index Title & Body Text
On 07/02/11 16:42, Clive_Libotte wrote: > Dear Lyxers, > I have spent hundreds of hours hand-crafting the front matter of a book, > but one area has me stumped. How do I access a method of customising > the Index title and it's body text. I have not found anything reliable > on the Web or in this list. Where is the documentation on this -- plenty > on the customising of the TOC, getting on with that. Thanks for your > knowledgeable help. > > Clive Libotte. > Replying to myself (I think, having just set up the list on my email) Thanks to Marcelo and Sefano for their prompt replies. I did not need the additional tex packages recommended, as I wanted only the titles and page numbering in the Index, TOC, List of Figures and List of Tables to match the graphics of the main text; the body text was all right. So my heading Customising Index Title & Body Text is too expansive -- sorry. Your replies sent me on new lines of research though, which were successful. For the benefit of other newcomers to Lyx; the lines of code that I used are as follows. Note, that I have the fancyhdr package loaded with document class book, Lyx version 1.6.7. The front matter page numbering style is set early and carries on though the Table of Contents on to the end of the front matter. The Index is numbered the same as the main text. You set the numbering styles with the package fancyhdr. To change the Index title font to match the chapter titles, do the following in ERT just before the embedded Index label:- \makeatletter \let\ps@plain\ps@fancy \makeatother \renewcommand\indexname{\bfseries \sffamily \Huge Index} \addcontentsline{toc}{chapter}{\bfseries \sffamily \large Index} You can do the same with the TOC, List of Figures, List of Tables by changing the "\indexname" to "\contentsname", \listfigurename" or "\listtablename" as required. The last line of the code "\addcontents ..." is to add the Index title to the TOC which is not done as default. Hope this help others. -- Clive Libotte, IEng. MInstMC.