GeneralProblem whit reference to appendix with letters

LaTeX specific issues not fitting into one of the other forums of this category.
Post Reply
christel
Posts: 2
Joined: Mon Nov 30, 2009 12:02 pm

Problem whit reference to appendix with letters

Post by christel »

I have had some problems trying to create a new name for my appendix - it's called Bilag A, Bilag B, ...etc. . But when i make a reference in my document to one of my appendix i get Bilag 1, Bilag 2,... etc.

In my preable i have written:

\renewcommand{\appendixtocname}{Bilag}
\renewcommand{\appendixpagename}{Bilag}
\newlistentry{Bilag}{bilag}{0}
\newcommand{\Bilagnavn}{Bilag}
\newlistof{listofbilag}{bilag}{\Bilagnavn}
\addcontentsline{bilag}{Bilag}{Bilag \Alph{Bilag}: #1}}
\newcommand{\Bilag}[1]{\refstepcounter{Bilag}\chapter*{Bilag \Alph{Bilag}} \addcontentsline{bilag}{Bilag}{Bilag \Alph{Bilag}: #1}}

Are there someone who can help me so that my references in the text fits the actual name of the appendix?

Thanks in advance

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

olofos
Posts: 56
Joined: Tue Nov 24, 2009 10:37 pm

Problem whit reference to appendix with letters

Post by olofos »

Please post a minimal working example. We need to know what documentclass and other relevant packages you are using.

However, a guess is that the following might do what you want:

Code: Select all

\renewcommand{\appendixtocname}{Bilag}
\renewcommand{\appendixpagename}{Bilag}
\newcommand{\Bilagnavn}{Bilag}
\newlistof{listofbilag}{bilag}{\Bilagnavn}
\newcommand{\Bilag}[1]{\refstepcounter{Bilag}\chapter*{Bilag \theBilag} \addcontentsline{bilag}{Bilag}{Bilag \theBilag: #1}}
\newlistentry{Bilag}{bilag}{0}
\renewcommand{\theBilag}{\Alph{Bilag}}
Post Reply