4

I am searching for a possibility to rename sections. I am using the ngerman package.

I have tried something similar to https://stackoverflow.com/questions/3125231/how-to-rename-sections-in-latex, with \subsectionname, but it doesn't work.

With Google I can only find the constellation ngerman and babel.

Thanks for any advices.

EDIT:
So I am using babel again.

Here is the mini example:

\documentclass{scrartcl}
\usepackage[ngerman]{babel}
\usepackage{hyperref}

\makeatletter
% Ändert den Style von paragraph ähnlich zu den von einen Unterkapitel
\renewcommand{\paragraph}{%
    \@startsection{paragraph}{4}{\z@}%
    {3.25ex \@plus1ex \@minus.2ex}%
    {1ex \@plus .1ex}%
    {\raggedsection\normalfont\sectfont\size@paragraph}%
}
% Ändert den Style von subparagraph ähnlich zu den von einen Unterkapitel
\renewcommand{\subparagraph}{%
    \@startsection{subparagraph}{5}{\z@}%
    {3.25ex \@plus1ex \@minus.2ex}%
    {1ex \@plus .1ex}%
    {\raggedsection\normalfont\sectfont\size@subparagraph}%
}
\makeatother

\setcounter{tocdepth}{5}
\setcounter{secnumdepth}{5}

\begin{document}

\section{Title}
\autoref{sec:label1}
\autoref{sec:label2}
\autoref{sec:label3}
\autoref{sec:label4}

\subsection{Subtitle}
\label{sec:label1}
\subsubsection{Another subtitle}
\label{sec:label2}
\paragraph{Paragraph}
\label{sec:label3}
\subparagraph{Subparagraph}
\label{sec:label4}
\end{document}

Label3 isn't really nice, because of the multiple unter. My idea is to replace them all with my own definition.

  • 3
    Since »ngerman« is obsolete, »babel« along with the language option ngerman is the way to go. For redefining names refer to the package manual. And finally it can't do any harm to add a proper minimal example to your question. Just for the case that you expect answers. – Thorsten Donig Jul 5 '12 at 15:48
  • You can't find anything to renaming section names in the babel package manual. I don't really understand why in this case a minimal example is neccessary, but there it is. – CSchulz Jul 5 '12 at 17:04
  • 1
    The minimal example is necessary to see what you are exactly doing. And now that you provided one, we are able to help. – Thorsten Donig Jul 5 '12 at 17:13
  • 1
    Page 15 of the hyperref manual provides the solution. – lockstep Jul 5 '12 at 17:15
2

The problem is not related to »ngerman« or »babel«, but more to »hyperref«. It defines the concerned names for its \autoref command. Section 4 (p. 15) of the package manual shows you how get those names redefined.

  • 3
    Could you add some code to make this answer self-contained? – doncherry Jul 5 '12 at 18:16
2

This is an example from the documentation.

\usepackage[ngerman]{babel}  
\addto\extrasngerman{%  
  \def\subsectionautorefname{Unterkapitel}%  
} 

And here the table of the relevant macros:

Macro               Default
-------------------------------
\figurename         Figure
\tablename          Table
\partname           Part
\appendixname       Appendix
\equationname       Equation
\Itemname           item
\chaptername        chapter
\sectionname        section
\subsectionname     subsection
\subsubsectionname  subsubsection
\paragraphname      paragraph
\Hfootnotename      footnote
\AMSname            Equation
\theoremname        Theorem
\page               page

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.