I'm new to LATEX language and now a have a problem with section and subsection numbering. I want to make my text look like this:
1. Sun
1.1 Moon
2. Bed
I was tried to figure out how to make it, but it doesn't work for me. This is my code:
\documentclass[12pt,a4paper,oneside]{article}
\usepackage{titlesec}
\titleformat{\section}[block]{\Large\bfseries\filcenter}{}{1em}{}
\titleformat{\subsection}[hang]{\bfseries\filcenter}{}{1em}{}
\renewcommand{\thesection}{\arabic{section}}
\begin{document}
\section{Sun}
\subsection{Moon}
\section{Bed}
\end{document}