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

Captions for algorithm environment are put on the wrong side #50

Open
GoogleCodeExporter opened this issue Mar 12, 2015 · 2 comments
Open

Comments

@GoogleCodeExporter
Copy link

Please describe the feature, problem, or bug:

When using the algorithm environment with T-L book style with two side and 
symmetric options, 
the marginnote with the caption is sometimes put on the wrong side. You see it 
in the PDF 
output from the minimal example on page 4.

I have the similar experience with marginnotes in theorems, but cannot 
construct a minimal 
example for now.

What is the expected output? What do you see instead?

The "normal" marginnote respects the front/back side detection, but the caption 
of algorithm 
environment does not.

What version of Tufte-LaTeX are you using?  With which TeX distribution?

r166 of T-L. pdflatex of MacTeX 2009. xelatex had the same effect.

Please provide any additional information below.

I have the minimal example and a screenshot attached.

Original issue reported on code.google.com by [email protected] on 13 Apr 2010 at 2:23

Attachments:

@GoogleCodeExporter
Copy link
Author

Possible fix is changing \floatc@tufteplain into:

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    \newcommand{\floatc@tufteplain}[2]{%
      \begin{lrbox}{\@tufte@caption@box}%
        \begin{minipage}[\floatalignment]{\marginparwidth}\hbox{}%
          \@tufte@caption@font{\@fs@cfont #1:} #2\par%
        \end{minipage}%
      \end{lrbox}%
       \@tufte@checkoddpage%
    \ifthenelse{\boolean{@tufte@odd@page}}%
      {\gsetboolean{@tufte@float@recto}{true}\@tufte@float@debug{Detected page: [recto/odd]}}%
      {\gsetboolean{@tufte@float@recto}{false}\@tufte@float@debug{Detected page: [verso/even]}}%
  \ifthenelse{\NOT\boolean{@tufte@symmetric}\OR\boolean{@tufte@float@recto}}{%
    % asymmetric or page is odd, so caption is on the right
   \smash{\hspace{\@tufte@caption@fill}\usebox{\@tufte@caption@box}}%
    \@tufte@float@debug{Caption position: [right]}%
  }{% symmetric pages and page is even, so caption is on the left
\smash{\hspace{-\@tufte@overhang}\usebox{\@tufte@caption@box}}%
    \@tufte@float@debug{Caption position: [left]}%
  }%
    }
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

Original comment by [email protected] on 19 Jun 2011 at 3:29

@benmaier
Copy link

I have this problem, as well. The proposed solution does not work for me.

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

No branches or pull requests

2 participants