1

I am using the apa6 document class for a thesis and need changes for the section format: \section: centered, normalfont (no bf), and control for line-spacing, \subsection: instead of left aligned I need it centered, and control for line-spacing \subsubsection: instead of in-line with paragraph I need it in the default format of \subsection: left aligned and bold

I tried the following, but this doesn't work:

\documentclass{apa6}
\usepackage{lipsum}
\usepackage{etoolbox}
\patchcmd{\subsection}% <cmd>
  {\raggedright}% <search>
  {\centering}% <replace>
  {}{}% <success><failure>

\begin{document}
\subsection{A section}
\lipsum[1-2]
\end{document}

Reference

I also tried the titelsec package, but it conflicts with the APA6 class.

1
  • Welcome to TeX.SE...Can you post your code in a compilable format?
    – MadyYuvi
    Nov 6 '19 at 5:42
0

In apa6 class file, \subsection definition doesn't contain the tag \raggedright, hence your tag doesn't work in a proper manner, please find the \bfseries tag in \subsubsection in apa6, then change it into \centering\bfseries, and the MWE is:

\documentclass{apa6}
\usepackage{lipsum}
\usepackage{etoolbox}
\patchcmd{\subsection}% <cmd>
  {\bfseries}% <search>
  {\centering\bfseries}% <replace>
  {}{}% <success><failure>

\begin{document}
\subsection{A section}
\lipsum[1-2]
\end{document}

OUTPUT

enter image description here

14
  • 1
    Thank you very much!. Shortly after I posted I found two other solutions: Solution 1 tex.stackexchange.com/questions/125537/… Solution 2 tex.stackexchange.com/questions/195441/…
    – togedo
    Nov 6 '19 at 7:01
  • @togedo No issues, all our ultimate aim is the problem should resolve....
    – MadyYuvi
    Nov 6 '19 at 7:12
  • :-) Perhaps you can help me with this one: \makeatletter \e@level@one@skip=1\baselineskip \@plus .2ex \e@level@two@skip=1\baselineskip \@plus 0.2ex \makeatother --- how can I define normalfont? for level one. That's all I need for getting 3 levels formatted then
    – togedo
    Nov 6 '19 at 7:14
  • 1
    Thanks again Mady, this works for me: pastebin.com/CPfJhygi
    – togedo
    Nov 6 '19 at 7:38
  • 1
    that works!! Thank you again!! I wrote something like this, but used instead of \bfseries and \itshape textbf and textit which does not work.
    – togedo
    Nov 7 '19 at 15:49

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.