3

If I use the package sidenotes and try the following:

Test\sidenote{Side note.}, continue.

there is a big space before the comma.

Is it possible to avoid this?

  • You should report this at github.com/andythomas/TeX-sidenotes/issues or write an email to Andy Thomas. – cgnieder Jul 23 '13 at 11:07
  • In the meantime you could try the snotez package as an alternative... :) – cgnieder Jul 23 '13 at 11:11
  • 1
    github.com/andythomas/TeX-sidenotes/issues/28 tracked and closed by Andy Thomas. Maybe its already corrected for the next version. – LaRiFaRi Jul 23 '13 at 11:16
  • 1
    @LaRiFaRi the fix has been four months ago but obviously v0.93 did not make it to CTAN, yet... I still believe it would be best to contact Andy. – cgnieder Jul 23 '13 at 11:27
  • Thank you all! I have installed the last version from the github! – jankos Jul 23 '13 at 11:49
1

Thanks to cgnieder for picking up on some missing % signs. But even with that fixed, it still added too much space for my taste. So I removed a few spaces. I checked, and it does NOT seem to misspace things when getting into double digits, so you might be good to go.

\documentclass{article}
\usepackage{sidenotes}
\makeatletter
\renewcommandtwoopt{\sidenote}[3][][]{%
\sidenotemark[#1]%
\sidenotetext[#1][#2]{#3}%
\@ifnextchar\sidenote{\kern-0.07em\textsuperscript{,}}%
{\@ifnextchar\sidecite{\kern-0.07em\textsuperscript{,}}{}}% <<SPACE REMOVED
}
\renewcommandtwoopt{\sidenotetext}[3][][]{%
\ifthenelse{\isempty{#1}}{% sitenotemark given?
\addtocounter{sidenote}{-1}%
\ifthenelse{\isempty{#2}}% offset given?
{\marginpar{\textsuperscript{\thesidenote}{}#3}}% <<<SPACE REMOVED
{\marginnote{\textsuperscript{\thesidenote}{}#3}[#2]}% <<<SPACE REMOVED
\addtocounter{sidenote}{1}}%
{\ifthenelse{\isempty{#2}}% offset given?
{\marginpar{\textsuperscript{#1}#3}}% <<<SPACE REMOVED
{\marginnote{\textsuperscript{#1}#3}[#2]}}% <<<SPACE REMOVED
}%
\makeatother
\begin{document}
Test\sidenote{Side note.}, continue.
\end{document}

enter image description here

| improve this answer | |
  • There's a spurious space at the end of the redefinition of \sidenotetext – cgnieder Jul 23 '13 at 11:24
  • @cgnieder Don't know how I missed that (also wrong in original package). Will fix. – Steven B. Segletes Jul 23 '13 at 11:28

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.