Creating subsubsubsection and using \ref and \label (+hyperref)
im writing on my thesis and need more levels of sections. This seems to be not a rare problem. So, after some search on the web i defined my custom deeper sections in terms of the following code.
\newcommand{\csubsubsubsection}[1]{ {
\paragraph{#1}$\;$\\%$\;$\\
}}
\newcommand{\csubsubsubsubsection}[1]{ {
\subparagraph{#1}$\;$\\$\;$\\
}}
The problems im facing are twofold. The first issue is that a pair of \label and \ref is pointing to the correct place, but the link name is wrong. So when the \label-command is positioned like
\section{Top Section}
This is a nice section and the link
to \ref{sec:mydeepersec} points correctly,
but the link name shows the number of \ref{sec:mymidsec}.
\subsubsection{Mid Section}
\label{sec:mymidsec}
\csubsubsubsection{My deeper section}
\label{sec:mydeepersec}
and is called with \ref somewhere else, the displayed numer of the link is wrong. It shows the number of the upper \subsubsection. I played around with the \refstepcounter command and tried to put \phantomsection in the command definition of my custom deeper sections. This did not fix the problem. Same with increasing the \setcounter{secnumdepth}.
The second issue is, that the \csubsubsubsection and \csubsubsubsubsection seems to not to be treated like a section or subsubsection. Sometimes those deeper sections will start at the end of one page and the the first sentence is displayed on the next page. So it seems like Latex treats them like standard text, so like \textbf{} formated Text.
And some options i use:
\documentclass[a4paper]{scrartcl}
\usepackage[utf8]{inputenc} \usepackage[T1]{fontenc}
\usepackage{lmodern} \usepackage[ngerman]{babel}
\setcounter{tocdepth}{4}
\setcounter{secnumdepth}{4}
\hypersetup{linkbordercolor={1 1 1}, citebordercolor={1 1 1},
pdfborder={0 0 0}, final=true, naturalnames=true}
I use pdflatex and and an upgraded TexLive on Ubuntu 10 Lucid. So the package versions are recent.
im writing on my thesis and need more levels of sections. This seems to be not a rare problem. So, after some search on the web i defined my custom deeper sections in terms of the following code.
\newcommand{\csubsubsubsection}[1]{ {
\paragraph{#1}$\;$\\%$\;$\\
}}
\newcommand{\csubsubsubsubsection}[1]{ {
\subparagraph{#1}$\;$\\$\;$\\
}}
The problems im facing are twofold. The first issue is that a pair of \label and \ref is pointing to the correct place, but the link name is wrong. So when the \label-command is positioned like
\section{Top Section}
This is a nice section and the link
to \ref{sec:mydeepersec} points correctly,
but the link name shows the number of \ref{sec:mymidsec}.
\subsubsection{Mid Section}
\label{sec:mymidsec}
\csubsubsubsection{My deeper section}
\label{sec:mydeepersec}
and is called with \ref somewhere else, the displayed numer of the link is wrong. It shows the number of the upper \subsubsection. I played around with the \refstepcounter command and tried to put \phantomsection in the command definition of my custom deeper sections. This did not fix the problem. Same with increasing the \setcounter{secnumdepth}.
The second issue is, that the \csubsubsubsection and \csubsubsubsubsection seems to not to be treated like a section or subsubsection. Sometimes those deeper sections will start at the end of one page and the the first sentence is displayed on the next page. So it seems like Latex treats them like standard text, so like \textbf{} formated Text.
And some options i use:
\documentclass[a4paper]{scrartcl}
\usepackage[utf8]{inputenc} \usepackage[T1]{fontenc}
\usepackage{lmodern} \usepackage[ngerman]{babel}
\setcounter{tocdepth}{4}
\setcounter{secnumdepth}{4}
\hypersetup{linkbordercolor={1 1 1}, citebordercolor={1 1 1},
pdfborder={0 0 0}, final=true, naturalnames=true}
I use pdflatex and and an upgraded TexLive on Ubuntu 10 Lucid. So the package versions are recent.
No comments:
Post a Comment