Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

In page 181 of texdoc memoir,

The marginfigure and margintable environments can of course be adjusted using \setfloatadjustment, default

\setfloatadjustment{marginfigure}{\centering}
\setfloatadjustment{margintable}{\centering}

The default alignment is \centering. I want to justify the text of a margintable. But I don't know what the command for explicit justification, so I tried the following

\setfloatadjustment{margintable}{\raggedright}

Of course that is only flushed to the left, with a ragged right edge. How do I justify the text inside a margintable environment of the memoir class?

share|improve this question
add comment

1 Answer

up vote 2 down vote accepted

Use the ragged2e package and its \justifying macro.

EDIT: I should have guessed that memoir provides its own macro for the task: \flushleftright.

\documentclass{memoir}

% Variant A
% \usepackage{ragged2e}
% \setfloatadjustment{marginfigure}{\justifying}

% Variant B
\setfloatadjustment{marginfigure}{\flushleftright}

\usepackage{lipsum}

\begin{document}

\lipsum[1]

\begin{marginfigure}
\lipsum[1]
\end{marginfigure}

\end{document}

enter image description here

share|improve this answer
1  
it's nice to know that this can be done, but ragged was almost certainly used for a reason. just compare the appearance of the main text and the margin block, and you'll understand why. if your content really does naturally come out with good spacing in a justified environment, go with it, but look at the output with a critical eye before "freezing" it. that may mean resetting individual margin blocks selectively. –  barbara beeton Dec 11 '11 at 13:32
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.