## LaTeX forum ⇒ Text Formatting ⇒ Custom Section/Paragraph/Text Styles

Information and discussion about LaTeX's general text formatting features (e.g. bold, italic, enumerations, ...)
jgrauman
Posts: 3
Joined: Tue Mar 12, 2019 7:22 pm

### Custom Section/Paragraph/Text Styles

Hello all,

Background: I used LaTeX around 18 years ago to write my Master's Thesis, and not since then except one project a long time ago. I wasn't sure whether my question should be posted here, or in XeTeX since I need to use .otf fonts, but the question is mainly about formatting...

I would like to figure out how to significantly alter all the Section, Subsection, Subsubsection and Paragraph titles, as well as the actual paragraph text which is under each title. I want it to look like the following pdf:

http://grauman.com/sample.pdf

So the short question is: how can I use xelatex to generate something very similar to that pdf?

I imagine the .tex would look something like the following, but then I would redefine \section, \subsection, \subsubsection, \paragraph and add new attributes for sectiontext, subsectiontext, subsubsectiontext, paragraphtext. For each of these 8 parts of the document, I would like to be able to change: font, font size, bold, italic, underline, margins left, right, before, and after, and indent.

\section{Section Title} \begin{sectiontext}Section paragraph text.\end{sectiontext} \subsection{Subsection Title} \begin{subsectiontext}Subsection paragraph text.\end{subsectiontext} \subsection{Subsubsection Title} \begin{subsubsectiontext}Subsubsection paragraph text.\end{subsubsectiontext} \begin{paragraphtext}Subsubsection paragraph text.\end{paragraphtext}

I tried redefining section, et al using \renewcommand and changing the font, italics, bold, etc. in the new commands. But I couldn't even get it to change the font or italics, much less all the spacing around the titles, etc.


Sorry for the long question. I have been working piece by piece trying to figure everything out, but I've been at it for a couple days and feel like I haven't gotten anywhere, so I thought if someone can point me in the right direction, maybe I'm going about it all wrong. Thanks!

Johannes_B
Site Moderator
Posts: 3966
Joined: Thu Nov 01, 2012 4:08 pm
What documentclass are you using? Usually, there are no environments for the text in LaTeX (but it is common with ConTeXt).
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.

jgrauman
Posts: 3
Joined: Tue Mar 12, 2019 7:22 pm
I was using \documentclass[12pt,letterpaper]{article}

Thanks.

jgrauman
Posts: 3
Joined: Tue Mar 12, 2019 7:22 pm
Oh, and yes, I know it isn't common to put the regular text in an environment, but I need to have the text under each title formatted differently, so I was assuming that would be how to do that...