回憶錄,babel[french] 和 @makecaption

回憶錄,babel[french] 和 @makecaption

memoir我遇到了、 thebabel和套件的問題caption:編譯文件時,日誌回傳警告:

Package frenchb.ldf Warning: The definition of \@makecaption has been changed,
(frenchb.ldf)                frenchb will NOT customise it;
(frenchb.ldf)                reported on input line 8.

問題是,法國人babel應該創建:一個主動字符,因此在其前後各留一個空格。但由於@makecaption巨集以某種方式重新定義,因此空格遺失了。如何強制 周圍的排版行為:正確?

這是一個 MWE:

\documentclass[a4paper,12pt,twoside,openright,final]{memoir}
\usepackage[T1]{fontenc}
\usepackage[english,francais]{babel}
\begin{document}

Blah blah blah (\ref{fig:Figure})

\begin{figure}
\caption{Xxxxx}
\label{fig:Figure}
\end{figure}
\end{document}

答案1

解決方案1

我們利用這樣一個事實:法語排版中的冒號前後應該有一個正常的詞間空格。

\documentclass[a4paper,12pt,twoside,openright,final]{memoir}
\usepackage[T1]{fontenc}
\usepackage[english,francais]{babel}

\captiondelim{ : }

\begin{document}

Blah blah blah (\ref{fig:Figure})

\begin{figure}
\caption{Xxxxx}
\label{fig:Figure}
\end{figure}
\end{document}

解決方案2

我們教memoir如何使用重新定義的冒號babel;這樣做的好處是,如果\selectlanguage{english}已發布或我們在 的範圍內,它將給出正常的冒號\begin{otherlanguage}{english}

\documentclass[a4paper,12pt,twoside,openright,final]{memoir}
\usepackage[T1]{fontenc}
\usepackage[english,francais]{babel}

\AtBeginDocument{%
  \begingroup\lccode`~=`:
  \lowercase{\endgroup\captiondelim{~ }}%
}

\begin{document}

Blah blah blah (\ref{fig:Figure})

\begin{figure}
\caption{Xxxxx}
\label{fig:Figure}
\end{figure}
\end{document}

在此輸入影像描述

至於關於 的警告\@makecaption,恐怕您必須保留它或使用包裝silence將其刪除。

相關內容