programming-journal / programming

21 stars 15 forks source link

Inconsistent font between captions and references #7

Closed brosenan closed 7 years ago

brosenan commented 7 years ago

The digit 1 appears sometimes as a an Arabic numeral (1) and sometimes as a Roman numeral (I). This is especially a problem in some cases where the caption for an object uses one representation, and references to this object use the other representation. The images below are taken from a footnote in the example provided with this project. The reference to the footnote uses Arabic numerals: image and the caption in the footnote itself uses Roman numerals: image

In our paper, reference to Fig. 1 uses Roman numerals: image while the caption of that figure uses Arabic numerals: image

krono commented 7 years ago

Thanks for the information.

Please note that the seemingly roman numerals are, in fact, text figures. The sans-serif used for Figure captions is Fira Sans, which does not posses text figures:

bildschirmfoto 2017-01-17 um 19 41 04

The inconsistency between footnote definition and reference is indeed strange. Alas, I cannot reproduce this here.

PS: Please do not use 'Fig. 1' with the programming class. Either write Figure \ref{..} or better \autoref{...}

brosenan commented 7 years ago

We used:

Fig.~\ref{fig:A-Comparison-between}

in our source code

krono commented 7 years ago

Please use either

Figure~\ref{fig:A-Comparison-between}

or (preferred)

\autoref{fig:A-Comparison-between}
brosenan commented 7 years ago

The use of the XCharter OS font for numbers can be misleading. For example: image refers to: image but actually looks like it refers to figure 2 (II being Roman 2).

krono commented 7 years ago

I can understand that. However, if there is a figure 11, there has already been figures 1 and 2, and confusion is avoided. Also note that this would only look too similar if someone used small caps roman numerals:

bildschirmfoto 2017-01-18 um 10 30 31

dhlorenz commented 7 years ago

Note that \autoref{fig:A-Comparison-between} produces "figure~"... instead of "Figure~"''... because \figureautorefname}{figure}. You may want to fix that in programming.cls

krono commented 7 years ago

Yea, I that was a slip above.

"figure .." (lowercase) is the preferred spelling. (as is "table" and "listing")

dhlorenz commented 7 years ago

Chicago vs. APA style... What about Sect. vs Section vs section? BTW, when referring to a Figure in the text, the word "Figure" is usually abbreviated as "Fig.", while "Table" is not abbreviated. Both words are spelled out completely in descriptive legends.

krono commented 7 years ago

Here's the relevant part:

\defcaptionname{english}{\figureautorefname}{figure}
\defcaptionname{english}{\tableautorefname}{table}
\defcaptionname{english}{\lstlistingautorefname}{listing}
\defcaptionname{english}{\lstnumberautorefname}{line}
\defcaptionname{english}{\subsectionautorefname}{\sectionautorefname}
\defcaptionname{english}{\subsubsectionautorefname}{\sectionautorefname}

Since \sectionautorefname is “section”, both subsections and subsubsections also use this term.

In short: All reference names are lowercase and spelled out.

brosenan commented 7 years ago

We moved to using \autoref, but we see the following issues:

dhlorenz commented 7 years ago

Problem alleviated by using \usepackage[noabbrev]{cleveref}, which provides \cref and \Cref as alternatives to \autoref

krono commented 7 years ago

Again, thanks for the feedback.