[Tex/LaTex] Centre aligning letter SUBJECT using newflm class

letters

I am using newflm class to prepare a letter. The class, surprisingly, does not provide a Subject field. Stealing idea from this thread, I somehow managed to insert a subject, though it was not at all a nice hack. But how to centre-align the subject now? Is there any solution without editing the class file itself? Below is an MWE.

\documentclass[10pt,stdletter,addrfromleft]{newlfm}
\usepackage{charter,epstopdf}

\widowpenalty=1000
\clubpenalty=1000

\newlfmP{headermarginskip=20pt}
\newlfmP{sigsize=10pt}
\newlfmP{dateskipafter=20pt}
\newlfmP{addrfromphone}
\newlfmP{addrfromemail}
\PhrPhone{PHONE}
\PhrEmail{EMAIL}
\PhrRegard{SUBJECT}

\namefrom{FROM\_PERSON}

\addrfrom{FROM\_ADDRESS}

\regarding{CENTER\_ALIGN\_SUBJECT\_HERE}

\addrto{TO\_ADDRESS}

\greetto{GREETINGS,}
\closeline{CLOSING}

\begin{document}
\begin{newlfm}


LETTER\_BODY\_HERE

\end{newlfm}
\end{document}

It produces a letter like this.

enter image description here

Best Answer

If you prefer not to redefine macros set in the class, you could simply do

 \regarding{{\centering CENTER\_ALIGN\_SUBJECT\_HERE \\}}

Otherwise you could patch the \regarding macro:

\makeatletter
\def\regarding#1{\setboolean{@pt@regard}{true}\protect\def\@regard@line{{\centering #1\\}}}%
\makeatother

in your preamble.

The extra group {} around the subject limits the effect of \centering to that portion of the text and \\ explicitly terminates the line inside the group, which is necessary because \centering modifies the behaviour of \\ so that the right spacing is generated at the end of the line to center it.