3

How to remove an ending period in sections, subsections, ... numbering?

\documentclass[12pt]{article}

\usepackage{fontspec}
\usepackage{polyglossia}

\setdefaultlanguage{russian}
\setmainfont[Mapping=tex-text]{Times New Roman}

\begin{document}
\section{Section}
\section{Section}
\section{Section}
\section{Section}
\end{document}
  • 2
    These settings are typically set up by the document class. Can you provide us with a minimal working example (MWE) that highlights your problem? – Werner Mar 28 '14 at 17:47
  • The current MWE does not display the problem on my system. (edit: unless you mean the period after the number?: i.stack.imgur.com/Fr9DQ.png) – Sean Allred Mar 28 '14 at 17:55
  • Exactly I mean ending period in numbering, not after titles. – user14416 Mar 28 '14 at 17:58
  • It is definitely something set by \setdefaultlanguage{russion}. This can be overridden with titlesec or similar; you can probably adapt tex.stackexchange.com/a/137194/17423 – Sean Allred Mar 28 '14 at 18:02
2

Without \setdefaultlanguage{russian} your example doesn't have these periods, so it is something set up by especially for Russian. I don't find an option to turn that off, but you can turn the special handling off "manually" with

\makeatletter
\def\russian@capsformat{}
\makeatother

in the preamble.

  • 1
    It should probably be a feature request for Polyglossia. – egreg Mar 28 '14 at 18:09
  • @pst Yeah, I know I don't have such problems with English documents. Perfect, thank you. – user14416 Mar 28 '14 at 18:42
5

Although pst's solution removes the ending periods, it also changes the formatting of titles used by the Russian language.

If you want to keep the default spacing defined for Russian, you'd better add these lines in your preamble, so only the period is removed, but not the correct spacing.

\AtBeginDocument{%
  \def\postchapter{\hspace{0.5em}}%
  \def\postsection{\hspace{0.5em}}%
  \def\postsubsection{\hspace{0.5em}}%
  \def\postsubsubsection{\hspace{0.5em}}%
  \def\postparagraph{\hspace{0.5em}}%
  \def\postsubparagraph{\hspace{0.5em}}%
}

MWE:

\documentclass[12pt]{article}

\usepackage{fontspec}
\usepackage{polyglossia}

\setdefaultlanguage{russian}
\setmainfont[Mapping=tex-text]{Times New Roman}

\AtBeginDocument{%
  \def\postchapter{\hspace{0.5em}}%
  \def\postsection{\hspace{0.5em}}%
  \def\postsubsection{\hspace{0.5em}}%
  \def\postsubsubsection{\hspace{0.5em}}%
  \def\postparagraph{\hspace{0.5em}}%
  \def\postsubparagraph{\hspace{0.5em}}%
}

\begin{document}
\section{Section}
\subsection{Subsection}
\subsubsection{Subsubsection}
\end{document} 

Output:

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.