1

I've been struggling trying to get my footnotes to fit the way i want them to. I want the page to have 0.9in border on each side with the header and footer included in the remaining area. I also want there to be a dashed line 1\baselineskip beneath the header/above the footnote and 2\baselineskip of vertical space between the dashed line and the text body.

Can anyone give me a hint on the origin of the problems i'm facing? Thanks in advance!

%!TEX TS-program = xetex
%!TEX encoding = UTF-8 Unicode

\documentclass[
    12pt,
    oneside
]{article}

\usepackage{calc}

\usepackage[
    showframe,
    driver=xetex,
    paper=a4paper,
    top=0.9in,
    bottom=0.9in,
    left=0.9in,
    right=0.9in,
    includeheadfoot,
    headheight=0in,
    headsep=4\baselineskip,
    footskip=0in,
]{geometry}

\usepackage[onehalfspacing]{setspace}
\usepackage[usenames,dvipsnames,svgnames,table]{xcolor}
\usepackage{helvet}
\renewcommand{\familydefault}{\sfdefault}

\usepackage{titlesec}
\usepackage{titleps}
\usepackage{titletoc}

\usepackage[hang,flushmargin,bottom]{footmisc}
\renewcommand{\thefootnote}{\textcolor{gray!50}{\arabic{footnote}}}

\usepackage{dashrule}

\usepackage{lipsum}

\newcommand{\drule}{
    \renewcommand\makeheadrule{
        \vspace{\baselineskip}
        \begin{minipage}{\textwidth}
            \color{gray!50}
            \centering
            \hdashrule[-2.5\baselineskip]{\textwidth}{0.7pt}{3pt}
        \end{minipage}
    }
    \renewcommand\footnoterule{ 
        \begin{minipage}{\textwidth}
            \color{gray!50}
            \centering
            \hspace{-25pt}\hdashrule[\baselineskip]{\textwidth}{0.7pt}{3pt}
        \end{minipage}
    }
    \renewcommand\footnotelayout{\onehalfspacing\normalsize\color{gray!50}}
    \setlength{\footnotemargin}{5pt}
    \setlength{\skip\footins}{2\baselineskip}
    \setlength{\footnotesep}{.5\baselineskip}
    \interfootnotelinepenalty=10000
}

\newpagestyle{main}{%
    \drule
    \sethead{\normalsize\color{gray!50}\toptitlemarks\sectiontitle}{}{\normalsize\color{gray!50}\thepage}
}
\newpagestyle{1st_page}{%
    \drule
    \sethead{\normalsize\color{gray!50}\firsttitlemarks\sectiontitle}{}{\normalsize\color{gray!50}\thepage}
}

\begin{document}
\pagestyle{main}
\thispagestyle{1st_page}

\section{1st section}

\lipsum[1] TEST\footnote{test} TEST\footnote{test}
\lipsum[2-3]

\section{2nd section}

\lipsum[1] TEST TEST\footnote{\lipsum[2]} \lipsum[1-3] test\footnote{test} \lipsum \lipsum[1]

\end{document}
1

The \footnoterule is required to take up 0 vertical space. So I changed your definition to (I think \parbox is more lightweight than minipage)

\renewcommand\footnoterule{%
  \parbox[0pt]{\textwidth}{\color{gray}\centering\hspace{-25pt}\hdashrule[\baselineskip]{\textwidth}{0.7pt}{3pt}}%
\vss}

And, please note that \footnotesep is the distance of the \footnoterule or the previous footnote to the baseline of the first line of the footnote. Therefore 0.5\baselineskip will have no effect. It only does something if it is > \baselineskip.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.