I'd used the technique from memman §6.6 to put my section headings in
the left margin, and now I'd like to put some explanatory text beneath.
A (slightly long) minimal document illustrating what I'm aiming at is
below:
\documentclass[article]{memoir}
\newcommand{\marginbox}[1]{%
\parbox[t][0pt]{1.5 in}{\scshape\raggedleft\mbox{} #1}}
\newcommand{\marginhead}[1]{{\llap{\marginbox{#1}\kern 1 em}}}
\setsecindent{0em}\setaftersecskip{0em}\setsecnumformat{}
\setsecheadstyle{\marginhead}
\setlength{\parindent}{0 pt}\setlength{\parskip}{1 em}
\setmarginnotes{0.4 in}{1 in}{1 em}
\marginparmargin{left}
\newcommand{\mnote}[1]{\marginpar{\raggedleft\small\itshape#1}}
\begin{document}
\section{The Cooper Union}
\marginpar{}\marginpar{}\marginpar{}\marginpar{} % YUCK!!!!
\mnote{MEE, May 2011 (expected)}
\mnote{BEE, May 2007}
\mnote{S*ProCom\textsuperscript{2} Research Center}
\mnote{\& so on \& so forth}
Professor Foo Bar (Thesis Advisor)\\
(212) 555-0000
Professor Bas Quux (Electrical\\
Engineering Department Chair)\\
(212) 555-0001 quux @ cooper . edu
Professor Cal Culus (Math Department)\\
(212) 555-0002 culus @ cooper . edu
\end{document}
Is there a cleaner way to start the margin notes below the section
heading than the line of \marginpar{} that I've used?
--Joel
hmm, on might get away by using a very large strut
\documentclass[article]{memoir}
\newcommand{\marginbox}[1]{%
\parbox[t][0pt]{1.5 in}{\scshape\raggedleft\mbox{} #1}}
\newcommand{\marginhead}[1]{{\llap{\marginbox{#1}\kern 1 em}}}
\setsecindent{0em}\setaftersecskip{0em}\setsecnumformat{}
\setsecheadstyle{\marginhead}
\setlength{\parindent}{0 pt}\setlength{\parskip}{1 em}
\setmarginnotes{0.4in}{1in}{1em}
\marginparmargin{left}
\usepackage{etoolbox}
\newtoggle{first}
\newcommand{\mnote}[1]{\marginpar{%
\raggedleft\small\itshape
\iftoggle{first}{}{\global\toggletrue{first}\rule{0pt}{14mm}}%
#1}}
\begin{document}
\section{The Cooper Union}
%\marginpar{}\marginpar{}\marginpar{}\marginpar{} % YUCK!!!!
\mnote{MEE, May 2011 (expected)}
\mnote{BEE, May 2007}
\mnote{S*ProCom\textsuperscript{2} Research Center}
\mnote{\& so on \& so forth}
Professor Foo Bar (Thesis Advisor)\\
(212) 555-0000
Professor Bas Quux (Electrical\\
Engineering Department Chair)\\
(212) 555-0001 quux @ cooper . edu
Professor Cal Culus (Math Department)\\
(212) 555-0002 culus @ cooper . edu
\end{document}
but I have no idea why the spacing below the first marginpar is now gone
--
/daleif (remove RTFSIGNATURE from email address)
LaTeX FAQ: http://www.tex.ac.uk/faq
LaTeX book: http://www.imf.au.dk/system/latex/bog/ (in Danish)
Remember to post minimal examples, see URL below
http://www.tex.ac.uk/cgi-bin/texfaq2html?label=minxampl
http://www.minimalbeispiel.de/mini-en.html
hmm, one will need something like
\hspace{0pt}%
\mnote{MEE, May 2011}% (expected)}
\mnote{BEE, May 2007}%
\mnote{S*ProCom\textsuperscript{2} Research Center}%
\mnote{\& so on \& so forth}%
Professor Foo Bar (Thesis Advisor)\\
(212) 555-0000
and there is still some forgotten space in front of Professor
ahh, the space is gone wit the latest memoir
(I haven't upgraded my global system yet)
The trouble is that I have multiple \section{} lines, one for each place
I've worked, and the notes get messed up again. I tried playing with
\setsechook as below, but it fails when the \section heading can have
different heights.
I suspect the best way to achieve what I want is to do all tweaking in
the \section command; but I can't figure out how.
--Joel Salomon
% !TEX TS-program = pdflatex
\documentclass[article]{memoir}
\newcommand{\marginbox}[1]{%
\parbox[t][0pt]{1.5 in}{\scshape\raggedleft\mbox{} #1}}
\newcommand{\marginhead}[1]{{\llap{\marginbox{#1}\kern 1 em}}}
\setsecindent{0em}\setaftersecskip{0em}\setsecnumformat{}
\setsecheadstyle{\marginhead}
\setlength{\parindent}{0 pt}\setlength{\parskip}{1 em}
\setmarginnotes{0.4 in}{1 in}{1 em}
\marginparmargin{left}
%\newcommand{\mnote}[1]{\marginpar{\raggedleft\small\itshape#1}}
\usepackage{etoolbox}
\newtoggle{first}
\newcommand{\mnote}[1]{\marginpar{%
\raggedleft\small\itshape%
\iftoggle{first}{}{\global\toggletrue{first}\rule{0pt}{14mm}}%
#1}}
%\setsechook{\global\togglefalse{first}}
\begin{document}
\section{The Cooper Union}
%\marginpar{}\marginpar{}\marginpar{}\marginpar{} % YUCK!!!!
\mnote{MEE, May 2011 (expected)}
\mnote{BEE, May 2007}
\mnote{S*ProCom\textsuperscript{2} Research Center}
\mnote{\& so on \& so forth}
Professor Foo Bar (Thesis Advisor)\\
(212) 555-0000
Professor Bas Quux (Electrical\\
Engineering Department Chair)\\
(212) 555-0001 quux @ cooper . edu
Professor Cal Culus (Math Department)\\
(212) 555-0002 culus @ cooper . edu
\section{Some Other Workplace}
\mnote{Internship, Summer 2007}
Sam Fellow (Mentor)\\
(212) 555-1000 fellow @ workplace . com
\end{document}
did you note the \hspace{0pt} I added?
I did; I just don't see where it fits. I've added it after
\section{...} commands, within the \section{...} commands, in
\setsechook, inside \marginpar{...}, and I'm not ever getting the result
I'm trying for, which would look something like this:
THE COOPER UNION Professor Foo Bar (Thesis Advisor)
(212) 555-0000
MEE, May 2011
(expected) Professor Bas Quux (Electrical
Engineering Department Chair)
BEE, May 2007 (212) 555-0001 quux @ cooper . edu
S*ProCom2 Professor Cal Culus (Math Department)
Research Center (212) 555-0002 culus @ cooper . edu
& so on & so Professor Cal Culator (CS Department)
forth (212) 555-0003 culator @ cooper . edu
SOME WORKPLACE Sam Fellow, P.E. (Mentor)
(212) 555-1000 fellow @ workplace . com
Internship,
Summer 2007
SOME OTHER Guy Noir (Mentor)
WORKPLACE (212) 555-2000 noir @ other . com
Internship, Eric J. Hartigan (Co-Mentor)
Summer 2007 (212) 555-2000 hart @ other . com
(etc., etc.)
(Ignoring the marginal notes, this is the format of my resume.)
I tried making the \rule visible by giving it 1 pt of width, and it
seems to be all over the place.
Below is my current best effort, including the \hspace, and with enough
references to show some real oddities in the formatting. One fun thing
to try is to comment out the hspace; then the space between the first &
second notes disappears. Commenting out the head changes other spacings.
I can't help but think the solution lies in the interplay between \llap
(or, less likely, \parbox) and \marginpar; that somehow each \section
command should be able to signal the \marginpar mechanism, "here you may
start and no higher on the page."
Current code below signature. Note that I've inverted the logic for
"first" so that it actually applies to the "first" note.
--Joel
% !TEX TS-program = pdflatex
\documentclass[article]{memoir}
\newcommand{\marginbox}[1]{%
\parbox[t][0pt]{1.5 in}{\scshape\raggedleft\mbox{} #1}}
\newcommand{\marginhead}[1]{{\llap{\marginbox{#1}\kern 1 em}}}
\setsecindent{0em}\setaftersecskip{0em}\setsecnumformat{}
\setbeforesecskip{1 em}
\setsecheadstyle{\marginhead}
\setlength{\parindent}{0 pt}\setlength{\parskip}{1 em}
\setmarginnotes{0.4 in}{1 in}{1 em}
\marginparmargin{left}
%\newcommand{\mnote}[1]{\marginpar{\raggedleft\small\itshape#1}}
\usepackage{etoolbox}
\newtoggle{first}
\newcommand{\mnote}[1]{\marginpar{%
\raggedleft\small\itshape%
\iftoggle{first}{\global\togglefalse{first}\rule{1 pt}{4 em}}{}%
#1}}
%\setsechook{\global\togglefalse{first}}
\setsechook{%
\global\toggletrue{first}%
\hspace{0pt}%
}
\begin{document}
\begin{center}List of References\end{center}
\section{The Cooper Union}
\mnote{MEE, May 2011 (expected)}
\mnote{BEE, May 2007}
\mnote{S*ProCom\textsuperscript{2} Research Center}
\mnote{\& so on \& so forth}
Professor Foo Bar (Thesis Advisor)\\
(212) 555-0000
Professor Bas Quux (Electrical\\
Engineering Department Chair)\\
(212) 555-0001 quux @ cooper . edu
Professor Cal Culus (Math Department)\\
(212) 555-0002 culus @ cooper . edu
Professor Cal Culator (CS Department)\\
(212) 555-0003 culator @ cooper . edu
\section{Some Workplace}
\mnote{Internship, Summer 2007}
\mnote{note note note}
\mnote{note note note}
Sam Fellow (Mentor)\\
(212) 555-1000 fellow @ workplace . com
Mark Twain (Mentor)\\
(212) 555-1000 twain @ workplace . com
\section{Some Other Workplace}
\mnote{Internship, Summer 2006}
Guy Noir (Mentor)\\
(212) 555-2000 noir @ other . com
Eric J. Hartigan (Co-Mentor)\\
(212) 555-2001 hart @ other . com
\end{document}
\marginpars are special beasts, and they do not always come out right if
they are placed as the very first part of the text. We add the
\hspace{0pt} to make latex switch to horizontal mode (I think), and then
they start working again.
You cannot hide the stuff inside the section command as it never get
anywhere near the text.
My attempt is found below, but I would advise you to find a different
method of writing this besides using \marginpar, I would use one of the
other margin writing macros and I would write all the text at once
In my text please not the use of % to make things work right
\documentclass[article]{memoir}
\newcommand{\marginbox}[1]{%
\parbox[t][0pt]{1.5 in}{\scshape\raggedleft\mbox{} #1}}
\newcommand{\marginhead}[1]{{\llap{\marginbox{#1}\kern 1 em}}}
\setsecindent{0em}\setaftersecskip{0em}\setsecnumformat{}
\setbeforesecskip{1 em}
\setsecheadstyle{\marginhead}
\setlength{\parindent}{0 pt}\setlength{\parskip}{1 em}
\setmarginnotes{0.4 in}{1 in}{1 em}
\marginparmargin{left}
%\newcommand{\mnote}[1]{\marginpar{\raggedleft\small\itshape#1}}
\usepackage{etoolbox}
\newtoggle{first}
\togglefalse{first}
\newcommand{\mnote}[1]{\marginpar{%
\raggedleft\small\itshape%
\iftoggle{first}{}{\global\toggletrue{first}\rule{0pt}{\firstadjust}}{}%
#1}}
\newlength\firstadjust
\newcommand\startnext[1]{%
\hspace{0pt}%
\marginpar{\strut}%
\setlength\firstadjust{#1}%
\togglefalse{first}%
}
\begin{document}
\begin{center}List of References\end{center}
\section{The Cooper Union}
\startnext{1em}%
\mnote{MEE, May 2011 (expected)}%
\mnote{BEE, May 2007}%
\mnote{S*ProCom\textsuperscript{2} Research Center}%
\mnote{\& so on \& so forth}%
%
Professor Foo Bar (Thesis Advisor)\\
(212) 555-0000
Professor Bas Quux (Electrical\\
Engineering Department Chair)\\
(212) 555-0001 quux @ cooper . edu
Professor Cal Culus (Math Department)\\
(212) 555-0002 culus @ cooper . edu
Professor Cal Culator (CS Department)\\
(212) 555-0003 culator @ cooper . edu
\section{Some Workplace}
\startnext{0.5em}%
\mnote{Internship, Summer 2007}%
\mnote{note note note}%
\mnote{note note note}%
%
Sam Fellow (Mentor)\\
(212) 555-1000 fellow @ workplace . com
Mark Twain (Mentor)\\
(212) 555-1000 twain @ workplace . com
\section{Some Other Workplace}
\startnext{0.5em}%
%
\mnote{Internship, Summer 2006}%
%
Guy Noir (Mentor)\\
(212) 555-2000 noir @ other . com
Eric J. Hartigan (Co-Mentor)\\
(212) 555-2001 hart @ other . com
\end{document}
--
\documentclass[article]{memoir}
\newcommand{\marginbox}[1]{%
\parbox[t][0pt]{1.5 in}{\scshape\raggedleft\mbox{} #1}}
\newcommand{\marginhead}[1]{{\llap{\marginbox{#1}\kern 1 em}}}
\setsecindent{0em}\setaftersecskip{0em}\setsecnumformat{}
\setbeforesecskip{1 em}
\setsecheadstyle{\marginhead}
\setlength{\parindent}{0 pt}\setlength{\parskip}{1 em}
\setmarginnotes{0.4 in}{1 in}{1 em}
\marginparmargin{left}
\usepackage{calc}
\newcommand\mnotex[2][1.5em]{%
\begingroup
\setlength\sideparvshift{#1}
\sidepar{%
\raggedleft\small\itshape
\def\next{\\[1ex]}
\strut #2\strut%
}\endgroup}
\begin{document}
\begin{center}List of References\end{center}
\section{The Cooper Union}
\mnotex{%
MEE, May 2011 (expected)
\next
BEE, May 2007
\next
S*ProCom\textsuperscript{2} Research Center
\next
\& so on \& so forth
}%
%
Professor Foo Bar (Thesis Advisor)\\
(212) 555-0000
Professor Bas Quux (Electrical\\
Engineering Department Chair)\\
(212) 555-0001 quux @ cooper . edu
Professor Cal Culus (Math Department)\\
(212) 555-0002 culus @ cooper . edu
Professor Cal Culator (CS Department)\\
(212) 555-0003 culator @ cooper . edu
\section{Some Workplace}
\mnotex{%
Internship, Summer 2007
\next
note note note
\next
note note note}%
%
Sam Fellow (Mentor)\\
(212) 555-1000 fellow @ workplace . com
Mark Twain (Mentor)\\
(212) 555-1000 twain @ workplace . com
\section{Some Other Workplace}
\mnotex[1.5em + \baselineskip]{Internship, Summer 2006}%
ALMA MATER NAME Professor Foo Bar (Thesis Advisor)
(212) 555-0000 bar at school dot edu
MEE, May 2011
(expected) References & their contact information
References & their contact information
BEE, May 2007 References & their contact information
SOME WORKPLACE References & their contact information
References & their contact information
Note note note
Note notes References & their contact information
(etc., etc.)
My adaptation of Lars’s code is below; basically the marginal notes for
each section are all put into a single \sidepar{...}. This does almost
everything I was looking for except for the placement of the right
margin of the margin notes. Quoting from above, “>---<” indicates the
spacing I’m talking about:
SOME WORKPLACE References ....
>---<
Note note note
Is there a straightforward way to accomplish this?
--Joel Salomon
\documentclass[article, oneside]{memoir}
% Adapted from my résumé
\newcommand{\marginbox}[1]{%
\parbox[t][0pt]{1.5 in}{\scshape\raggedleft\mbox{} #1}}
\newcommand{\marginhead}[1]{%
{\llap{\marginbox{#1}\kern 8 bp}}}
\setsecindent{0em}\setaftersecskip{0em}\setsecnumformat{}
\setbeforesecskip{1 em}
\setsecheadstyle{\marginhead}
\setlength{\parskip}{0 em}\setlength{\parindent}{0 em}
\setlrmarginsandblock{1.75 in}{1.25 in}{*}
\setulmarginsandblock{60 bp}{*}{*}
\checkandfixthelayout
\makepagestyle{reflist}
\makepsmarks{reflist}{\changetext{}{-192 bp}{}{156 bp}{}}
\newlength{\ressmallskip}\setlength{\resmedskip}{6 bp}
% Begin my adaptation of Lars’s code
\usepackage{calc}
\newlength{\rrefnotedrop}\setlength{\rrefnotedrop}{\baselineskip +
\resmedskip}
\renewcommand*{\sideparfont}{\footnotesize\itshape}
\renewcommand*{\sideparform}{\raggedleft}
\newcommand{\rrefnotes}[2][\rrefnotedrop]{%
\begingroup\setlength\sideparvshift{#1}%
\def\next{\\[\ressmallskip]}%
\sidepar{\strut#2\strut}\endgroup}
\begin{document}
Placeholder page for my CV.
\section{References} Attached.
\newpage\pagestyle{reflist}
\newlength{\rescenter}
\calccentering{\rescenter}
\begin{adjustwidth*}{\rescenter}{-\rescenter}
\begin{center}List of References\end{center}
\end{adjustwidth*}
\section{Alma Mater}
\rrefnotes{%
MEE, May 2011 (expected) \next
BEE, May 2007 \next
Note note note}%
Professor Foo Bar (Thesis Advisor)\\
(212) 555-0000\quad bar at school dot edu\\
References \& their contact information;
References \& their contact information;
References \& their contact information
\section{Some Workplace}
\rrefnotes{%
Internship, Summer 2007 \next
Note note note}%
References \& their contact information;
References \& their contact information\\
References \& their contact information;
References \& their contact information
\section{Some Other Workplace}
\rrefnotes[\rrefnotedrop + \baselineskip]{%
Internship, Summer 2006}%
References \& their contact information;
References \& their contact information\\
References \& their contact information;
References \& their contact information
\end{document}
I do not quite understand what it is you are trying to do?
What does
SOME WORKPLACE References ....
>---<
mean?
/daleif
I’d missed your use of \setmarginnotes; in the process of writing a
message to better explain myself, I looked it up in the manual and found
it was what I needed. Thank you.
Next question: How do I make the text in the \sidepar to have looser
inter-line spacing? Neither \setPagenoteSpacing nor \setFloatSpacing
seem to do the trick.
Thanks,
--Joel
loser? again please explain
/daleif
I meant “looser”, less “tight”, i.e., more space between lines (like
double-spacing). I don’t actually want *double* spacing, but I need
something looser than the default at the font size I’m using.
--Joel
interesting, I seem to have forgotten to add the spacing feature to the
other types of notes
For now try adding
\setPagenoteSpacing{1.2}
\makeatletter
\renewcommand{\sidepar}{\@dblarg{\@sidepar}}
\long\def\@sidepar[#1]#2{\leavevmode\@bsphack\strut\vadjust{%
\checkoddpage
\ifm@msetsp% \sideparmargin used
%%%% \setspbools
\else% \sideparmargin not used, set the \m@mspar@margin code
\setspcode
\fi
\rlap{\kern-\parindent
\m@mwhich@margin{\m@mspar@margin}% set left or right margin
\ifmemtortm
\m@msidepar@right
\else
\m@msidepar@left
\fi
\setbox0=\vtop to 0pt{%
\begin{minipage}[t]{\marginparwidth}%
\def\baselinestretch{\m@m@footnote@spacing}% <--- added
\sideparform\sideparfont%
\ifmemtortm #2\else #1\fi
\end{minipage}%
\vss}%
\vtop to 0pt{\kern\sideparvshift% default should be 0pt
\kern-\dp\strutbox
\kern-\ht0
\box0 \vss}}}%
\@esphack}
\makeatother