簇绒书中带有巴斯克-巴别塔图案的序数标题

簇绒书中带有巴斯克-巴别塔图案的序数标题

巴斯克语中的图表编号必须是序数,但 Babel 实现却能将它们生成为英语或西班牙语的格式:伊鲁迪亚 1代替1. 伊鲁迪亚

\documentclass[]{tufte-book}
\usepackage[utf8]{inputenc}
\usepackage[basque]{babel}
\usepackage{graphics}

\begin{document}
\chapter{My problem with captions in Basque\&Babel}

In Basque, a language spoken in the north of Spain and the South of France, it is stated that the numbering of tables and figures must be done using ordinal numbers \textit{1. irudia} and \textit{1. taula}

\begin{figure}[ht]
%http://digital.uncg.edu/390/jennifer_hutchens/images/tufte.jpg
\includegraphics[scale=.5]{tufte.jpg}
\caption{\textit{The man.}}
\end{figure}

The caption of the tables should be exactly the same but\ldots

\begin{table}
 \small
 \centering
 \fontfamily{ppl}\selectfont
\begin{tabular}{lcr}
  \toprule
Akzio motor eremua & N &  \\
 \midrule
Kirol psikomotorrak & 115 & \%47\\
Kirol soziomotorrak & 130 & \%53 \\
  \midrule
\textit {Guztira}& \textit {245} & \textit {\%100} \\
  \bottomrule \bigskip
\end{tabular}

\caption{\textit{1984 urteko Joko Olinpikoetako kirolak.}}
\end{table}

Any ideas? Thank you all.

Raul MdSG.

\today. (9/28/2016)

\end{document}

这段代码运行结果如下:使用 Babel 的 Tufte-book 中的巴斯克语字幕

有什么想法吗?提前感谢大家。

RMdSG

答案1

标签格式由内部宏fnum@figure和控制fnum@table。您可以重新定义它们以打印“number. name”,方法如下

\makeatletter
\def\fnum@figure{\thefigure.\nobreakspace\figurename}
\makeatother

等等。由于您只希望将其用于一种特定语言,因此您应该在宏\def中包含\extras...该语言的行。

示例输出

\documentclass{tufte-book}

\usepackage[utf8]{inputenc}
\usepackage[main=basque]{babel}
\usepackage{graphicx}
\usepackage{booktabs}

\makeatletter
\addto\extrasbasque{%
  \def\fnum@figure{\thefigure.\nobreakspace\figurename}%
  \def\fnum@table{\thetable.\nobreakspace\tablename}%
}
\makeatother

\begin{document}

\chapter{My problem with captions in Basque \& Babel}

In Basque, a language spoken in the north of Spain and the South of 
France, it is stated that the numbering of tables and figures must be
done using ordinal numbers \textit{1. irudia} and \textit{1. taula}

\begin{figure}[ht]
\includegraphics[scale=.5]{example-image-a}
\caption{\textit{The man.}}
\end{figure}

The caption of the tables should be exactly the same but\ldots

\begin{table}
 \small
 \centering
 \fontfamily{ppl}\selectfont
\begin{tabular}{lcr}
  \toprule
Akzio motor eremua & N &  \\
 \midrule
Kirol psikomotorrak & 115 & \%47\\
Kirol soziomotorrak & 130 & \%53 \\
  \midrule
\textit {Guztira}& \textit {245} & \textit {\%100} \\
  \bottomrule \bigskip
\end{tabular}

\caption{\textit{1984 urteko Joko Olinpikoetako kirolak.}}
\end{table}

\end{document}

相关内容