メモワールを使用してキャプションのサイズを縮小し、フォントを揃える

メモワールを使用してキャプションのサイズを縮小し、フォントを揃える

私はキャプションテキスト(自動ラベル「図」ではない)をメモワールと縮小し、よりよく揃えるようにしています。私はこれを試していますこれ成功しませんでした。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}

ここに画像の説明を入力してください

ただし、キャプション用に確保されているスペースが狭すぎるため、一部の行でスペースが適切に確保されない可能性があることに注意してください (サンプル コードが示すように)。おそらく、配置に関する決定を再検討する必要があります。

関連情報