[an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive]
 
[an error occurred while processing this directive] [an error occurred while processing this directive]
Skåne Sjælland Linux User Group - http://www.sslug.dk Home   Subscribe   Mail Archive   Forum   Calendar   Search
MhonArc Date: [Date Prev] [Date Index] [Date Next]   Thread: [Date Prev] [Thread Index] [Date Next]   MhonArc
 

Re: [DOK] \label



Hans-Christian Stadler wrote:

> Hvordan laver jeg en label der bruger min egen counter?

Følgende eksempel fungerer:

Start eksempel:
\documentclass[a4paper,12pt]{article}

\usepackage[T1]{fontenc}

\newcounter{minegencounter} % opret counter

\newcommand{\testcase}[1]{\refstepcounter{minegencounter}
        \textsf{Test Case \arabic{minegencounter}\ ---
                \ \textit{#1}}
        \par
}

\newcommand{\testcaseref}[1]{
        test case CC\ref{#1}CC
}

\begin{document}

ABC

\par
\testcase{Min første test case}\label{tc:minF}
Første test case går ud på at eliminere alle fejl i modul bla bla

\par
Som sagt i \testcaseref{tc:minF} er det svært at ...

\testcase{Min anden test case}\label{tc:minAnden} Anden case går ud
på kkkllllsdk


og en reference til \testcaseref{tc:minAnden} kkkdsll

\end{document}

Stop eksempel

Du skal bruge \refstepcounter, før du printer counter'en. Den stepper den én
op OG bruger den som reference til den almindelige \label makro. Du skal
bruge label EFTER \refstepcounter (generelt ALTID EFTER det du ønsker at
sætte label på)



-- 
Andrass Ziska Davidsen


 
Home   Subscribe   Mail Archive   Index   Calendar   Search

 
 
Questions about the web-pages to <www_admin>. Last modified 2005-08-10, 18:57 CEST [an error occurred while processing this directive]
This page is maintained by [an error occurred while processing this directive]MHonArc [an error occurred while processing this directive] # [an error occurred while processing this directive] *