LaTeX forum ⇒ Page Layoutappendix package

Information and discussion about page layout specific issues (e.g. header and footer lines, page formats, page numbers).
spiegboy
Posts: 120
Joined: Thu Dec 06, 2007 9:58 am

appendix package

Postby spiegboy » Sun Jun 21, 2009 9:58 pm

Appendix package is supposed to set the counter of chapter to zero according to its documentation. However the first chapter remains 1 when I tried it

  1. \documentclass[11pt,a4paper]{report}
  2. \usepackage[T1]{fontenc}
  3. \usepackage[latin1]{inputenc}
  4. \usepackage[english]{babel}
  5. \usepackage{lipsum,appendix}
  6.  
  7. \begin{document}
  8. \tableofcontents
  9.  
  10. \chapter{Diplomatic Memoirs}
  11. \lipsum[1]
  12. \chapter{Student Memoirs}
  13. \lipsum[2-3]
  14. \appendix
  15. \addappheadtotoc
  16. \chapter{published papers} % appeared as appendix A
  17. \lipsum[2-3]
  18. %\chapter{Equation deduction} % appeared as appendix B
  19. %\lipsum[2-3]
  20. \end{document}

Link:
BBcode:
HTML:
Hide post links
Show post links

User avatar
localghost
Site Moderator
Posts: 9206
Joined: Fri Feb 02, 2007 12:06 pm
Location: Braunschweig, Germany

Postby localghost » Mon Jun 22, 2009 4:02 pm

I don't see the problem. Your example works as expected. You should describe you own expectations more clearly.


Best regards
Thorsten
LaTeX Community Moderator
How to make a "Minimal Example"
Board Rules
Avoidable Mistakes


¹ System: openSUSE 13.1 (Linux 3.11.10), TeX Live 2013 (vanilla), TeXworks 0.5 (r1351)
² Posting stopped indefinitely due to offenses

Link:
BBcode:
HTML:
Hide post links
Show post links

spiegboy
Posts: 120
Joined: Thu Dec 06, 2007 9:58 am

Postby spiegboy » Mon Jun 22, 2009 11:39 pm

localghost wrote:I don't see the problem. Your example works as expected. You should describe you own expectations more clearly.


Best regards
Thorsten

Okay, I expect chapter starts counting from zero not from one. The appendix package documentation states it redefines the chapter counter as I expected. But it doesnt work for the codes I put on. Is there any solution?

Cheers

Link:
BBcode:
HTML:
Hide post links
Show post links

User avatar
frabjous
Posts: 2064
Joined: Fri Mar 06, 2009 12:20 am
Location: Amherst, MA

Postby frabjous » Tue Jun 23, 2009 12:20 am

I believe what's going on here is that the chapter counter does start at 0, but goes up to 1 when you add the first \chapter{...} command. So if you want the first one to be chapter 0, you need to start it off with -1.

  1. \documentclass[11pt,a4paper]{report}
  2. \usepackage[T1]{fontenc}
  3. \usepackage[latin1]{inputenc}
  4. \usepackage[english]{babel}
  5. \usepackage{lipsum,appendix}
  6.  
  7. \begin{document}
  8. \tableofcontents
  9. \setcounter{chapter}{-1}
  10. \chapter{Diplomatic Memoirs}
  11. \lipsum[1]
  12. \chapter{Student Memoirs}
  13. \lipsum[2-3]
  14. \appendix
  15. \addappheadtotoc
  16. \chapter{published papers} % appeared as appendix A
  17. \lipsum[2-3]
  18. %\chapter{Equation deduction} % appeared as appendix B
  19. %\lipsum[2-3]
  20. \end{document}

Link:
BBcode:
HTML:
Hide post links
Show post links

spiegboy
Posts: 120
Joined: Thu Dec 06, 2007 9:58 am

Postby spiegboy » Wed Jun 24, 2009 4:03 am

oh, i see.
How smart!!
cheers

Link:
BBcode:
HTML:
Hide post links
Show post links


Return to “Page Layout”

Who is online

Users browsing this forum: No registered users and 1 guest