Text FormattingFormatting headings

Information and discussion about LaTeX's general text formatting features (e.g. bold, italic, enumerations, ...)
Post Reply
mtnbkr
Posts: 14
Joined: Wed Dec 24, 2008 1:48 am

Formatting headings

Post by mtnbkr »

I have to write a proposal with a certain format that is given in a word template. Thankfully we just submit a pdf, so we can actually use whatever we like, as long as the formatting is the same as the word template. The "styles" are defined as follows:
  • Proposal Title: (Style “Proposal Title”) Arial, size 14, bold.

    Section Headers: (Style “Section Header") Arial, size 14, bold, 12 point space before, 3 point space after.

    Subsection Headers: (Style “Subsection Header”) Arial, size 12, bold & italic.

    Section Text & Subsection Text: (Style “Normal Text”) Times New Roman, size 12, single-spaced lines, 6-point before and after paragraphs.

    Header: Arial, size 8, left justified. Footer: Arial, size 8, left justified, page number right justified.
The only parts that I am having difficulty with are the SECTION and SUBSECTION HEADERS ... note they actually mean headings (like \section and \subsection), not headers as in page headers. I am using the helvetica font in place of Arial, which shouldn't be a problem (or even noticeable), but I can't seem to make the Helvetica headings either bold or slanted/italic, much less both.

Any ideas?

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Formatting headings

Post by localghost »

I gave you some hints in the other topic you opened concerning type faces [1]. Another idea in this context could be to use the wordlike package in combination with titlesec.

[1] View topic: need bold & slanted Arial fonts


Best regards
Thorsten¹
mtnbkr
Posts: 14
Joined: Wed Dec 24, 2008 1:48 am

Formatting headings

Post by mtnbkr »

Thanks for addressing this. It is a slightly different question from my other post, so I will ask more about the headings aspect here.

Notice in the above headings definitions there is a couple of slight differences between the subsection and section headings, namely:
  • 1) subsection is bold and slanted, section is just bold;
    2) The font size (12pt vs. 14pt); and
    3) the spacing above and below.


I've got the spacing figured out, I think. But the other two I don't seem to be able to change the way I want them. I've altered your code and put it below.

Code: Select all

\documentclass[11pt,letterpaper,english]{article}
\usepackage[T1]{fontenc}
\usepackage[latin1]{inputenc}
\usepackage{babel}
\usepackage{txfonts}
\usepackage[raggedright,bf,sf]{titlesec}
\usepackage{blindtext}

\parindent0em

%  ----- Change format of subsection to be slanted, bold, sans serif -----
%\titleformat*{command}{format}
%\titleformat*{\subsection}{\sl}   % attempt 1 ... gives sl but back in serif
%\titleformat*{\subsection}{\sf,\bf,\sl} % attempt 2 ... gives error
%  --- try the non-* format command ---
%\titleformat{command}[shape]{format}{label}{sep}{before}[after]
%\titleformat{\subsection}[\sl]{}        % attempt 3 ... gives error
%\titleformat{\subsection}[sl]{}         % attempt 4 ... gives error

%  ----- Change spacing above and below the headings -----
%\titlespacing*{command}{left}{beforesep}{aftersep}[right]
\titlespacing*{\section}{0pt}{6pt}{3pt}
\titlespacing*{\subsection}{0pt}{6pt}{6pt}

%  ----- Change fontsizes of headings -----
% need to change \section to 14pt
% need to change \subsection to 12pt

\begin{document}
  \Blinddocument
\end{document}
It should typeset as is (the offending commands have been commented out). What is it that I'm doing wrong? I've tried to follow the documentation for titlesec, but I'm not having any luck. I don't even see how to explicitly specify the fontsize to be 12 or 14 pt.

Thanks,

TJ
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Formatting headings

Post by localghost »

Take a look at lshort to learn more about switching between different families, series and shapes of fonts.
mtnbkr
Posts: 14
Joined: Wed Dec 24, 2008 1:48 am

Re: Formatting headings

Post by mtnbkr »

I'll try that and see if that helps.

Thanks
Post Reply