2

As shown by the following MWE, some frenchb switches (e.g. \FBFrenchFootnotestrue) are taken in account in (babel's) \iflanguage conditional, but not all of them (e.g. \FBStandardItemLabelsfalse): the latter are taken in account only if directly inserted in the document body.

\documentclass[french,english]{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{babel}
\begin{document}
%
\newcommand{\test}[1][english]{%
  \selectlanguage{#1}
  \iflanguage{french}{
    \section{French}
    \FBStandardItemLabelsfalse%
    \FBFrenchFootnotestrue%
  }{
    \section{English}
    \FBStandardItemLabelstrue%
    \FBFrenchFootnotesfalse%
  }%
  Foo\footnote{Bar}.%
  \begin{itemize}
  \item Foo
  \item Bar
  \end{itemize}
}
%
\test
\test[french]
\test
\FBStandardItemLabelsfalse%
\test[french]
\end{document}

Do you know why and how to enforce all those switches to be taken in account in \iflanguage conditional?

2
  • My impression is that the conditional for “standard labels” has been kept out on purpose: lists should be uniform across a document, either French or “non French” style.
    – egreg
    Dec 2, 2015 at 23:16
  • Indeed, frenchb's doc claims "When French is not babel’s main language, frenchb does not alter the general layout of the document (even in parts where French is the current language): the layout of lists, footnotes, indentation of first paragraphs of sections are not customized by frenchb." (see page 2). But (1) by applying the switches of my MWE (okay, not mentioned in the user's doc), lists are not changed but footnotes are; (2) for separate articles gathered in a single document, each with its own language, I'd like them to be typeset with their corresponding layout. Dec 3, 2015 at 6:20

1 Answer 1

1

You can explicitly ask for the lists layouts to be updated to those specified by current switches by issuing

\update@frenchlists

This works either insider or outside the \iflanguage. As the macro name contains the internal @ character you will have enclose code using it with \makeatletter...\makeother

Sample output

\documentclass[french,english]{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{babel}

\makeatletter
\newcommand{\test}[1][english]{%
  \selectlanguage{#1}
  \iflanguage{french}{%
    \section{French}
    \FBStandardItemLabelsfalse
    \FBFrenchFootnotestrue
  }{%
    \section{English}
    \FBStandardItemLabelstrue
    \FBFrenchFootnotesfalse
  }%
  \update@frenchlists
  Foo\footnote{Bar}.
  \begin{itemize}
  \item Foo
  \item Bar
  \end{itemize}
}
\makeatother

\begin{document}

\test
\test[french]
\test
\test[french]

\end{document}

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .