0

I am using the article class (and I have to). How could I use the command \section{<heading>} in such a way to produce the specific configuration as seen in the attached figure below?

\documentclass{article}

\begin{document}

\section{Introduction}

In this section, we resolve the world's all problems.

\section{Conclusion}

We resolved all the current problems of the world.

\end{document}

enter image description here

2
  • Welcome to TeX.SE!
    – Mensch
    Nov 25 '21 at 12:24
  • @Mensch Thank you Nov 25 '21 at 12:27
2

Easy with titlesec:

\documentclass{article}
\usepackage{titlesec}
\titleformat{\section}[display]{\sffamily\filleft}{\MakeUppercase{section}~\thesection}{1ex}{\MakeUppercase}

\begin{document}
\sffamily
\section{Introduction}

In this section, we resolve the world's all problems.

\section{Conclusion}

We indeed resolved all the current problems of the world.

\end{document}

enter image description here

1
  • yes, that's it, thank you a lot. Nov 25 '21 at 13:45
0

\begin{flushright} and \end{flushright} aligns text to the right margin.

\documentclass{article}

\makeatletter
\renewcommand{\@seccntformat}[1]{\csname the#1\endcsname}
\makeatother

\renewcommand{\thesection}{Section \arabic{section}}

\begin{document}

\begin{flushright}
\section{\break Introduction}
\end{flushright}

In this section, we resolve the world's all problems.

\begin{flushright}
\section{\break Conclusion}
\end{flushright}

We resolved all the current problems of the world.

\end{document}

enter image description here

4
  • Try to renew the \section command to output the text.
    – Jaap
    Nov 25 '21 at 13:19
  • I've used the renew command in the second line of my answer.
    – Jaap
    Nov 25 '21 at 13:27
  • I've aligned 'section 1' to the right.
    – Jaap
    Nov 25 '21 at 13:44
  • Thank you, it now works well. Nov 25 '21 at 13: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.