LaTeX forum ⇒ GeneralCustom Chapter Name For Just One Entry

LaTeX specific issues not fitting into one of the other forums of this category.
AleCes
Posts: 286
Joined: Sat Nov 13, 2010 9:54 pm

Custom Chapter Name For Just One Entry

Postby AleCes » Sun May 24, 2015 10:27 pm

Hello.

I want to have a customized ToC like this:

Chapter 1
/////// 2
/////// 3

and so on.

Is there a way to do that with tocloft?

  1. \documentclass{book}
  2. \usepackage{tocloft}
  3. \begin{document}
  4. \chapter{Foreword}
  5.  
  6. \chapter{blah}
  7.  
  8. \chapter{Afterword}
  9. \end{document}


Thanks everybody.

User avatar
Stefan Kottwitz
Site Admin
Posts: 9445
Joined: Mon Mar 10, 2008 9:44 pm

Postby Stefan Kottwitz » Sun May 24, 2015 10:47 pm

AleCes wrote:Chapter 1
/////// 2
/////// 3


Are 1, 2, 3 chapter numbers or page numbers? In case of the first - no page numbers? No titles such as "Foreword", "Afterword" of the example?

Which is the just one entry for you would like to have a custom name, and which is the name?

Stefan
Site admin

AleCes
Posts: 286
Joined: Sat Nov 13, 2010 9:54 pm

Postby AleCes » Sun May 24, 2015 10:58 pm

OK sorry, I wanted something like this:

Chapter 1.................01
/////// 2.................10
/////// 3.................30

User avatar
Stefan Kottwitz
Site Admin
Posts: 9445
Joined: Mon Mar 10, 2008 9:44 pm

Postby Stefan Kottwitz » Sun May 24, 2015 11:17 pm

Sounds like simply

  1. \addcontentsline{toc}{chapter}{Chapter \thechapter}
  2. ...
  3. \addcontentsline{toc}{chapter}{/////// \thechapter}
  4. ...
  5. \addcontentsline{toc}{chapter}{/////// \thechapter}


at those places.

Stefan
Site admin

AleCes
Posts: 286
Joined: Sat Nov 13, 2010 9:54 pm

Postby AleCes » Mon May 25, 2015 9:46 pm

Thanks but I was thinking about something more standardized, where only the first entry has a special format.

User avatar
Stefan Kottwitz
Site Admin
Posts: 9445
Joined: Mon Mar 10, 2008 9:44 pm

Postby Stefan Kottwitz » Mon May 25, 2015 10:15 pm

I still don't understand why \chapter{Foreword} should produce "Chapter 1.................01" (without "Foreword") in the table of contents, and what "///////" in the other entries should mean (such actual symbols or dummy characters as place-holder for titles).

It would be good to post code you really mean (your code doesn't even contain the command \tableofcontents) and a better description. Even a hand-made drawing would be good.

Stefan
Site admin

AleCes
Posts: 286
Joined: Sat Nov 13, 2010 9:54 pm

Postby AleCes » Mon May 25, 2015 10:28 pm

You're right I'm sorry about my sloppiness :oops:

Yeah, ///// stands for dummy characters as place-holders for titles. Anyway, tomorrow I shall draw a sketch of what I want and post it here.

Bye and thanks a lot for your patience! ;)


Return to “General”

Who is online

Users browsing this forum: Google [Bot] and 9 guests