Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

memoir's sdecaption

33 views
Skip to first unread message

Zarko Cucej

unread,
Jan 4, 2009, 8:02:53 PM1/4/09
to
Hi!

In two side text I like to use sideacption wider as it is set by default
to marginparwidth. This is easily to obtain with changes of values in
the macros \setsidecaps and \sidecapfloatwidth. Since the picture in
figure always start at left text border, on the even (verso page) pages
a caption text is over page border. Is there a way to push a picture to
the inner text border automatically (and with this move a caption text
inside of page) or even better to force the caption text will start on
the outer page border followed by box for picture? For example with some
extension of sidecaption environment?

Regards, Zarko

minimal example for demonstrate of the problem:

\documentclass{memoir}
\usepackage{calc}

\setlength{\marginparsep}{10mm}
\newlength\fsep
\setlength\fsep{2\fboxsep+2\fboxrule}

\captionnamefont{\small\sffamily\bfseries}
\captiontitlefont{\small\sffamily}
\setsidecaps{\marginparsep}{2\marginparwidth}
\renewcommand*{\sidecapfloatwidth}{\textwidth-\marginparwidth-\marginparsep}
\sidecapmargin{outer}

\begin{document}
some text some text some text some text some text some text some text
some text some text some text some text some text some text some text
some text some text some text some text some text some text some text
some text some text some text
\begin{figure}[h]
\begin{sidecaption}{Side caption x x x x x x x x x x x x x x x x x x x x
x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x
x x x x x}[fig:1]
\framebox{\parbox{\textwidth-\fsep}{\centering FIGURE}}
\end{sidecaption}
\end{figure}

\newpage
some text some text some text some text some text some text some text
some text some text some text some text some text some text some text
some text some text some text some text some text some text some text
some text some text some text
\begin{figure}[h]%\hfill
\begin{sidecaption}{Side caption x x x x x x x x x x x x x x x x x x x x
x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x
x x x x x}[fig:2]
\framebox{\parbox{\textwidth-\fsep}{\centering FIGURE}}
\end{sidecaption}
\end{figure}
\end{document}

Lars Madsen

unread,
Jan 5, 2009, 4:36:02 AM1/5/09
to Zarko Cucej

this might do it

\documentclass{memoir}
\usepackage{calc}

\setlength{\marginparsep}{10mm}
\newlength\fsep
\setlength\fsep{2\fboxsep+2\fboxrule}

\captionnamefont{\small\sffamily\bfseries}
\captiontitlefont{\small\sffamily}
\setsidecaps{\marginparsep}{2\marginparwidth}
\renewcommand*{\sidecapfloatwidth}{\textwidth-\marginparwidth-\marginparsep}
\sidecapmargin{outer}

\strictpagechecktrue%

\newcommand\ADJUSTMENT{\checkoddpage\ifoddpage\else\raggedleft\fi}


\begin{document}
some text some text some text some text some text some text some text
some text some text some text some text some text some text some text
some text some text some text some text some text some text some text
some text some text some text
\begin{figure}[h]

\ADJUSTMENT


\begin{sidecaption}{Side caption x x x x x x x x x x x x x x x x x x x
x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x
x x x x x x x x x}[fig:1]
\framebox{\parbox{\textwidth-\fsep}{\centering FIGURE}}
\end{sidecaption}
\end{figure}

\newpage
some text some text some text some text some text some text some text
some text some text some text some text some text some text some text
some text some text some text some text some text some text some text
some text some text some text
\begin{figure}[h]%\hfill

\ADJUSTMENT


\begin{sidecaption}{Side caption x x x x x x x x x x x x x x x x x x x x
x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x
x x x x x}[fig:2]
\framebox{\parbox{\textwidth-\fsep}{\centering FIGURE}}
\end{sidecaption}
\end{figure}
\end{document}


--

/daleif (remove RTFSIGNATURE from email address)

LaTeX FAQ: http://www.tex.ac.uk/faq
LaTeX book: http://www.imf.au.dk/system/latex/bog/ (in Danish)
Remember to post minimal examples, see URL below
http://www.tex.ac.uk/cgi-bin/texfaq2html?label=minxampl
http://www.minimalbeispiel.de/mini-en.html

Zarko Cucej

unread,
Jan 5, 2009, 8:39:56 PM1/5/09
to
Lars Madsen wrote:
> Zarko Cucej wrote:
>> Hi!
>>
>> In two side text I like to use sideacption wider as it is set by
>> default to marginparwidth. This is easily to obtain with changes of
>> values in the macros \setsidecaps and \sidecapfloatwidth. Since the
>> picture in figure always start at left text border, on the even (verso
>> page) pages a caption text is over page border. Is there a way to push
>> a picture to the inner text border automatically (and with this move a
>> caption text inside of page) or even better to force the caption text
>> will start on the outer page border followed by box for picture? For
>> example with some extension of sidecaption environment?
>>
>> Regards, Zarko
>>
>> minimal example for demonstrate of the problem:

[...]

Thank you very much! This work as desired!

regards, Zarko

Lars Madsen

unread,
Jan 6, 2009, 4:08:51 AM1/6/09
to

>
> Thank you very much! This work as desired!
>
> regards, Zarko

perhaps we should add something like this to memoir itself. I'll mail
Peter Wilson.

0 new messages