# missing section dot?

\documentclass[a4paper,12pt]{article}
%twoside yaz iki taraflı için
\usepackage[top=2.5 cm, bottom=2.5 cm, left=4 cm, right=2.5 cm]{geometry}

\usepackage[turkish,shorthands=:!]{babel}
\usepackage{fontspec}
\usepackage{titlesec}

\setmainfont{Times New Roman}
\setsansfont{Times New Roman}
\titleformat{\section}
{\normalfont\fontsize{12}{15}\bfseries}
{\thesection}
{1em}
{}
\begin{document}
\section{sec1}
test
\subsection{subsec2}
test
\end{document}


There must be a dot after section number with \titlelabel{\thetitle.\quad} but not. What's the problem?

• Why not use just \titleformat{\section} {\normalfont\fontsize{12}{15}\bfseries} {\thesection.\quad} {1em} {}? – Phelype Oleinik Jul 5 '18 at 18:02
• I tried but didn't work. – ömer koçhan Jul 5 '18 at 18:13
• You want it like this: i.stack.imgur.com/ZoEYX.png ? I just added .\quad after \thesection... – Phelype Oleinik Jul 5 '18 at 18:15
• It work but there is unnecessary space between number and section and in ToC there isn't any section dot. – ömer koçhan Jul 5 '18 at 18:20

I think you want it like this:

The unnecessary space you said in the comments is because the fourth mandatory argument to \titleformat is the spacing, which you already had set to 1em, so adding a \quad doubled it.

To add the dot after the number in the ToC you can redefine \numberline:

\let\LTXnumberline\numberline
\def\numberline#1{\LTXnumberline{#1.}}


this is a low level trick that works with the standard classes. But it will probably not work if you use another class or some ToC styling package.

\documentclass[a4paper,12pt]{article}
%twoside yaz iki taraflı için
\usepackage[top=2.5 cm, bottom=2.5 cm, left=4 cm, right=2.5 cm]{geometry}

\usepackage[turkish,shorthands=:!]{babel}
\usepackage{fontspec}
\usepackage{titlesec}

\setmainfont{Times New Roman}
\setsansfont{Times New Roman}
\let\LTXnumberline\numberline
\def\numberline#1{\LTXnumberline{#1.}}