Уменьшить размер и выровнять шрифт подписи с помощью memoir

Уменьшить размер и выровнять шрифт подписи с помощью memoir

Я пытаюсь уменьшить и лучше выровнять текст подписи (а не автоматическую метку "рисунок") с мемуарами. Я пробую этоэтотбезуспешно, и я ищу в документации мемуаров и пробую некоторые команды, тоже безуспешно.

Мой пример кода:

\documentclass[a4paper, 12pt,twoside, openright]{memoir}
\usepackage{polyglossia}
\setdefaultlanguage{french}
\usepackage{fontspec}
\usepackage[usenames,dvipsnames]{xcolor}
\usepackage[autostyle=true,french=guillemets,maxlevel=3]{csquotes}
\usepackage{xparse}
\usepackage{graphicx}
\usepackage[protrusion=true]{microtype}

\graphicspath{{FigureIntroduction/}}

\tolerance=1000

\sidecapmargin{outer}
\setsidecappos{t}

\makeatletter
%\renewcommand{\fnum@figure}[1]{\textbf{\figurename~\thefigure}}
\renewcommand{\fnum@figure}{\textbf{Figure~\thefigure~--}}
\makeatother

\captiondelim{\newline}
\captionstyle{\centerlastline}% for title
\setlength{\belowcaptionskip}{\onelineskip}
\setlength{\footnotesep}{\onelineskip}


\captionnamefont{\small}
\captiontitlefont{\small}



\begin{document}

\chapterstyle{bringhurst}

\begin{figure}[!h]
\begin{sidecaption}[fortoc]{Le "champignon informationnel" proposé par Frédéric Kaplan est révélateur de l'augmentation du champs d'expérimentation rendu possible par la numérisation des données, puis la simulation numérique.}[fig:I_Champi]
  %\resizebox*{\textwidth}{!}{\includegraphics{champignonKaplan.png}}
  \includegraphics[width=\linewidth]{champignonKaplan.png}
  \end{sidecaption}
\end{figure}

some text to compare ...some text to compare ...some text to compare ...some text to compare ...some text to compare ...some text to compare ...some text to compare ...some text to compare ...some text to compare ...some text to compare ...some text to compare ...some text to compare ...some text to compare ...some text to compare ...some text to compare ...some text to compare ...some text to compare ...some text to compare ...some text to compare ...some text to compare ...some text to compare ...some text to compare ...some text to compare ...some text to compare ...some text to compare ...some text to compare ...some text to compare ...some text to compare ...some text to compare ...some text to compare ...some text to compare ...some text to compare ...some text to compare ...some text to compare ...some text to compare ...some text to compare ...some text to compare ...some text to compare ...some text to compare ...some text to compare ...some text to compare ...some text to compare ...some text to compare ...some text to compare ...some text to compare ...some text to compare ...some text to compare ...some text to compare ...some text to compare ...some text to compare ...some text to compare ...some text to compare ...some text to compare ...some text to compare ...some text to compare ...some text to compare ...some text to compare ...some text to compare ...some text to compare ...some text to compare ...some text to compare ...some text to compare ...some text to compare ...some text to compare ...some text to compare ...some text to compare ...some text to compare ...some text to compare ...some text to compare ...some text to compare ...some text to compare ...some text to compare ...
some text to compare ...some text to compare ...some text to compare ...some text to compare ...some text to compare ...some text to compare ...some text to compare ...some text to compare ...some text to compare ...some text to compare ...
some text to compare ...some text to compare ...some text to compare ...some text to compare ...some text to compare ...some text to compare ...some text to compare ...some text to compare ...some text to compare ...some text to compare ...some text to compare ...some text to compare ...

\begin{figure}[!h]
\begin{sidecaption}[fortoc]{Le "champignon informationnel" proposé par Frédéric Kaplan est révélateur de l'augmentation du champs d'expérimentation rendu possible par la numérisation des donnéeeees, puis la simulation numérique.}[fig:Id_Champi]
  %\resizebox*{\textwidth}{!}{\includegraphics{champignonKaplan.png}}
  \includegraphics[width=\linewidth]{champignonKaplan.png}
  \end{sidecaption}
\end{figure}

some text to compare ...some text to compare ...some text to compare ...some text to compare ...some text to compare ...some text to compare ...some text to compare ...some text to compare ...some text to compare ...some text to compare ...some text to compare ...some text to compare ...some text to compare ...some text to compare ...some text to compare ...some text to compare ...some text to compare ...some text to compare ...some text to compare ...some text to compare ...some text to compare ...some text to compare ...some text to compare ...some text to compare ...some text to compare ...some text to compare ...some text to compare ...some text to compare ...some text to compare ...some text to compare ...some text to compare ...some text to compare ...some text to compare ...some text to compare ...some text to compare ...some text to compare ...some text to compare ...some text to compare ...some text to compare ...some text to compare ...some text to compare ...some text to compare ...some text to compare ...some text to compare ...some text to compare ...some text to compare ...some text to compare ...some text to compare ...some text to compare ...some text to compare ...some text to compare ...some text to compare ...

some text to compare ...

\end{document}

И результат:

введите описание изображения здесь

решение1

Макрос, который вы ищете \sidecapstyle, описан в разделе10.10.1 Настройки, стр. 199 документации memoir) с определением по умолчанию:

\newcommand*{\sidecapstyle}{%
%%%  \captionnamefont{\bfseries}%
  \ifscapmargleft
    \captionstyle{\raggedleft}%
  \else
    \captionstyle{\raggedright}%
  \fi}

Вы можете внести туда свои изменения:

\renewcommand*{\sidecapstyle}{%
  \ifscapmargleft
    \captionstyle{\justifying\scriptsize}%
  \else
    \captionstyle{\justifying\scriptsize}%
  \fi}

( \justifyingтребуется ragged2eпакет). Полный пример:

\documentclass[a4paper, 12pt,twoside, openright]{memoir}
\usepackage{polyglossia}
\setdefaultlanguage{french}
\usepackage{fontspec}
\usepackage[usenames,dvipsnames]{xcolor}
\usepackage[autostyle=true,french=guillemets,maxlevel=3]{csquotes}
\usepackage{xparse}
\usepackage{graphicx}
\usepackage[protrusion=true]{microtype}
\usepackage{ragged2e}
\usepackage{lipsum}

\sidecapmargin{outer}
\setsidecappos{t}

\makeatletter
\renewcommand{\fnum@figure}{\textbf{Figure~\thefigure~--}}
\makeatother

\captiondelim{\newline}

\renewcommand*{\sidecapstyle}{%
  \ifscapmargleft
    \captionstyle{\justifying\scriptsize}%
  \else
    \captionstyle{\justifying\scriptsize}%
  \fi}

\begin{document}

\chapterstyle{bringhurst}

\begin{figure}[!ht]
\begin{sidecaption}[fortoc]{Le "champignon informationnel" proposé par Frédéric Kaplan est révélateur de l'augmentation du champs d'expérimentation rendu possible par la numérisation des données, puis la simulation numérique.}[fig:I_Champi]
\includegraphics[width=\linewidth,height=5cm]{example-image-a}
\end{sidecaption}
\end{figure}
\lipsum[4]

\end{document}

введите описание изображения здесь

Обратите внимание, однако, что теперь вы можете получить (как показывает пример кода) плохой интервал в некоторых строках, поскольку пространство, зарезервированное для подписей, слишком узкое. Возможно, вам следует пересмотреть решение о выравнивании.

Связанный контент