[Tex/LaTex] Appendix title changing in article class

appendices

I have genuinely been searching for about 20-30 minutes with no luck to achieving what I want. It's very simple.

I'm using article class, and I want to it so that the title of my appendix goes

Appendix A: {Insert Title}

Right now I'm using

 \documentclass[a4,12pt]{article}
 \usepackage[titletoc,toc,title]{appendix}
 \begin{document}

 <main body of text>

 \begin{appendices}
 \section{Magnetic flux tubes}
 Bunch of text
 \end{appendices}

But I keep getting as my appendix title.

A. Magnetic flux tubes.

How do I get it to say Appendix A: Magnetic flux tubes.

Also ideally I would like to alter the size of the appendix title.

EDIT: My problems is that I have this in my file preamble

\usepackage{titlesec}
\usepackage{secdot}\sectiondot{subsection}\sectiondot{subsubsection}


%\renewcommand{\thesubsection}{\normalfont\arabic{section}.\arabic{subsection}}
\titleformat{\section}{\bf}{\thesection .}{0.5em}{}
\titleformat{\subsection}{\normalfont \it}{\thesubsection .}{0.5em}{}
\titleformat{\subsubsection}{\normalfont \it}{\thesubsubsection .}{0.6em}{}

I'm using this to get the document titles to look how I want, but unfortunately these new commands feed over to the appendix section. Is there anyway to undo the titleformat just for the appendices?

Best Answer

You can use \titleformat again just before the appendices to give the desired formatting:

\documentclass{article}
\usepackage{titlesec}
\usepackage[titletoc,toc,title]{appendix}

\titleformat{\section}{\bfseries}{\thesection.}{0.5em}{}
\titleformat{\subsection}{\normalfont\itshape}{\thesubsection.}{0.5em}{}
\titleformat{\subsubsection}{\normalfont\itshape}{\thesubsubsection.}{0.6em}{}

\begin{document}

\section{A regular section}

\titleformat{\section}{\large\bfseries}{\appendixname~\thesection .}{0.5em}{}
\begin{appendices}
\section{Magnetic flux tubes}
Bunch of text
\end{appendices}

\end{document}

enter image description here

To recover the original formatting for sections, but adding the word "Appendix" and the dot after the number you'll need

\titleformat{\section}{\normalfont\Large\bfseries}{\appendixname~\thesection.}{1em}{}

Two letter font commands (\it, \bf and similar) are old TeX commands which shouldn't be used anymore in modern LaTeX documents; use \itshape, \bfseries instead.