0

I am trying to create an appendix to my document. I have two issues. First, the appendix should be labelled as follows: "Appendix A", followed by "Appendix B", etc. No extra naming. I tried to use \appendix and chapters, but that always numbered the appendixes. For example "Appendix A" is shown as "1 Appendix A" instead. Is it possible to have only "Appendix", followed by a letter, in scrreprt? Using section* does not work as then it will not be listed in the TOC.

I am also trying to put the start of the appendix on top of a table. I found some code recommended in another post but I cannot get it to work. Any help appreciated.

\documentclass{scrreprt}
\usepackage{caption}
\usepackage{babel}
\usepackage{booktabs,rotating}  
\usepackage{geometry}

\begin{document}
    
    \tableofcontents
    
    \chapter{Intro}
    
    Some text...
    
    \chapter{Main}
    
    \chapter{Conclusion}
    
    \section*{Appendix A}
    
    \section*{Appendix B}
    
    \renewcommand{\thetable}{\Alph{section}\arabic{table}}
    \renewcommand{\thesubsection}{\Alph{subsection}}
    \setcounter{table}{0}
    \setcounter{section}{1}
    
    \begingroup
    \newgeometry{bottom=0.1cm, top=0.1cm}
    \vfill
    \begin{table}
    
    \begin{sideways}    
    \begin{minipage}{\textheight} % here
        \caption{A simple table}
        \begin{tabular}{p{5cm}p{5cm}p{5cm}p{5cm}}
            10000000000 & 10000000000 & 10000000000 & 10000000000 \\
            10000000000 & 10000000000 & 10000000000 & 10000000000 \\
            10000000000 & 10000000000 & 10000000000 & 10000000000 \\
            10000000000 & 10000000000 & 10000000000 & 10000000000 \\
            10000000000 & 10000000000 & 10000000000 & 10000000000 \\
            10000000000 & 10000000000 & 10000000000 & 10000000000 \\
            10000000000 & 10000000000 & 10000000000 & 10000000000 \\
            10000000000 & 10000000000 & 10000000000 & 10000000000 \\
            10000000000 & 10000000000 & 10000000000 & 10000000000 \\
            10000000000 & 10000000000 & 10000000000 & 10000000000 \\
            10000000000 & 10000000000 & 10000000000 & 10000000000 \\
            10000000000 & 10000000000 & 10000000000 & 10000000000 \\
            10000000000 & 10000000000 & 10000000000 & 10000000000 \\
            10000000000 & 10000000000 & 10000000000 & 10000000000 \\
            10000000000 & 10000000000 & 10000000000 & 10000000000 \\
            10000000000 & 10000000000 & 10000000000 & 10000000000 \\
            10000000000 & 10000000000 & 10000000000 & 10000000000 \\
            10000000000 & 10000000000 & 10000000000 & 10000000000 \\
            10000000000 & 10000000000 & 10000000000 & 10000000000 \\
            10000000000 & 10000000000 & 10000000000 & 10000000000 \\
            10000000000 & 10000000000 & 10000000000 & 10000000000 \\
            10000000000 & 10000000000 & 10000000000 & 10000000000 \\
            10000000000 & 10000000000 & 10000000000 & 10000000000 \\
            10000000000 & 10000000000 & 10000000000 & 10000000000 \\
            10000000000 & 10000000000 & 10000000000 & 10000000000 \\
            10000000000 & 10000000000 & 10000000000 & 10000000000 \\
            10000000000 & 10000000000 & 10000000000 & 10000000000 \\
            10000000000 & 10000000000 & 10000000000 & 10000000000 \\
            10000000000 & 10000000000 & 10000000000 & 10000000000 \\
        \end{tabular}
        \end{minipage} % and here
    \end{sideways}
    \end{table}
    \vfill
    \restoregeometry
    \endgroup

\end{document}

1 Answer 1

1

You can borrow the main idea from how to change the section title and its arrangement and use this in your preamble:

\usepackage{titlesec}
\titleformat{\section}{\normalfont\Large\bfseries}{Appendix~\thesubsection}{1em}{}

You might also like to switch between listing your \section{} as Appendix ... on the TOC or including it manually using

\addcontentsline{toc}{section}{Unnumbered Appendix}
\section*{Unnumbered Appendix}

Important! Labeling sections in a new way works only if

\renewcommand{\thetable}{\Alph{section}\arabic{table}}
\renewcommand{\thesubsection}{\Alph{section}}
\setcounter{table}{0}
\setcounter{section}{1}

is inserted before use of \section.

In order to replace Table 1 with Appendix B you need to change both \tablename and \thetable like this:

\renewcommand{\thetable}{\Alph{section}\arabic{table}}
%\renewcommand{\thetable}{\Alph{section}} %if you need a chapter index only
\renewcommand{\tablename}{Appendix}
2
  • thanks that answers the first part of my question, but I am still not sure if this is the way to do it with scrreprt. Seems like a brute force method. If it works I do not mind though. But I am still looking for a way to have the appendix on top of the page with the table. The appendix text and label can also be smaller than in case of using \chapter. In any case I upvoted you for your efforts.
    – EtoAls
    Jul 22, 2020 at 12:24
  • 1
    I'm not sure about that titlesec package, but that redefinition of \thesubsection is a standard way as I was instructed on my .TeX workshop this week. If I got it right, you want Table 1 to be replaced with Appendix B. In this case you need to change both \tablename and \thetable. Check my updated answer. Jul 22, 2020 at 17:46

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .