使用回憶錄縮小標題大小並調整標題字體

使用回憶錄縮小標題大小並調整標題字體

我嘗試減少並更好地對齊我的標題文字(而不是自動標籤“圖形”)文字與回憶錄。我試試這個沒有成功,我在回憶錄文件中搜索,並嘗試一些命令,也沒有成功。

我的範例程式碼:

\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}

在此輸入影像描述

但請注意,現在您可能會在某些行中得到(如範例程式碼所示)錯誤的間距,因為為標題保留的空間太窄。也許您應該重新考慮有關理由的決定。

相關內容