![回憶錄,babel[french] 和 @makecaption](https://rvso.com/image/272012/%E5%9B%9E%E6%86%B6%E9%8C%84%EF%BC%8Cbabel%5Bfrench%5D%20%E5%92%8C%20%40makecaption.png)
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
將其刪除。