Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I use for appendix the following function

\appendix
\renewcommand{\thesection}{\Roman{section}}

\section{appendix}

\section*{\text{Appendix I}}

But it gives me a double name of the section. How to 'erase' the first name for the appendix? (I wanted that it would be written 'Appendix I.').

share|improve this question
2  
Just remove \section{appendix}. –  Werner Jan 30 '13 at 6:13
    
Why the \text command? –  egreg Jan 30 '13 at 10:32
add comment

1 Answer 1

up vote 2 down vote accepted

You're setting your numbering to capital roman numerals in your appendix, then you define two sections. The first one \section{appendix} will print I. appendix or appendix I. depending on your section definition. It will also appear in the ToC. The second one (last line) will not appear in the ToC, it will print Appendix I (though i don't know, what you're trying to achieve using \text{}), but it won't affect the counter you especially redefined, because of the * (unnumbered section. I think that is not a good practice for appendicies. Though I'm guessing which document class you're using, this MWE might be more of what you want

\documentclass[a4paper,12pt]{scrartcl}
\usepackage{hyperref,url,ifthen,listings}
\begin{document}\noindent
\section{normal title}
\appendix
\renewcommand{\thesection}{Appendix \Roman{section}}
\section{An appendix title}
\section{Another}
This gets automatically the next number.
\end{document}

Every section after the redefinition gets Appendix and a roman numeral prepended. In the document and in the ToC.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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