7

I'm writing my thesis paper in French. In the document I use the name of the ISO27001:2005 norm name, and by babel conventions this is rewritten as ISO27001 :2005 with a extra space before the semicolon.

The behaviour is expected in all the document but not when I write this name.

What is the best way to tell the engine to ignore default formatting rules and write the : without extra space?

M'vy
  • 402

3 Answers3

11
\documentclass{article}
\usepackage[french]{babel}
\usepackage[ansinew]{inputenc}
\usepackage[T1]{fontenc}

\newcommand\ISO{ISO27001:2005}
\begin{document}
ISO27001:2005

ISO27001\string:2005

{\NoAutoSpacing ISO27001:2005} %needs frenchb.ldf version 2.5f

{\shorthandoff{:}ISO27001:2005} 

\ISO
\end{document}
Ulrike Fischer
  • 327,261
6

You can use \shorthandoff{:} before the code and \shorthandon{:} after

Alain Matthes
  • 95,075
3

The user guide for babel provides the following recommendation for locally suppressing the extra space that's inserted (when the frenchb option has been set) before :, ;, !, and ?: Insert the instruction \string immediately before the respective characters.

The following MWE shows how this works:

\documentclass{article}
\usepackage[frenchb]{babel}
\begin{document}
ISO27001:2005

ISO27001\string:2005
\end{document}
Mico
  • 506,678