缩写参考文献:仅列出必要的参考文献,不再赘述

缩写参考文献:仅列出必要的参考文献,不再赘述

德国的法律报告通常采用一种有点奇怪的结构方式。我们不使用通常的数字,而是

A。

(B.、CD…)为第一级,

我。

-- 第二级为罗马数字

1.

第三级阿拉伯数字

A)

b)、c)、d) ... 为第四级,

啊)

第五级为:bb)、cc)、dd)。

我在以下几乎最小的示例中实现了这一点。我想使用缩写的引用。如果您正在阅读“B.«”部分,并且有对“B.II.«”小节的引用,则打印“II.«”就足够了。但是如果您正在阅读 A. 部分,则需要“B.II.«”。如果您从 B.II.3.a)cc) 引用 B.II.3.a)bb) 中的某些内容,则输出\ref显然不应为 B.II.3.a)bb),而应为 bb)。如果您在 B.II.4. 中,则引用必须为 3.a)bb)。

但是如果您从 CI1 中的某个地方引用,则需要完整引用 B.II.3.a)bb)。

特殊要求:解决方案也应该与 varioref 包相符。

jura documentclass 提供了这种引用。但我出于很多原因依赖 KOMA-script。因此我尝试从 jura.dtx 中获取代码并进行改编,但我收到了一条我无法理解的错误消息,如下所示。

那么:我可以根据\ref文本中的位置获得参考吗?欢迎提供所有解决方案。


编辑 Ulrike 的回答:

此代码在低于小节的级别总是产生“II。”:

\documentclass[english]{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{babel, blindtext}

\setcounter{secnumdepth}{5} % fünf Ebenen



\renewcommand*{\thesection}{\Alph{section}.}
\renewcommand*{\thesubsection}{\Roman{subsection}.}
\renewcommand*{\thesubsubsection}{\arabic{subsubsection}.}
\renewcommand*{\theparagraph}{\alph{paragraph})}%)
\renewcommand*{\thesubparagraph}{\alph{subparagraph}\alph{subparagraph})}

\usepackage{zref-user,zref-counter}
\usepackage{expl3}


\makeatletter


\zref@newprop{section}[1]{\the\c@section}
\zref@newprop{subsection}[1]{\the\c@subsection}

\zref@addprop{main}{section}
\zref@addprop{main}{subsection}

\ExplSyntaxOn

\newcommand\myref[1]{%
 \hyperref[#1]{
 \int_compare:nTF
  {
   \zref@extractdefault {#1} {section} {0} = \the\c@section
  }
  {
   %ref is from current section
   \int_compare:nTF
    {\zref@extractdefault {#1} {subsection} {0}  = 0 }
    {Was~nun?}
    {\int_to_Roman:n{\zref@extractdefault {#1} {subsection} {0}}.}
  }
  {
  %ref is from other section
  \int_to_Alph:n  {\zref@extractdefault {#1} {section} {0}}.
  \int_to_Roman:n {\zref@extractdefault {#1} {subsection} {0}}
  }}}

\ExplSyntaxOff
\makeatother
%\usepackage{xcolor}
\usepackage[]{hyperref}

\newcommand\Label[1]{\zlabel{#1}\label{#1}}

\begin{document}

\section{First}
\Label{sec:first}

I'm refering to the second section and I'd like to have a full
reference like this: \myref{sec:secondofsecond}.

\section{Second}
\Label{sec:second}

\myref{sec:secondofsecond}, \myref{sec:first}, \myref{sec:second} And lets test the
new references, see \myref{CLA:first-paragraph} or \myref{CLA:first-second.second}

\subsection{Firstofsecond}
\Label{sec:firstofsecond}

Text.

\subsection{Secondofsecond}
\Label{sec:secondofsecond}

Now down the tree:

\subsubsection{first of second.second}
\Label{CLA:first-second.second}

Just some letters. 

\paragraph{first-paragraph}
\Label{CLA:first-paragraph}

And more text. 



\end{document}

这是我早期的 MWE,现在有点过时了:

\documentclass[english, parskip=half, numbers=noendperiod]{scrartcl}
\usepackage[T1]{fontenc}\usepackage[utf8]{inputenc}
\usepackage{babel, blindtext}

\setcounter{secnumdepth}{5} % five levels

\renewcommand*{\thesection}{\Alph{section}.}
\renewcommand*{\thesubsection}{\Roman{subsection}.}
\renewcommand*{\thesubsubsection}{\arabic{subsubsection}.}
\renewcommand*{\theparagraph}{\alph{paragraph})}%)
\renewcommand*{\thesubparagraph}{\alph{subparagraph}\alph{subparagraph})}
\renewcommand*{\paragraphformat}{\theparagraph{}\enskip}
\renewcommand*{\subparagraphformat}{%
  \thesubparagraph{}\enskip}

\makeatletter
\renewcommand{\p@subsection}{\thesection}
\renewcommand{\p@subsubsection}{\thesection\thesubsection}
\renewcommand{\p@paragraph}{\thesection\thesubsection\thesubsubsection}
\renewcommand{\p@subparagraph}{\thesection\thesubsection\thesubsubsection\theparagraph\,}
\makeatother{}

\begin{document}

\section{First}
\label{sec:first}

I'm refering to the second section and I'd like to have a full
reference like this: \ref{sec:secondofsecond}. 

\section{Second}
\label{sec:second}

\subsection{Firstofsecond}
\label{sec:firstofsecond}

Text.

\subsection{Secondofsecond}
\label{sec:secondofsecond}

But now I'm refering to »Firstofsecond« and my readers do not need the
full reference (\ref{sec:firstofsecond}), simply »I.« would be sufficient.

From here a reference to »first of second / second« should look like
this: »1.« and not \ref{sec:first-second-second}

\subsubsection{First of second / second}
\label{sec:first-second-second}

text.

\end{document}

好的,现在来谈谈回收已弃用的 jura.dtx 代码的想法

根据 jknappen 的建议,我尝试使用 jura.dtx 的代码来实现我想要的行为。我将代码更改为:

%\documentclass[english, parskip=half, numbers=noendperiod]{scrartcl}
\documentclass[english]{article}
\usepackage[T1]{fontenc}\usepackage[utf8]{inputenc}
\usepackage{babel, blindtext}

\setcounter{secnumdepth}{5} % fünf Ebenen



\renewcommand*{\thesection}{\Alph{section}.}
\renewcommand*{\thesubsection}{\Roman{subsection}.}
\renewcommand*{\thesubsubsection}{\arabic{subsubsection}.}
\renewcommand*{\theparagraph}{\alph{paragraph})}%)
\renewcommand*{\thesubparagraph}{\alph{subparagraph}\alph{subparagraph})}

%% Code stolen from jura.dtx
\makeatletter{}
\newcommand*{\@greek}[1]{\ifcase#1\relax\or$\alpha$\or$\beta$\or
$\gamma$\or$\delta$\or$\varepsilon$\or$\zeta$\or$\eta$\or$\vartheta$\or
$\iota$\or$\kappa$\or$\lambda$\or$\mu$\or$\nu$\or$\xi$\or$o$\or$\pi$\or
$\rho$\or$\sigma$\or$\tau$\or$\upsilon$\or$\varphi$\or$\chi$\or$\psi$\or
$\omega$\else\@ctrerr\fi}
\newcounter{lvla}
\newcounter{lvlb}
\newcounter{lvlc}
\newcounter{lvld}
\newcounter{lvle}
\newcounter{lvlf}
\newcounter{lvlg}
\newcounter{lvlh}
\newcounter{lvli}
\newcounter{lvlj}
\newcounter{lvlk}
\newcounter{lvll}
\renewcommand*{\thelvla}{\J@Number}
\renewcommand*{\thelvlb}{\J@Number}
\renewcommand*{\thelvlc}{\J@Number}
\renewcommand*{\thelvld}{\J@Number}
\renewcommand*{\thelvle}{\J@Number}
\renewcommand*{\thelvlf}{\J@Number}
\renewcommand*{\thelvlg}{\J@Number}
\renewcommand*{\thelvlh}{\J@Number}
\renewcommand*{\thelvli}{\J@Number}
\renewcommand*{\thelvlj}{\J@Number}
\renewcommand*{\thelvlk}{\J@Number}
\renewcommand*{\thelvll}{\J@Number}

\newcounter{tiefe}\setcounter{tiefe}{1}
%\setcounter{tocdepth}{12}
%\setcounter{secnumdepth}{12}
\newcommand*{\J@Number}{\J@NumberRoot{\value{tiefe}}%
\J@NumberEnd{\value{tiefe}}}
\newcommand*{\J@NumberRoot}[1]{\J@INumberRoot{#1}%
{\csname c@lvl\@alph{#1}\endcsname}}
\newcommand*{\J@INumberRoot}[2]{%
\ifcase#1\or
\@Alph{#2}\or
\@Roman{#2}\or
\@arabic{#2}\or
\@alph{#2}\or
\@alph{#2}\@alph{#2}\or
\@greek{#2}\or
\@greek{#2}\@greek{#2}\or
(\@arabic{#2})\or
(\@alph{#2})\or
(\@alph{#2}\@alph{#2})\or
(\@greek{#2})\or
(\@greek{#2}\@greek{#2})\fi}
\newcommand*{\J@NumberEnd}[1]{\ifnum#1<8\ifnum#1<4.\else)\fi\fi}

\newcommand*{\J@SetCurrent}{\xdef\@currentlabel{{\arabic{lvla}}%
{\arabic{lvlb}}{\arabic{lvlc}}{\arabic{lvld}}{\arabic{lvle}}%
{\arabic{lvlf}}{\arabic{lvlg}}{\arabic{lvlh}}{\arabic{lvli}}%
{\arabic{lvlj}}{\arabic{lvlk}}{\arabic{lvll}}}}

\ifnum\value{lvl\alph{tiefe}}=1%
\PackageWarning{alphanum}{only one subitem in level "\J@Number" ending}%
\fi
\setcounter{lvl\alph{tiefe}}{0}
\addtocounter{tiefe}{-1}

\renewcommand*{\ref}{%
\@ifstar{\@tempswatrue\J@ref}{\@tempswafalse\J@ref}}
\newcommand*{\J@ref}[1]{%
\expandafter\ifx\csname r@#1\endcsname\relax
 \protect\G@refundefinedtrue
 \nfss@text{\reset@font\bfseries ??}
 \@latex@warning{Reference '#1' on page \thepage \space undefined}%
\else
 \expandafter\J@refX\csname r@#1\endcsname
\fi
}
\newcommand*{\J@refX}[1]{\expandafter\J@refXX#1}
\newcommand*{\J@refXX}[2]{%
\ifcat_\ifnum9<1#1_\else X\fi
  #1%
\else
  \expandafter\J@refA#1%
\fi}
\newcommand*{\J@refA}[6]{\@tempcnta\@ne%
\J@refP1{#1}0\J@refP2{#2}{#1}\J@refP3{#3}{#2}\J@refP4{#4}{#3}%
\J@refP5{#5}{#4}\J@refP6{#6}{#5}\J@refB#6}
\newcommand*{\J@refB}[7]{\J@refP7{#2}{#1}\J@refP8{#3}{#2}%
\J@refP9{#4}{#3}\J@refP{10}{#5}{#4}\J@refP{11}{#6}{#5}%
\J@refP{12}{#7}{#6}\J@NumberEnd\@tempcnta}
\newcommand*{\J@refP}[3]{%
\if@tempswa%
 \ifnum#2>0\@tempcnta#1\,\J@INumberRoot{#1}{#2}\fi
\else%
 \ifnum#2=\value{lvl\@alph{#1}}%
  \ifnum#1=12\PackageError{alphanum}{Self-reference detected!}{You used
    a \protect\ref\space in the same section as the referenced
    \protect\label\MessageBreak That makes no sense!}\fi
 \else
  \ifnum#2>0\@tempcnta#1\@tempswatrue\J@INumberRoot{#1}{#2}\else
   \ifnum#3>0%
   \@tempcnta#1\advance\@tempcnta-1\relax\J@INumberRoot{\@tempcnta}{#3}%
   \fi
  \fi
 \fi
\fi}

\makeatother{}




\begin{document}

\section{First}
\label{sec:first}

I'm refering to the second section and I'd like to have a full
reference like this: \ref{sec:secondofsecond}. 

\section{Second}
\label{sec:second}

\subsection{Firstofsecond}
\label{sec:firstofsecond}

Text.

\subsection{Secondofsecond}
\label{sec:secondofsecond}

But now I'm refering to »Firstofsecond« and my readers do not need the
full reference (\ref{sec:firstofsecond}), simply »I.« would be sufficient.

From here a reference to »first of second / second« should look like
this: »1.« and not \ref{sec:first-second-second}

\subsubsection{First of second / second}
\label{sec:first-second-second}

text.


\end{document}

不幸的是,有一个错误(文件名:kurze-verweise-mwe.tex):

./kurze-verweise-mwe.tex:134: Missing number, treated as zero.
<to be read again> 
                   I
l.134 ...ence like this: \ref{sec:secondofsecond}.

./kurze-verweise-mwe.tex:134: Missing = inserted for \ifnum.
<to be read again> 

这里是否有人有时间和精力为这两个例子中的一个寻找解决方案?

在此处输入图片描述

答案1

理论上这并不难。您可以使用 zref 存储标签的各个部分、子部分等的各种值,然后只需测试它们的值并与当前值进行比较,然后决定应该发生什么。

实际上,如果你真的想在所有级别上都这样做,可能会有点累,因为有相当多的测试,而且通常需要一张大纸才能正确完成所有分支(我第一次尝试从来没有这样做过)。

\documentclass[english]{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{babel, blindtext}

\setcounter{secnumdepth}{5} % fünf Ebenen



\renewcommand*{\thesection}{\Alph{section}.}
\renewcommand*{\thesubsection}{\Roman{subsection}.}
\renewcommand*{\thesubsubsection}{\arabic{subsubsection}.}
\renewcommand*{\theparagraph}{\alph{paragraph})}%)
\renewcommand*{\thesubparagraph}{\alph{subparagraph}\alph{subparagraph})}

\usepackage{zref-user,zref-counter}
\usepackage{expl3}


\makeatletter


\zref@newprop{section}[1]{\the\c@section}
\zref@newprop{subsection}[1]{\the\c@subsection}

\zref@addprop{main}{section}
\zref@addprop{main}{subsection}

\ExplSyntaxOn

\newcommand\myref[1]{%
 \hyperref[#1]{
 \int_compare:nTF
  {
   \zref@extractdefault {#1} {section} {0} = \the\c@section
  }
  {
   %ref is from current section
   \int_compare:nTF
    {\zref@extractdefault {#1} {subsection} {0}  = 0 }
    {Was~nun?}
    {\int_to_Roman:n{\zref@extractdefault {#1} {subsection} {0}}.}
  }
  {
  %ref is from other section
  \int_to_Alph:n  {\zref@extractdefault {#1} {section} {0}}.
  \int_to_Roman:n {\zref@extractdefault {#1} {subsection} {0}}
  }}}

\ExplSyntaxOff
\makeatother
%\usepackage{xcolor}
\usepackage[]{hyperref}

\newcommand\Label[1]{\zlabel{#1}\label{#1}}

\begin{document}

\section{First}
\Label{sec:first}

I'm refering to the second section and I'd like to have a full
reference like this: \myref{sec:secondofsecond}.

\section{Second}
\Label{sec:second}

\myref{sec:secondofsecond}, \myref{sec:first}, \myref{sec:second}

\subsection{Firstofsecond}
\Label{sec:firstofsecond}

Text.

\subsection{Secondofsecond}
\Label{sec:secondofsecond}

\end{document}

在此处输入图片描述

答案2

您是否知道汝拉包装? 虽然它相当古老且缺乏支持,但它提供了您勾勒出的精细等级结构(甚至进一步深入到 α) β) 和 αα) ββ) 所指示的等级

编辑:请注意,使用 引入的文档标记jura(或\usepackage{alphanum}包含级别结构的 )与通常的 LaTeX 分段命令(如\section等)不兼容。您应使用、和 的jura分段样式。\toc\sub\levelup

答案3

回答乌尔丽克·菲舍尔为我指明了方向,经过一整天的研究后,我找到了以下解决方案。

这可能是你读过的最低级别的编码,所以要小心。如果有人想出更好的解决方案:很好!

但如果没有 Ulrikes 的慷慨帮助,这一切都不可能实现,非常感谢!

有些注释是德语的,抱歉,现在已经很晚了,我怀疑明天我是否能理解我今天写的内容!啊,注释中各种无用的“(”是为了让 Emacs 高兴,否则它就无法匹配“{”和“}”。

\documentclass[english]{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{babel, blindtext}

\setcounter{secnumdepth}{5} % fünf Ebenen



\renewcommand*{\thesection}{\Alph{section}.}
\renewcommand*{\thesubsection}{\Roman{subsection}.}
\renewcommand*{\thesubsubsection}{\arabic{subsubsection}.}
\renewcommand*{\theparagraph}{\alph{paragraph})}%)
\renewcommand*{\thesubparagraph}{\alph{subparagraph}\alph{subparagraph})}

\usepackage{zref-user, zref-counter}
\usepackage{expl3}


\makeatletter


\zref@newprop{section}[1]{\the\c@section}
\zref@newprop{subsection}[1]{\the\c@subsection}
\zref@newprop{subsubsection}[1]{\the\c@subsubsection}
\zref@newprop{paragraph}[1]{\the\c@paragraph}
\zref@newprop{subparagraph}[1]{\the\c@subparagraph}

\zref@addprop{main}{section}
\zref@addprop{main}{subsection}
\zref@addprop{main}{subsubsection}
\zref@addprop{main}{paragraph}
\zref@addprop{main}{subparagraph}

\ExplSyntaxOn

\newcommand\myref[1]{%
 \hyperref[#1]{%
  \int_compare:nTF
  {% A.-Ebene prüfen: sind wir auf dem gleichen Zweig? 
   \zref@extractdefault {#1} {section} {0} = \the\c@section
  }
  { % Ja, wir sind auf dem gleichen Zweig
    % Existiert eine weitere Ebene?
    \int_compare:nTF
    {\zref@extractdefault {#1} {subsection} {0}  = 0}
    % Wenn subsection 0 ist, also nicht existiert, dann muss section ausgegeben
    % werden. 
    {
     % \emph{Fehlerhafter Verweis}
    \int_to_Alph:n  {\zref@extractdefault {#1} {section} {0}}.
    }
    % Wenn dagegen subsection existiert, dann geht die Prüfung weiter:
    {
     % OK, weitere ebene existiert. 
     \int_compare:nTF % I.-Ebene
      {
        \zref@extractdefault {#1} {subsection} {0}  = \the\c@subsection 
      }% Sind wir auf der gleichen I.-Ebene?
      {% I.-Ebene: Gleiche Ebene
        % Prüfung: gibt es eine weitere Ebene?
        \int_compare:nTF
        {\zref@extractdefault {#1} {subsubsection} {0} = 0}
        {% Wenn 0, dann keine weitere Ebene und subsection ausgeben:
          \int_to_Roman:n {\zref@extractdefault {#1} {subsection} {0}}.
        }
        {% OK, weitere Ebene existiert
              \int_compare:nTF % subsubsection-Ebene
                {% 1.-Ebene prüfen
                  \zref@extractdefault {#1} {subsubsection} {0} = \the\c@subsubsection  
                }
                {% 1.-Ebene ist gleich
                  %Prüfung: gibt es eine weitere Ebene?
                  \int_compare:nTF % Gibt es eine a-Ebene?
                  {\zref@extractdefault {#1} {paragraph} {0} =  0}
                  {% Wenn 0, dann keine weitere Ebene und subsubsection ausgeben:
                    \int_to_arabic:n { \zref@extractdefault {#1} {subsubsection} {0}}.
                  }
                  {% Paragraph existiert:
                   \int_compare:nTF % a-Ebene prüfen
                    {
                      \zref@extractdefault {#1} {paragraph} {0} =  \the\c@paragraph
                    }
                    {% a-Ebene ist gleich
                      % Prüfung: aa-Ebene vorhanden?
                      \int_compare:nTF % 
                      { \zref@extractdefault {#1} {subparagraph} {0} =  0}
                      %
                      {%( damit emacs happy ist
                        \int_to_alph:n {\zref@extractdefault {#1} {paragraph} {0} })
                      }
                      {% aa-Ebene vorhanden
                        \int_compare:nTF
                        {\zref@extractdefault {#1} {subparagraph} {0} = \the\c@subparagraph}
                        {\emph{Fehlerhafter VERWEIS}}
                        %( make emacs happy
                        {\int_to_alph:n { \zref@extractdefault {#1} {subparagraph}   {0}   }
                        \int_to_alph:n { \zref@extractdefault {#1} {subparagraph} {0}   })
                        }
                      }
                    }
                    {% a-Ebene ist unterschiedlich (
                      \int_to_alph:n{\zref@extractdefault {#1} {paragraph} {0}})
                    }
                  }
                }
                {% 1.-Ebene ist unterschiedlich 
                  \int_to_arabic:n{\zref@extractdefault {#1} {subsubsection} {0}}.
                }
         }% 3. Klammer Prüfung, ob subsection existiert (also wenn ja)
    }   
     {% I.-Ebene: ungleich
       % Also römische Nummer ausgeben
         \int_to_Roman:n{\zref@extractdefault {#1} {subsection} {0}}.%
          \int_compare:nTF%existiert die nächste Ebene?
           { \zref@extractdefault {#1} {subsubsection} {0} = 0 }
           {}% = 0, subsubsection nicht vorhanden
           {% ungleich 0
            % also arabische Zahl ausgeben
             \int_to_arabic:n { \zref@extractdefault {#1} {subsubsection} {0}}.
               \int_compare:nTF%existiert die nächste Ebene paragraph?
               { \zref@extractdefault {#1} {paragraph} {0} = 0 }
               {}% = 0, subsubsection nicht vorhanden
               {% ungleich 0 (
                 \int_to_alph:n { \zref@extractdefault {#1} {paragraph} {0}})
               }
               % subpar Ebene vorhanden?
               \int_compare:nTF
               { \zref@extractdefault {#1} {subparagraph} {0} = 0}
               {}% ja, also existiert subpar nicht 
               { %(
                 \int_to_alph:n {\zref@extractdefault {#1} {subparagraph} {0}}
                 \int_to_alph:n {\zref@extractdefault {#1} {subparagraph} {0}})
               }
           }
       }% 3. Klammer I.-Ebene
  }% 3. Klammer Prüfung, ob I. Ebene besteht.
  }% 2. Klammer A.-Ebene
  {% A.-Ebene: Ungleich
  %ref is from other section
  \int_to_Alph:n  {\zref@extractdefault {#1} {section} {0}}.
    \int_compare:nTF%existiert die nächste Ebene?
    { \zref@extractdefault {#1} {subsection} {0} = 0 }
    {}% ja, erfüllt, keine subsection
    {% subsection existiert:
      \int_to_Roman:n {\zref@extractdefault {#1} {subsection} {0}}.
      \int_compare:nTF%existiert die nächste Ebene?
          { \zref@extractdefault {#1} {subsubsection} {0} = 0 }
          {}% = 0, subsubsection nicht vorhanden
          {% ungleich 0
            \int_to_arabic:n { \zref@extractdefault {#1} {subsubsection} {0} }.
             \int_compare:nTF%existiert die nächste Ebene paragraph?
              { \zref@extractdefault {#1} {paragraph} {0} = 0 }
              {}% = 0, paragraph nicht vorhanden
              {% ungleich 0 (
                \int_to_alph:n { \zref@extractdefault {#1} {paragraph} {0} })
                \int_compare:nTF
                { \zref@extractdefault {#1} {subparagraph} {0} = 0}
                {}% ja, also existiert subpar nicht
                {% (
                  \int_to_alph:n {\zref@extractdefault {#1} {subparagraph} {0}}
                  \int_to_alph:n {\zref@extractdefault {#1} {subparagraph} {0}})
                }
              }
          }
       }
  }% 3. Klammer A.-Ebene
}% hyperref Klammer zu
}%Ende Befehlsdefinition myref

\ExplSyntaxOff
\makeatother

\usepackage[]{hyperref}

\newcommand\Label[1]{\zlabel{#1}\label{#1}}

\begin{document}

\textbf{Präambel}

\begin{enumerate}
  \item Reference to first section: \myref{sec:first}
  \item Reference to second section: \myref{sec:second}
  \item Reference to snd section / first subsection: \myref{sec:firstofsecond}
  \item Ref. to snd sect. / second subsect: \myref{sec:secondofsecond}
  \item Ref to snd sect. / second subsect / first arabic:
  \myref{CLA:first-second.second}
  \item Ref. to snd sect. / second subsect / first arabic / second par:
  \myref{CLA:second-paragr}
  \item Subparagraph: \myref{CLA:first-sub}
\end{enumerate}


\section{First}
\Label{sec:first}

Sytematically:
\begin{enumerate}
  \item Reference to this section should display a warning: \myref{sec:first}.
  \item Reference to next section: \myref{sec:second}
  \item Reference to next section / first subsection: \myref{sec:firstofsecond}
  \item Ref. to next sect. / second subsect: \myref{sec:secondofsecond}
  \item Ref to next sect. / second subsect / first arabic:
  \myref{CLA:first-second.second}
  \item Ref. to next sect. / second subsect / first arabic / second par:
  \myref{CLA:second-paragr}
  \item Subparagraph: \myref{CLA:first-sub}
\end{enumerate}


\section{Second}
\Label{sec:second}

Sytematically:
\begin{enumerate}
  \item Reference to previous section: \myref{sec:first}.
  \item Reference to this section should display a warning: \myref{sec:second}
  \item Reference to this section / first subsection: \myref{sec:firstofsecond}
  \item Ref. to this sect. / second subsect: \myref{sec:secondofsecond}
  \item Ref to this sect. / second subsect / first arabic:
  \myref{CLA:first-second.second}
  \item Ref. to this sect. / second subsect / first arabic / second par:
  \myref{CLA:second-paragr}
  \item Subparagraph: \myref{CLA:first-sub}
\end{enumerate}


\subsection{Firstofsecond}
\Label{sec:firstofsecond}

Sytematically:
\begin{enumerate}
  \item Reference to previous section: \myref{sec:first}.
  \item Reference to this section: \myref{sec:second}
  \item Reference to this section / first subsection: \myref{sec:firstofsecond}
  \item Ref. to this sect. / second subsect: \myref{sec:secondofsecond}
  \item Ref to this sect. / second subsect / first arabic:
  \myref{CLA:first-second.second}
  \item Ref. to this sect. / second subsect / first arabic / second par:
  \myref{CLA:second-paragr}
  \item Subparagraph: \myref{CLA:first-sub}
\end{enumerate}


\subsection{Secondofsecond}
\Label{sec:secondofsecond}


Now down the tree:

\subsubsection{first of second.second}
\Label{CLA:first-second.second}

Just some letters. 

\paragraph{first-paragraph}
\Label{CLA:first-paragraph}

And more text. Ref to next paragraph, should be a b): \myref{CLA:second-paragr}

\begin{enumerate}
  \item Reference to previous section: \myref{sec:first}.
  \item Reference to this section: \myref{sec:second}
  \item Reference to this section / first subsection: \myref{sec:firstofsecond}
  \item Ref. to this sect. / second subsect: \myref{sec:secondofsecond}
  \item Ref to this sect. / second subsect / first arabic:
  \myref{CLA:first-second.second}
  \item Ref. to this sect. / second subsect / first arabic / second par:
  \myref{CLA:second-paragr}
  \item Subparagraph: \myref{CLA:first-sub}
\end{enumerate}



\paragraph{second paragr}
\Label{CLA:second-paragr}

\begin{enumerate}
  \item Reference to previous section: \myref{sec:first}.
  \item Reference to this section: \myref{sec:second}
  \item Reference to this section / first subsection: \myref{sec:firstofsecond}
  \item Ref. to this sect. / second subsect: \myref{sec:secondofsecond}
  \item Ref to this sect. / second subsect / first arabic:
  \myref{CLA:first-second.second}
  \item Ref. to this sect. / second subsect / first arabic / second par:
  \myref{CLA:second-paragr}
\end{enumerate}

\subparagraph{first sub}
\Label{CLA:first-sub}

\begin{enumerate}
  \item Reference to previous section: \myref{sec:first}.
  \item Reference to this section: \myref{sec:second}
  \item Reference to this section / first subsection: \myref{sec:firstofsecond}
  \item Ref. to this sect. / second subsect: \myref{sec:secondofsecond}
  \item Ref to this sect. / second subsect / first arabic:
  \myref{CLA:first-second.second}
  \item Ref. to this sect. / second subsect / first arabic / second par:
  \myref{CLA:second-paragr}
  \item Subparagraph: \myref{CLA:first-sub}
\end{enumerate}


dsfsdf


\subsubsection{Last one}
\Label{CLA:last-one}

text

\paragraph{paragraph somewhere}
\Label{CLA:paragraph-somewhere}

OK, the par above should display a). And now we refer to the next subpar:
\myref{CLA:second-subpar}.

And now a subpar:

\subparagraph{second subpar}
\Label{CLA:second-subpar}

text

\subparagraph{third subpar}





\end{document}

相关内容