I want to somehow align section headings: unnumbered should be centerized; numbered should be aligned left and indented. I'm just trying to compile an example
\documentclass[12pt,a4paper,oneside]{article}
\usepackage[left=35mm,right=15mm,top=2cm,bottom=2cm,bindingoffset=0cm]{geometry}
\usepackage[utf8x]{inputenc}
\usepackage[russian]{babel}
\usepackage{cmap}
\usepackage{makeidx}
\makeindex
\usepackage{indentfirst}
\setlength{\parindent}{1.25cm}
\usepackage{setspace}
\onehalfspacing
\usepackage{titlesec}
\titleformat{\section*}{\normalfont\Large\bfseries\justifyheading}{\thesection}{1em}{}
\begin{document}
\section*{РЕФЕРАТ}
\end{document}
But I'm getting
! Missing \endcsname inserted.
! LaTeX Error: Missing \begin{document}.
! Extra \endcsname.
! Argument of \ttl@assign@i has an extra }.
! Paragraph ended before \ttl@assign@i was complete.
! Package keyval Error: \let \reserved@d =*\def \par .
! Missing \endcsname inserted.
! Missing number, treated as zero.
! Illegal unit of measure (pt inserted).
! Undefined control sequence.
! Missing number, treated as zero.
! Illegal unit of measure (pt inserted).
! Extra \endcsname.
! Undefined control sequence.
! Too many }'s.
! LaTeX Error: Command \CYRA unavailable in encoding OT1.
And - yes - is there a way to ONLY align sections not redefining a whole style? Should I use \newcommand
instead and insert it in EVERY section?
\section*
title and make an indentation for\section
title.