Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

latex 2.0 style footnotes #3

Closed
lgatto opened this issue Jun 25, 2016 · 5 comments
Closed

latex 2.0 style footnotes #3

lgatto opened this issue Jun 25, 2016 · 5 comments

Comments

@lgatto
Copy link

lgatto commented Jun 25, 2016

The margin notes are very nice in most cases, but I stumbled on the following issues

  • When the footnote is actually an URL, it displays really badly in the margin. Is there a way to force it to be a footnote?

2016-06-25-054701_680x285_scrot

  • Is there a dedicated way to specify the authors' affiliations and/or email address. I think the email in the margin below looks a bit weird

Found this in the LatexStyle2 vignette.

  • I have the case where the footnote appears at the bottom of the page and overflows on the page number

2016-06-25-054628_363x287_scrot

@aoles
Copy link
Collaborator

aoles commented Jun 26, 2016

Hi Laurent,
thank you for trying the new style and for reporting your issues with it!

The footnotes are currently implemented using the footmisc LaTeX package. As you have noticed, apparently this approach is not robust enough and may lead to vertical overflows. I will need to investigate this further and look into possible alternatives.

Re typesetting URL's on the margin: BiocStyle does not offer overriding the placement of footnotes. If you are not happy with the results maybe you could either put it inline, or as a citation, i.e. have \cite{myurl} and a corresponding bibliography entry:

@misc{myurl,
  url = {http://www.example.com},
}

@aoles
Copy link
Collaborator

aoles commented Jun 27, 2016

I did some research and found the following. Footnotes on the side are typeset as margin notes with \marginpar. The problem with this approach is that even though the notes are stacked one after the other so that they don't overlap, there is no mechanism for preventing them overflowing the bottom margin. This shortcoming is addressed by the LaTeX package marginfix, see also the article at TUGboat. It does a decent job, however, it is not ideal. In particular, it has some problems with accurate positioning of the side-notes: because the position of the notes is calculated before the glue in the main column is stretched (or shrunk), any stretch or shrink causes misalignment. Apart from this, when the package is loaded, the document seems to render with fixed page height similar to \flushbottom, as opposed to the default \raggedbottom. This is undesired as it tends to stretch the glue, which only makes things worse. I'm not sure where this comes from, but my guess is that this is probably an artifact of the package enforcing the margin height.

Because of the issues described above, I won't be enabling marginfix in BiocStyle, but you are welcome to load it manually by adding to your document header

\usepackage{marginfix}

@lgatto
Copy link
Author

lgatto commented Jun 27, 2016

Thanks for looking into this. I would prefer to limit as much as possible relying on additional dependencies and let BiocStyle do it's thing. I am still exploring the new style, so I'll see how it goes.

@aoles
Copy link
Collaborator

aoles commented Jun 30, 2016

Hi Laurent,
I had a second look at this and realized that I was using an outdated version of marginfix (0.9). The issues which I was initially concerned about have been resolved in the current release. Therefore, I've enabled marginfix in BiocStyle >= 2.1.13.

There is a caveat, though. It turns out that using marginfix may lead to some "color leakage", see my bug report at shicks/marginfix#13. (This is similar to the other issue reported by you in #5, but funnily enough, once marginfix is enabled that problem goes away.) This can be observed, for example, in margin notes on pages on which there is a code chunk continuing from the previous page. Then the footnote gets typeset with the dark shade of gray which is the default foreground color in code chunks. I will look into possible solutions to this.

@aoles
Copy link
Collaborator

aoles commented Jul 1, 2016

I'm happy to inform that I've managed to fix the remaining issue of margin notes being typeset with the wrong color. This required patching the internal LaTeX macro \@savemarbox which saves the box containing the \marginpar note, see 7e27133.

Don't hesitate to contact me in case there are any remaining issues with the formatting or positioning of footnotes.

Cheers,
Andrzej

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants