Advertisement
nyiti

mylayout.sty (footnoterule not moving with footnote)

May 9th, 2011
212
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Latex 1.78 KB | None | 0 0
  1. \ProvidesPackage{mylayout}
  2.  
  3. \setlength\paperheight{9in}
  4. \setlength\paperwidth{6in}
  5.  
  6. \usepackage[cmyk]{xcolor}
  7.  
  8. \usepackage{geometry}
  9. \geometry{
  10. paperwidth=6in,
  11. paperheight=9in,
  12. textwidth=4.5in,
  13. textheight=7in,
  14. inner=20mm
  15. }
  16.  
  17. \definecolor{footnote}{gray}{0.2}
  18. \definecolor{footnoterule}{gray}{0.15}
  19.  
  20. \usepackage[perpage,multiple,stable]{footmisc}
  21.  
  22. \renewcommand\footnoterule{%
  23.   \begingroup
  24.   \vspace*{\baselineskip}%
  25.   \kern-3\p@%
  26.   \color{footnoterule}\hrule height 0.4pt width \columnwidth%
  27.   \kern2.6\p@%
  28.   \endgroup}
  29.  
  30. % redefined from footmisc.sty, putting the footnote text in a \footwidth wide minipage
  31. \newlength{\footwidth}
  32. \long\def\@makefntext#1{%
  33. \parindent1em
  34. \noindent
  35. \ifdim\footnotemargin>\z@
  36.   \hb@xt@ \footnotemargin{\hss\@makefnmark}%
  37. \else
  38.   \ifdim\footnotemargin=\z@
  39.     \llap{\@makefnmark}%
  40.   \else
  41.     \llap{\hb@xt@ -\footnotemargin{\@makefnmark\hss}}%
  42.   \fi
  43. \fi
  44. \setlength{\footwidth}{\linewidth}%
  45. \addtolength{\footwidth}{-\footnotemargin}%
  46. \addtolength{\footwidth}{-0.3em}%
  47. \begin{minipage}[t]{\footwidth}\raggedright #1\end{minipage}%
  48. }
  49.  
  50. % redefined from footmisc.sty, adding a color for the footnote text
  51. \renewcommand\@footnotetext[1]{%
  52.   \insert\footins{%
  53.     \ifFN@setspace
  54.       \let\baselinestretch\FN@baselinestretch
  55.     \fi
  56.     \reset@font\footnotesize
  57.     \interlinepenalty\interfootnotelinepenalty
  58.     \splittopskip\footnotesep
  59.     \splitmaxdepth \dp\strutbox
  60.     \floatingpenalty25000
  61.     \hsize\columnwidth
  62.     \@parboxrestore
  63.     \protected@edef\@currentlabel{%
  64.       \csname p@footnote\endcsname\@thefnmark
  65.     }%
  66.     \color@begingroup%
  67.     \color{footnote}%
  68.       \@makefntext{%
  69.         \rule\z@\footnotesep
  70.         \ignorespaces#1\@finalstrut\strutbox
  71.       }%
  72.     \color@endgroup
  73.   }%
  74.   \FN@mf@prepare
  75. }%
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement