> 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.