.png)
방금 The LaTeX Companion Third edition을 구입한 후 책에 나오는 예제를 테스트하고 있습니다. 78페이지의 예제에서는 \labelformat 및 \Ref를 사용하는 방법을 다루고 있습니다.
\documentclass[10pt,a4paper]{article}
\usepackage[nospace]{varioref}
%\usepackage{babel}
\labelformat{section}{section~#1}
\labelformat{equation}{equation~(#1)}
\begin{document}
\section{An example}\label{sec}
\Ref{sec} shows the use of the \verb=\labelformat= declaration with a reference to \ref{eq}.
\begin{equation} a = b \label{eq} \end{equation}
\end{document}
당신이 추가하면
\usepackage{babel}
원하는 언어로 무엇이든 얻을 수 있습니다.
! Incomplete \iffalse; all text was ignored after line 11.
\Ref를 \ref로 바꾸면 모든 것이 다시 잘 작동하지만 분명히 첫 번째 문자의 UpperCasing이 느슨해집니다.
이러한 비호환성을 해결할 수 있는 방법이 있습니까?
나는 옵션 없이 [영어]babel과 [프랑스어]babel 및 바벨을 사용해 보았습니다. 나는 pdfLaTeX, LaTeX, XeLaTeX, LuaLaTeX를 사용해 보았습니다 ... 같은 문제 ...
감사해요
답변1
이를 보고해야 babel
하지만 빠른 해결 방법은 내부 명령을 복원하는 것입니다.
\documentclass[10pt,a4paper]{article}
\usepackage[nospace]{varioref}
\makeatletter
\let\@kernel@ref@saved\@kernel@ref
\usepackage{babel}
\let\@kernel@ref\@kernel@ref@saved
\makeatother
\labelformat{section}{section~#1}
\labelformat{equation}{equation~(#1)}
\begin{document}
\section{An example}\label{sec}
\Ref{sec} shows the use of the \verb=\labelformat= declaration with a reference to \ref{eq}.
\begin{equation} a = b \label{eq} \end{equation}
\end{document}
babel
활성 속기 문자가 작동하도록 일부 \label
/ \ref
내부를 재정의하지만 일부 세부
\Ref
사항으로 인해 혼란스러워 보이는 패치가 취소됩니다. 따라서 "
babel에 의해 활성화된 일부 문자는 이 변경 후에 레이블에서 작동하지 않을 수 있습니다.