4

I have the following rendering by using (french language) :

avec $k = k(k_\text{ref},\mu_\text{ref})$ et $\mu=\mu(\mu_\text{ref})$. Le d\'etail de l'obtention de cette relation peut-\^etre trouv\'e dans \autoref{appendix:demoPobs}}

...

\appendix
\chapter{D\'emonstration de l'expression}
\label{appendix:demoPobs}

enter image description here

I would like to make display :

... peut-être trouvé dans l'Appendice A with also an \autoref. To recap, I would like to add a "l" letter folllowed by a simple quote to get l'Appendice A with all word referenced by \autoref (l'Appendice A)

Is it posible in Latex to achieve this ?

UPDATE 1: sorry for the missing informations.

I am using pdflatex under MacOS HighSierre with :

\documentclass[11pt,french,oneside]{report}
\usepackage[latin1]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[francais]{babel}
\usepackage{indentfirst}
\usepackage{lastpage}
\usepackage{amsmath}
\usepackage{fancyhdr}
\usepackage{url}
\usepackage{epsfig}
\usepackage{graphics}
\usepackage{multirow}
\usepackage{vmargin}
\usepackage{float}
\usepackage{psboxit,pstcol}
\usepackage{tabularx}
\usepackage[style=ext-authoryear, backend=biber]{biblatex}
\usepackage{hyperref}
\usepackage[nameinlink,noabbrev]{cleveref}
5

Here is a way with hyperref only (no use of cleveref):

\documentclass[french]{article}
\usepackage{babel}
\usepackage[T1]{fontenc}
\usepackage{lmodern}
\usepackage[colorlinks,allcolors=blue]{hyperref}

\AtBeginDocument{%
  \def\appendixautorefname{l'appendice}%
}

\begin{document}
\dots\ dans \autoref{appendix_demoPobs}.

\dots\ dans l'appendice~\ref{appendix_demoPobs}.

\appendix
\section{D\'emonstration de l'expression}
\label{appendix_demoPobs}
\end{document}

enter image description here

3

I don't know how to achieve your typesetting purely with hyperref's machinery. However, it's not too difficult with the help of the cleveref package (which your document loads) and its \Cref macro. Note the use of \Crefname in the code below to provide the prefix l' along with Appendice.

enter image description here

% !TEX TS-program = pdflatex
\documentclass[french]{article}
\usepackage{babel}
\usepackage[T1]{fontenc}
\usepackage{lmodern}

\usepackage[colorlinks,allcolors=blue]{hyperref}
\usepackage[nameinlink,noabbrev]{cleveref}
\Crefname{appendix}{l'Appendice}{les Appendices}

\begin{document}
\dots\ dans \autoref{appendix_demoPobs}.

\dots\ dans \Cref{appendix_demoPobs}.

\dots\ dans l'Appendice~\ref{appendix_demoPobs}.

\appendix
\section{D\'emonstration de l'expression}
\label{appendix_demoPobs}
\end{document}
  • My answer shows how to do it with pure hyperref, for those interested. – frougon May 6 at 5:47

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.