14

In relation to the question A nice collection of exercises for students that I have asked, at the moment I do not know how to have the same shaded line inverted in gray (I would to have the possibility to change the color: for example orange, or other colors) at the top right that can be replaced instead of the classic horizontal black line of the \footnote command.

See the picture below in attachment:

enter image description here

Here there is my output and my MWE:

enter image description here

\documentclass[12pt]{article}
\usepackage[bottom,hang]{footmisc}
\setlength\footnotemargin{4.5pt}
\setlength{\footnotesep}{4.5pt}
\setlength{\skip\footins}{8mm}
\begin{document}
First word\footnote{One}, Second word\footnote{Two}
\end{document}
5
  • At the top right? A top note rule?
    – user31729
    Commented Jan 26, 2019 at 21:33
  • Kind Christian exactly: a top note rule.
    – Sebastiano
    Commented Jan 26, 2019 at 21:35
  • You're asking about a top note rule (at the top right) and accept answers that change the type of the footnote rule? I don't get this -- apparently, I am too stupid to understand
    – user31729
    Commented Jan 26, 2019 at 22:43
  • @ChristianHupfer No :-(. I have confused between bottom (ground) and top (up). Excuse me very much but my English language is scarce (see the figure).
    – Sebastiano
    Commented Jan 27, 2019 at 11:34
  • 1
    Well, such unclear questions are annoying in my point of view
    – user31729
    Commented Jan 27, 2019 at 13:40

2 Answers 2

16

Just \renewcommand\footnoterule using the (simplified) definition of the rule in the linked post. You have to do this before loading the package footmisc because it overwrites \footnoterule.

\documentclass[12pt]{article}
\usepackage{tikz}
\usetikzlibrary{fadings}

\renewcommand\footnoterule{%
  \noindent
  \kern-3pt
  \begin{tikzpicture}[baseline=-10pt]
    \fill[darkgray,path fading=east] (0,0) rectangle (.4\columnwidth,0.02);
  \end{tikzpicture}%
  \kern2.6pt
}

\usepackage[bottom,hang]{footmisc}
\setlength\footnotemargin{4.5pt}
\setlength{\footnotesep}{4.5pt}
\setlength{\skip\footins}{8mm}
\begin{document}
First word\footnote{One}, Second word\footnote{Two}
\end{document}

enter image description here

5
  • I'd like to thank you so much in the meantime. Could the horizontal line you drew start earlier above the footnotes?
    – Sebastiano
    Commented Jan 26, 2019 at 21:34
  • 1
    @Sebastiano You can add some depth to the tikzpicture using the baseline option, see updated answer. Commented Jan 26, 2019 at 21:38
  • 2
    @HenriMenke I think Sebastiano means have the line line up on the left with the footnotes (which you can do by adding \noindent).
    – Alan Munn
    Commented Jan 26, 2019 at 21:41
  • @HenriMenke Now I have compilated my book with your code: fantastic! wow is very nice. I have deleted my previous comment. Thankkkkkkkks.
    – Sebastiano
    Commented Jan 27, 2019 at 11:51
  • @HenriMenke Will this slow down the compilation, if the document has hundreds of footnotes and pages? Is the tikzpicture part of your code compiled for every footnoterule again? If this were the case, maybe there is an something like a savebox for tikzpictures? OK, I'm clueless.
    – Keks Dose
    Commented Jan 28, 2019 at 14:26
5

[EDIT: This answer does not change the footnote rule, but only change the footnote text and symbol colors]

Adding 3 lines into your preamble may give you what you want:

\documentclass[12pt]{article}
\usepackage[bottom,hang]{footmisc}
\setlength\footnotemargin{4.5pt}
\setlength{\footnotesep}{4.5pt}
\setlength{\skip\footins}{8mm}
%
\usepackage{xcolor}
\renewcommand{\thefootnote}{\color{orange}\arabic{footnote}} % change the color of the footnote counter
\renewcommand{\footnotelayout}{\color{orange}} % change the color of the footnote text
%
\begin{document}
First word\footnote{One}, Second word\footnote{Two}.
\end{document}

The output would be:

enter image description here

3
  • 3
    Thank you very much for your job that I upvote for your time for me. But the color is referred for the shadow rule.
    – Sebastiano
    Commented Jan 26, 2019 at 21:37
  • Well yes I was wrong :) My answer just change the footnote text and symbol colors, not the footnote rule as you mentioned in your question which unfortunately i didn't notice. Well I guess I'll leave that answer here though, may be it would be useful for someone else!
    – hesham
    Commented Jan 26, 2019 at 21:49
  • 3
    That's great. I thought the same thing. Leave it. You're always welcome with me.
    – Sebastiano
    Commented Jan 26, 2019 at 21:51

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .