3

I would like to move a \footnoterule to right by 3 cm to be aligned with a footgroup moved to right by 3 cm.

I know that footnote rule uses a \hrule To move the rule, I should put it in a \vbox, and move it with \moveleft or \moveright.

But when I did it, I lost kerning. I could include the footgroup in the \vbox but it will be very complex.

Any idea?

See the following example:

\documentclass{article}
\parindent=0pt
\begin{document}
\leftskip=2cm
\footnotesize \moveleft-2cm\vbox{\footnoterule}
\footnote{A good vertical distance} A bad vertical distance

\end{document}

Example

  • The footnote rule is added during shipout. Using \moveright in the document makes no sense for this. – egreg Aug 28 '14 at 16:36
  • maybe, but I need to shift it ;-) – Maïeul Aug 28 '14 at 16:40
  • The design is that footnotes are aligned with main texts. Hence you may shift it by adjusting margins ... and then do another dirty trick to protect your main texts. Up to you :P – Symbol 1 Aug 28 '14 at 16:59
  • yes, for the second part, I can do it. Indeed, the problem is that main text is not left aligned (eledpar columns) – Maïeul Aug 28 '14 at 17:08
  • 2am now... sorry I had never heard about eledmac and its footnote-commands look insane... – Symbol 1 Aug 28 '14 at 18:04
2

If you're in vertical mode, then

\moveright2cm\vbox{\hrule .4\columnwidth}\nointerlineskip

will do.

Here's a Plain TeX simulation.

\leftskip=2cm

\moveright2cm\vbox{\hrule width 5cm}\nointerlineskip
s

\bigskip

\hrule width 5cm
s

\bye

enter image description here

Of course you'll have a strut after the rule and also some kerning (-3pt before and 2.6pt after the rule is what LaTeX uses for \footnoterule).

\leftskip=2cm

\kern-3pt
\moveright2cm\vbox{\hrule width 5cm}\nointerlineskip
\kern2.6pt
\strut s

\bigskip

\kern-3pt
\hrule width 5cm
\kern2.6pt
\strut s

\bye

enter image description here

The same result is obtained if

\moveright2cm\vbox{
  \kern-3pt
  \hrule width 5cm
  \kern2.6pt
}\nointerlineskip

is used for moving the rule to the right.

  • thanks, but for some other technical reason, I prefer to keep the \footnoterule as one single block. cf my own answer. – Maïeul Aug 31 '14 at 6:28
  • @Maïeul I'm not sure of what you mean. – egreg Aug 31 '14 at 6:51
  • in your example \footnoterule is split as : kern + vbox containing hrule + kern. I need to have : vbox containing kern + hrule + kern. – Maïeul Aug 31 '14 at 6:56
  • @Maïeul Put the kerns in the box; it's as simple as that. – egreg Aug 31 '14 at 7:04
  • yes,but in your example, the \strut add a spurious vertical space that I don't want. – Maïeul Aug 31 '14 at 7:09
1

When I look into the process generating footnotes, I found that LaTeX is doing everything in vertical mode. Therefore it is really difficult to find somewhere to insert a horizontal space. Finally I can only share this dirty trick:

\documentclass{article}
\begin{document}
\vspace*{17cm}
    \noindent text before \footnote{A good vertical distance} text after
\clearpage
\vspace*{17cm}
    \makeatletter
    \let\oldfootnoterule=\footnoterule
    \def\footnoterule{\moveright3cm\vbox{\oldfootnoterule}}
    \def\@makefntext#1{\parindent 1em\noindent \hskip3cm \hb@xt@ 1.8em{\hss \@makefnmark }#1}
    \noindent text before \footnote{A good vertical distance} text after
\end{document}

  • that is, indeed, very dirty. I will look at it to show if adaptable/usable for eledmac... – Maïeul Aug 28 '14 at 16:38
0

One french people TeXuser send me a good solution. We have to:

  • put the rule in a vbox
  • put this vbox in a hbox, with a kern inside the hbox
  • be certain than this hbox is followed by a \vbox AND NOT by a \hbox.

See the three followings example

\newbox\a
\leftskip=2cm
\setbox\a=\vbox{x}
\footnoterule
\unvbox\a
% normal position position 

\newpage

\setbox\a=\hbox{x}
\hbox{\kern 2cm\vbox{\footnoterule}}
\unhbox\a
% good x position, bad y position

\newpage

\setbox\a=\vbox{x}
\hbox{\kern 2cm\vbox{\footnoterule}}
\unvbox\a

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.