LaTeX forum ⇒ GeneralAppendix possible in latex? Topic is solved

LaTeX specific issues not fitting into one of the other forums of this category.
ma501th
Posts: 50
Joined: Tue Apr 08, 2008 7:31 pm

Appendix possible in latex?

Postby ma501th » Wed Apr 16, 2008 1:22 pm

Im attempting to add appendix into my report. I have tried different methods but not meeting my expectation.

I will need you guys help for the appendix please.

I'll the the appendix to appear on the contents page if possible but not as a chapter.

Thanks in advance

Tags:

ma501th
Posts: 50
Joined: Tue Apr 08, 2008 7:31 pm

Postby ma501th » Wed Apr 16, 2008 1:36 pm

OK i have used the following commands:

  1. \appendix
  2. \chapter{Questionnaire Requirement}
  3. \chapter{Questionnaire Testing}


it seems to the job, but im worried because this is what appears when im compiling the .tex file

  1. ! LaTeX Error: File `appendix.sty' not found.
  2.  
  3. Type X to quit or <RETURN> to proceed,
  4. or enter new name. (Default extension: sty)
  5.  
  6. Enter file name:


how can i fix this problem?

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

Postby Stefan Kottwitz » Wed Apr 16, 2008 1:46 pm

Hi,

it seems you typed \usepackage{appendix}, but that's not neccessary for an appendix. One small example:
  1. \documentclass[a4paper,10pt]{report}
  2. \begin{document}
  3. \tableofcontents
  4. \chapter{One}
  5. \appendix
  6. %\addcontentsline{toc}{chapter}{Appendix}
  7. \addtocontents{toc}{\protect\contentsline{chapter}{Appendix:}{}}
  8. \chapter{Questionnaire Requirement}
  9. \chapter{Questionnaire Testing}
  10. \end{document}

Stefan

ma501th
Posts: 50
Joined: Tue Apr 08, 2008 7:31 pm

Postby ma501th » Wed Apr 16, 2008 1:58 pm

cheers mate , works like a charm. your a star

Ali Sultan
Posts: 12
Joined: Sun Oct 02, 2016 5:09 am

Postby Ali Sultan » Sun Oct 02, 2016 5:16 am

and must we put chapters "Questionnaire Requirement and Questionnaire testing" in separate .tex files or what? Is this the best method to create an appendix in a report document class consisting from 6 chapters and 3 long appendices each is composed of multiple figures and tables?

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

Postby Stefan Kottwitz » Sun Oct 02, 2016 9:02 am

Hi Ali,

welcome to the forum!

It is not necessary to put chapters in separate .tex files. The whole document can be a single .tex file.

It's just handy to use a file for each chapter and to use \include{filename} for including them in the main document. That's because you don't need to work with a huge file but split the work into small files for better handling. It's easy to comment out some \include (or to use \includeonly) so just the current chapter that you are working on is compiled.

Stefan
Site admin

Ali Sultan
Posts: 12
Joined: Sun Oct 02, 2016 5:09 am

Postby Ali Sultan » Mon Oct 03, 2016 1:50 am

Thanks Stefan for your quick response. I agree that it is easier to put each chapter in a separate file and then call them in the main file which is exactly what I did. The problem is with appendices! I am still struggling with creating an appendix/appendices and call them in the main file as the case with chapters. Would you mind please provide a minimal code about how to create an appendix file and include it in the main file. Please include at least one figure and one table in the appendix file if possible. Should I save the created appendix file in the same folder with other chapters? Thanks again for your help

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

Postby Stefan Kottwitz » Mon Oct 03, 2016 8:17 pm

There is no difference to normal chapters. Make chapters as files in the appendix exactly the same as normal chapters. LaTeX just treats them as appendix chapters because of the \appendix command that starts an appendix. Then, the code makes normal chapters. LaTeX just uses letters for numbering and starts with A.

Stefan
Site admin

Ali Sultan
Posts: 12
Joined: Sun Oct 02, 2016 5:09 am

Postby Ali Sultan » Tue Oct 04, 2016 6:49 am

Thanks again Stefan for your response. It worked:-) I just realized that I do have a typo error in the code which was causing the problem in reading figures of the appendices.


Return to “General”

Who is online

Users browsing this forum: No registered users and 7 guests