![如何在标题数字和介绍标签的双点之间插入空格?](https://linux22.com/image/411254/%E5%A6%82%E4%BD%95%E5%9C%A8%E6%A0%87%E9%A2%98%E6%95%B0%E5%AD%97%E5%92%8C%E4%BB%8B%E7%BB%8D%E6%A0%87%E7%AD%BE%E7%9A%84%E5%8F%8C%E7%82%B9%E4%B9%8B%E9%97%B4%E6%8F%92%E5%85%A5%E7%A9%BA%E6%A0%BC%EF%BC%9F.png)
即使我在文档(Tufte-book documentclass)的序言中指定了法语,图表和表格的图例格式仍保留为英语。因此,我在序言中的 babel-french 包中添加了一个命令,将“Table”替换为“Tableau”(术语 Figure 在两种语言中是相同的),并在图表开头处精确显示,这样就可以了:
\documentclass[symmetric,justified,marginals=raggedouter]{tufte-book}
\usepackage[french]{babel}
\addto\captionsfrench{\def\tablename{Tableau}}
\begin{document}
\begin{table*}[h]
\selectlanguage{french}
\footnotesize
\begin{tabular}
\end{tabular}
\caption{Example to insert space before double dots}
\label{tab:example}
\end{table*}
\end{document}
另一方面,在法语中,标题数字和表示标题标签的双点之间有一个空格,这与英语的做法相反(“图 1:”而不是“图 1:”)。
我该怎么做才能插入这个空间?
答案1
这似乎有效:
\documentclass[12pt]{scrartcl}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[english,french]{babel}
\usepackage[french]{cleveref}
\usepackage{caption}
% Declare a new caption label seperator with a small math space \, in front of ":"
\DeclareCaptionLabelSeparator{frcolon}{ $\,:$ }
% Set the new label seperator to be used by caption
\captionsetup{labelsep=frcolon}
\begin{document}
French \cref{tab-my_label} seems to be different from English tables...
\begin{table}[h]
\centering
\begin{tabular}{c|c}
a & b \\
c & d
\end{tabular}
\caption{Caption}
\label{tab-my_label}
\end{table}
\end{document}