2

I have the following problem: I have different bold written headers in the appendix and want to reference them in my paper

\documentclass{report}
\usepackage{amsmath}
\usepackage{hyperref}

\begin{document}
\chapter{one}
sample text \ref{A.1}
lorem ipsum \ref{A.2}

\appendix
\textbf{header} \label{A.1}
sample text
\textbf{header2} \label{A.2}
\end{document}

And I want that 'A.1', 'A.2' etc. is displayed in my document. If I do it kind of like this it displays:

sample text 1
lorem ipsum 1

Has anyone a solution for this?
PS: I am using the hyperref package.

2
  • 1
    Welcome to TeX.SE! Please extend your code fragment to complete small document (beginning with \documentclass` and ending with\end{document}) which reproduce your problem.
    – Zarko
    Commented Jul 2, 2020 at 15:17
  • Thanks @Zarko ! Changed it.
    – Jan
    Commented Jul 2, 2020 at 19:38

1 Answer 1

1

It is not very clear, where in document are your appendices. For example at end of report (after all chapters) or at the end of each chapter?

One example of numbering sections, equations, figures, tables in appendix can be (changes in comparison to your MWE, are marked by % <---

\documentclass{report}
\usepackage{amsmath}
\usepackage{hyperref}

\begin{document}
\chapter{one}
sample text \ref{A.1}
lorem ipsum \ref{A.2}

\appendix
\renewcommand\thesection{A.\arabic{section}} % <---
\section{header} % <---
\label{A.1}
sample text

\section{header2} % <---
\label{A.2}
\end{document}

enter image description here

1
  • Hi @Zarko, the appendix is at the end of my document. I already thought about your solution! This should definitely work, but is there a way to not display all these new '\sections' in my table of content?
    – Jan
    Commented Jul 3, 2020 at 5:48

You must log in to answer this question.

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