I think something along these lines can be achieved with the titlesec package (and no doubt others too!). I find it voodoo-ish (and, for a person like me, I could do with more examples in the documentation), but this seems to work:
For the section
\newcommand{\titlebox}[1]{%
\parbox[t]{2.5cm}{\raggedright #1}}
\titleformat{\section}
[leftmargin]% type is "marginal"
{\bfseries}% format
{}% no label used
{0pt}% no need for any separation
{\titlebox}% command to set title
\titlespacing{\section}
{3cm}% width of marginal
{*1}% space before
{*0}% and after
We define \titlebox{}
simply as a convenient way of having a single argument macro that will typeset the material in an appropriate box, ragged right. The key (I think) is the first argument in \titlespacing
which controls the width of the marginal. (I have assumed that an extra 3 cm is added to the margin to allow for titles -- in the example I've set a 5cm left margin and a 2cm right margin.)
For the chapter title, we use a slightly different method to get it to hang appropriately into the left margin, but I think that's obvious from the example that follows.
\documentclass{report}
\usepackage[left=5cm,right=2cm,bottom=2cm,top=1cm,includeheadfoot]{geometry}
\usepackage{titlesec}
\newcommand{\titlebox}[1]{%
\parbox[t]{2.5cm}{\raggedright #1}}
\titleformat{\section}
[leftmargin]
{\bfseries}
{}
{0pt}
{\titlebox}
\titleformat{\chapter}
[hang]
{\bfseries\Large}
{}
{0pt}
{}
[{\titlerule[1pt]}]
\titlespacing{\section}
{3cm}
{*1}
{*0}
\titlespacing{\chapter}
{-3cm}
{*2}
{*2}
\setlength{\parindent}{0pt}
\setlength{\parskip}{1ex}
\begin{document}
\chapter{Chapter Heading}
\section{Summary of Work}
The object of this report is to show how one can produce marginal section headings, in this fashion. Similar things could and would need to be done for subsections and the like.
\section{Date}
May 10, 2013, London.
\section{Author}
Paul Stanley.
\end{document}
The end result:
![Revised titles](https://i.stack.imgur.com/fQm2o.png)
Please note that I have manually set \parskip
only for demonstration purposes: for a real document you might well want to use a package for such things.
This worked well for me (after figuring out the percentage of textwidth and textheight for parbox / minipage):
\begin{frame}
\frametitle{TOC}
\hfill
\parbox[t]{.95\textwidth}{
\begin{minipage}[c][0.75\textheight]{\textwidth}
\tableofcontents
\end{minipage}
}
\end{frame}
Best Answer
This implementation with the
tabto
package will work with certain limitations. Primarily, when\marginsymbol
appears in any sectioning macro argument, it must be the last item in the argument. Second, if you are using a table of contents, or a chapter page-heading, you will need to use the optional argument of the sectioning macro to exclude the margin mark.FOLLOW UP:
The OP asks if it can be done for the table of contents, as well. Here is a way, but it does not address the issue of chapter-page headings that I cited above. So, for the
article
class, where that is not a direct issue, I provide a revised version of\marginsymbol[<length>]
with an optional length argument that is only applied in the toc as an added leftward offset, in order to handle the staggered entries of toc subcategories.