Graphics, Figures & Tablesfloatrow | Setup for Captions in Margins beside Figures

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
abclatex
Posts: 17
Joined: Wed Nov 28, 2012 10:09 pm

floatrow | Setup for Captions in Margins beside Figures

Post by abclatex »

Hi guys,

I want to use captions beside figures (at margin) by floatrow. But the following codes only work in the even page (image 2) and not in the odd page (image 1). How to fix this problem?

codes:

Code: Select all

\documentclass[10pt,a4paper]{book}

% page layout
\usepackage[%
    left=2cm,
    right=7cm,
    top=2cm,
    bottom=2cm,
    textheight=25cm,
    textwidth=11cm,
    marginparsep=1cm,
    marginparwidth=5cm
    ]{geometry}

% Language settings
\usepackage[german,french]{babel}

% figures and the like:
\usepackage{graphicx}
\graphicspath{{fig/}}
\usepackage{caption}
\captionsetup[figure]{name={Figure.}}
\captionsetup{font={scriptsize,singlespacing},justification=RaggedRight,skip=2pt}
\usepackage{ifoddpage}
%or: \usepackage[strict]{changepage}
\usepackage{blindtext}

\usepackage{floatrow}
\floatsetup[widefigure]{margins=hangleft,capposition=beside,capbesideposition={top,left},floatwidth=\textwidth}

\begin{document}

\begin{figure*}
\includegraphics[width=11cm]{1.3.jpg}
\caption{Today, four necktie knots are in widespread use. They are the four-in-hand knot, the half-Windsor knot, the Windsor knot and the Pratt knot. The first three are classic necktie knots that have been used for a long time. The Pratt knot is a more recent necktie knot that was introduced to the public in 1989.}\label{fig:example}
\end{figure*}


Today, four necktie knots are in widespread use. They are the four-in-hand knot, the half-Windsor knot, the Windsor knot and the Pratt knot. The first three are classic necktie knots that have been used for a long time. The Pratt knot is a more recent necktie knot that was introduced to the public in 1989.

Below shows a comparison table of the four necktie knots, together with the bow tie. It helps you find the answer to the first question that may come up in your mind -- Which necktie knots do I need? Click the links on the left to see the instructions on tying a certain knot.

\clearpage
\begin{figure*}
\includegraphics[width=11cm]{1.3.jpg}
\caption{Today, four necktie knots are in widespread use. They are the four-in-hand knot, the half-Windsor knot, the Windsor knot and the Pratt knot. The first three are classic necktie knots that have been used for a long time. The Pratt knot is a more recent necktie knot that was introduced to the public in 1989.}\label{fig:example}
\end{figure*}

Today, four necktie knots are in widespread use. They are the four-in-hand knot, the half-Windsor knot, the Windsor knot and the Pratt knot. The first three are classic necktie knots that have been used for a long time. The Pratt knot is a more recent necktie knot that was introduced to the public in 1989.

Below shows a comparison table of the four necktie knots, together with the bow tie. It helps you find the answer to the first question that may come up in your mind -- Which necktie knots do I need? Click the links on the left to see the instructions on tying a certain knot.

\end{document}
image 1:
image 1.JPG
image 1.JPG (22.96 KiB) Viewed 6330 times
image 2:
image 2.JPG
image 2.JPG (25.44 KiB) Viewed 6330 times
I try to revise such codes as

Code: Select all

\usepackage{floatrow}
\floatsetup[widefigure]{margins=hangleft,capposition=beside,capbesideposition={top,left},floatwidth=\textwidth}
and not succeed right now.

If you have any advice, please let me know.

Thanks!

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

abclatex
Posts: 17
Joined: Wed Nov 28, 2012 10:09 pm

Re: floatrow | Setup for Captions in Margins beside Figures

Post by abclatex »

Still unsolved.
Post Reply