Generaltitlesec -- appendix -- \ref

LaTeX specific issues not fitting into one of the other forums of this category.
Post Reply
otoomet
Posts: 15
Joined: Sun Apr 01, 2007 9:39 am

titlesec -- appendix -- \ref

Post by otoomet »

Consider the following example:

Code: Select all

\documentclass{article}
\usepackage{titlesec}

\titleformat{\section}%
{}%
{\arabic{section}.\quad}%
{0pt}{}{}

\begin{document}

\section{Intro}
\label{sec:intro}

See Section~\ref{sec:intro} and Appendix~\ref{sec:app}.

\appendix

\section{Appendix}
\label{sec:app}

\end{document}
It prints "See Section 1 and Appendix A" but the appendix' title looks "1. Appendix". Any ideas how I can either
  • Have a consistent appendix numbering (as "A. appendix")
  • change the title (and \ref labels) for the appendix only
Ideas?

Thanks in advance,
Ott

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

otoomet
Posts: 15
Joined: Sun Apr 01, 2007 9:39 am

titlesec -- appendix -- \ref

Post by otoomet »

Well, redefining the title label after /appendix

Code: Select all

\appendix
\titleformat{\section}%
{}%
{\Alph{section}.\quad}%
{0pt}{}{}
Aren't there any cleaner solutions?
Post Reply