It is easy enough to mimic the page design of the linked-to sample_CV.tex
without all the complicated hoops it jumps through. All it takes is geometry
and titlesec
. (I would also use enumitem
to fiddle with my various list environments, but that is beside the point here.) What matters in this case is setting the margins to the width you like, and making sure there's enough room for your sectional titles. In order to keep these settings obvious and easy to change, I'd use the following:
\newlength\lmargwidth% <-- will set the width left of section headings
\newlength\sectionlen% <-- will set the space reserved for the section headings
\setlength{\lmargwidth}{1in}
\setlength{\sectionlen}{1in}
The advantage of setting lengths this way is that if you decide you want to use the same lengths elsewhere, you can just plug in a, say, \sectionlen
. Then, if you want to make changes to its length (say to 2in
), one change will propagate to all the 'right' places in the document.
The only other addition to this file is the \printmyname
command, which basically just is a 'stretchable' macro to mimic the way the name is set in sample_CV.tex
. Personally, I'd probably do something different to set off my name in my CV. (Not that this person's set up is overly flashy...)
\documentclass[10pt]{article}
\usepackage{filecontents}
\begin{filecontents}{\jobname.bib}
@article{paper1,
author = {John G. Smith},
year = {2004},
title = {This is journal paper 1},
}
@article{papere2,
author = {John G. Smith},
year = {2006},
title = {This is journal paper 2},
}
@conference{C03,
author = {John G. Smith},
year = {2003},
title = {This is conference paper 1},
}
\end{filecontents}
\usepackage[T1]{fontenc}
% These two lengths set the left margin and the space reserved on the
% left for the sectional titles, which are, by design *not* part of
% the text block. If you need to invade that space for a special
% section, you just need to decrease the left margin by a
% '-\sectionlen' (e.g., \hspace*{-\sectionlen})
\newlength\lmargwidth
\newlength\sectionlen
\setlength{\lmargwidth}{1.0in}%
\setlength{\sectionlen}{1.0in}%
\usepackage[paper=letterpaper,
%includefoot, % Uncomment to put page number above margin
lmargin={\dimexpr\lmargwidth +\sectionlen\relax}, % <-- changed
rmargin=1in,
vmargin=1in,
nomarginpar,
% showframe, % <-- for debugging...
]{geometry}
\usepackage{lipsum}
% Set up \section and \subsection format
\usepackage[nobottomtitles]{titlesec}
\setcounter{secnumdepth}{0}% <-- don't number sections or subsections
\titleformat{\section}[leftmargin]
{\normalfont\scshape\filright}
{\thesection}
{0.5em}
{}
\titlespacing*{\section}% <-- remove the * if you want indentation on the first line
{\sectionlen}{1.5ex plus .1ex minus .2ex}{0pc}
\titleformat{\subsection}[leftmargin]
{\normalfont\scshape\filright}
{\thesubsection}
{0.5em}
{}
\titlespacing*{\subsection}% <-- * == no indentation for 1st line
{\sectionlen}{1.5ex plus .1ex minus .2ex}{0pc}
%%%%%%%% biblatex
\usepackage[style=ieee, bibstyle=ieee, defernumbers=true, sorting=ydnt]{biblatex}
% Load hyperref after most packages...
\usepackage{hyperref}
% Format name: bold and 'large'
\newcommand{\nameformat}[1]{%
\textbf{\large #1}}
% Set and print name over a horizontal rule...
\newcommand{\printmyname}[1]{%
\begingroup
\parindent 0pt
\hspace*{-\sectionlen}%
\makebox[0pt][l]{\nameformat{#1}}\par
\hspace*{-\sectionlen}%
% \hrulefill% <-- normal line
\rule{\dimexpr\textwidth + \sectionlen\relax}{2mm}% <-- 2mm thick line
\endgroup}
\begin{document}
\printmyname{Some Gal with a Really Long Name}
\section{First}
\lipsum[1]
\begin{itemize}
\item one
\item two
\item three
\end{itemize}
\subsection{Second}
\lipsum[1-3]
\section*{First Starred}
\lipsum[2]
\subsection*{Second Starred}
\lipsum[2]
\section{Publications}
\begin{refsection}[\jobname.bib]
\nocite{*}
\printbibliography[heading=subbibliography,type=article, title={Journals}]
\end{refsection}
\begin{refsection}[\jobname.bib]
\nocite{*}
\printbibliography[heading=subbibliography, type=inproceedings, title={Conferences}]
\end{refsection}
\end{document}
Original answer. (Designed to put section titles flush to the right-hand margin.)
I think you can achieve the same effect, more or less with a very simple use of titlesec
:
\usepackage{titlesec}
\setcounter{secnumdepth}{0}
\titleformat{\section}[block]
{\hfill\scshape}
{\thesection}
{0.5em}
{}[]
\titleformat{\subsection}[block]
{\hfill\scshape}
{\thesubsection}
{0.5em}
{}[]
The full example, then, would be the following:
\documentclass[10pt]{article}
\usepackage[T1]{fontenc}
\usepackage{filecontents}
\begin{filecontents}{\jobname.bib}
@article{paper1,
author = {John G. Smith},
year = {2004},
title = {This is journal paper 1},
}
@article{papere2,
author = {John G. Smith},
year = {2006},
title = {This is journal paper 2},
}
@conference{C03,
author = {John G. Smith},
year = {2003},
title = {This is conference paper 1},
}
\end{filecontents}
\usepackage{lipsum} % <-- used to help see the textblock
\usepackage{titlesec}
\setcounter{secnumdepth}{0}
\titleformat{\section}[block]
{\hfill\scshape}
{\thesection}
{0.5em}
{}[]
\titleformat{\subsection}[block]
{\hfill\scshape}
{\thesubsection}
{0.5em}
{}[]
% another titlesec option would be 'rightmargin' instead of 'block': but this puts the heading *in* the margin...
%%%%%%%% biblatex
\usepackage[style=ieee, bibstyle=ieee, defernumbers=true, sorting=ydnt]{biblatex}
\usepackage{hyperref}% load after most packages...
\begin{document}
\section{First}
\lipsum[1]
\subsection{Second}
\lipsum[1]
\section*{First Starred}
\subsection*{Second Starred}
\lipsum[1]
\section{Publications}
\begin{refsection}[\jobname.bib]
\nocite{*}
\printbibliography[heading=subbibliography,type=article, title={Journals}]
\end{refsection}
\begin{refsection}[\jobname.bib]
\nocite{*}
\printbibliography[heading=subbibliography, type=inproceedings, title={Conferences}]
\end{refsection}
\end{document}
\section
and/or\subsection
have most likely been badly redefined and is/are the culprit. It is hard to answer the question until a real minimal file is posted here, however, because many unwise or downright wrong redefinitions of these commands are possible.\section*
and\subsection*
) form.