Page Layoutchemscheme | Custom List of Schemes

Information and discussion about page layout specific issues (e.g. header and footer lines, page formats, page numbers).
Post Reply
niteshs
Posts: 45
Joined: Wed Jun 06, 2012 9:57 pm

chemscheme | Custom List of Schemes

Post by niteshs »

Hi,

I am using the chemscheme package to define the float called scheme. I have added the line \renewcommand{\thescheme}{\arabic{section}.\arabic{scheme}} to number the schemes by chapter, and the line \listofschemes to add a list of schemes page.

The resulting list of schemes is however not formatted like the others. For example the list of figures looks like this:
LoF.png
LoF.png (7.88 KiB) Viewed 3824 times
and the list of schemes looks like this:
LoS.png
LoS.png (6.68 KiB) Viewed 3824 times
How do I get the appearance for the list of schemes to show "Scheme" and "Page"?
Here's what I tried-

The custom class that I am using has this code for the toc page:

Code: Select all

\renewcommand\listoffigures{%
    \section*{\listfigurename}
     \noindent \underln{Figure} \hfill \underln{Page} \par
     \vspace{18pt} 
     \begin{spacing}{1}
     \@starttoc{lof}
     \end{spacing}}
I tried using the above code (with "scheme" replacing "figure", and "los" replacing "lof". While it added the "Scheme" and "Page" heading, the actual toc list disappeared:
custom-LoS.png
custom-LoS.png (7.27 KiB) Viewed 3824 times
I checked that the .los file is being created. Its contents are:

Code: Select all

\contentsline {scheme}{\numberline {5.1}{\ignorespaces Caption for scheme}}{25}
How do I solve this problem? I don't mind using a different package instead of chemscheme (if someone can explain exactly how to get the desired output :) )- it was only the easiest way I could find to get the new float as well as associated list.

Edit: corrected code.
Last edited by niteshs on Mon Jun 11, 2012 4:34 pm, edited 2 times in total.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

cgnieder
Site Moderator
Posts: 2000
Joined: Sat Apr 16, 2011 7:27 pm

chemscheme | Custom List of Schemes

Post by cgnieder »

I'm guessing (since you haven't provided a Infominimal working example) that you haven't placed the redefinition of \listofschemes between \makeatletter and \makeatother. They are needed, though, because of the @ in \@starttoc.

Regards
site moderator & package author
niteshs
Posts: 45
Joined: Wed Jun 06, 2012 9:57 pm

chemscheme | Custom List of Schemes

Post by niteshs »

You guessed right cgnieder! Thanks for the help!

I found this UK TeX FAQ page helpful in understanding the use of \makeatletter and \makeatother.
Post Reply