(this is simply a cut-and-paste of the definition from article.cls with \newcommand changed to \renewcommand and "Appendix" added at the end. be careful with the spacing; you have to supply the space after "Appendix"; it won't be done for you.)
using this, just input \appendix \section{}. this is admittedly brute force, but the question has been hanging around for a while with no answer, so something is probably better than nothing.
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.
Best Answer
the only way i can see to do this is to redefine the
\section
command either just before or just after\appendix
. this should do it:(this is simply a cut-and-paste of the definition from
article.cls
with\newcommand
changed to\renewcommand
and "Appendix
" added at the end. be careful with the spacing; you have to supply the space after "Appendix"; it won't be done for you.)using this, just input
\appendix \section{}
. this is admittedly brute force, but the question has been hanging around for a while with no answer, so something is probably better than nothing.