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

Use of marginfigure produces unwated indentation #72

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

Use of marginfigure produces unwated indentation #72

GoogleCodeExporter opened this issue Mar 12, 2015 · 3 comments

Comments

@GoogleCodeExporter
Copy link

(Please attach an example .tex file demonstrating the problem or bug.)

Please describe the feature, problem, or bug:

Usage of marginfigure environment produces unwated indentation between equation 
and text block (see file indentation.jpg)

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

No indentation should appear (see file no-indentation.jpg)

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

3.5

Please provide any additional information below.

Here's the code used in the example:

Come \`e stato gi\`a fatto per la guida rettangolare, il problema pu\`o essere 
semplificato con il metodo di
separazione delle variabili, e si pone
\index{separazione delle variabili}
\begin{equation}
T = R(r)\Phi(\phi) \label{eq:gui-cir:sep-var}
\end{equation}
\begin{marginfigure}
\centering
\missingfigure{p 53 bozza}
\caption[Sezione trasversale della guida cilindrica a sezione 
circolare]{Sezione trasversale della guida
cilindrica a sezione circolare: la funzione $\Phi(\phi)$ deve essere periodica, 
di periodo $2\pi$.}
\label{fig:gui-cir:sez-tra}
\end{marginfigure}
Dato il sistema di coordinate considerato (\cref{fig:gui-cir:sez-tra}), la 
funzione $\Phi(\phi)$ deve essere
periodica, di periodo $2\pi$, in modo tale da soddisfare l'uguaglianza

Original issue reported on code.google.com by [email protected] on 7 Nov 2011 at 5:58

Attachments:

@GoogleCodeExporter
Copy link
Author

It appears that it's the \FloatBarrier line that causes the paragraph break.  
You can add the following to the preamble of your document (between 
\documentclass{tufte-book} and \begin{document}) to see the effect:


\makeatletter
\renewenvironment{@tufte@margin@float}[2][-1.2ex]%
  {%\FloatBarrier% process all floats before this point so the figure/table numbers stay in order.
  \begin{lrbox}{\@tufte@margin@floatbox}%
  \begin{minipage}{\marginparwidth}%
    \@tufte@caption@font%
    \def\@captype{#2}%
    \hbox{}\vspace*{#1}%
    \@tufte@caption@justification%
    \@tufte@margin@par%
    \noindent%
  }
  {\end{minipage}%
  \end{lrbox}%
  \marginpar{\usebox{\@tufte@margin@floatbox}}%
  }
\makeatother

The primary side-effect of removing the \FloatBarrier line is that it opens the 
possibility of the floats being numbered out of sequence.  For example, the 
margin figure may be numbered 15, but a figure that was defined earlier and 
placed on the following page would be numbered 14.

You can, of course, issue the \FloatBarrier yourself at a point in the document 
where a paragraph break occurs naturally to prevent the misnumbered floats.  
(See the documentation for the placeins package for more details on 
\FloatBarrier: <http:https://ctan.org/pkg/placeins>.)

Please let me know if this resolves the issue.

Original comment by [email protected] on 15 Nov 2011 at 12:47

@GoogleCodeExporter
Copy link
Author

I'll give it a try; I'm familiar with the placeins package.
However, how does the TL class invoke the \floatbarrier command?
Only when a sidefigure is created?

Original comment by [email protected] on 15 Nov 2011 at 2:53

@GoogleCodeExporter
Copy link
Author

Yes. It only invokes \FloatBarrier when you create a marginfigure or 
margintable.

Original comment by [email protected] on 15 Nov 2011 at 6:14

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

1 participant