付録のキャプション設定を変更するにはどうすればいいですか?

付録のキャプション設定を変更するにはどうすればいいですか?

私は付録付きの論文を書いています (修士論文用)。論文ではキャプションを左揃えにしたいのですが、付録ではキャプションを中央揃えにする必要があります。論文では、序文で次の設定を使用しました。

\captionsetup{format=plain, labelfont={bf,it},textfont=it,skip=6pt,font=small, singlelinecheck=off}

しかし、付録ではキャプションを中央に配置したいので、キャプション設定のコマンドを次のように更新してみました。

\renewcommand\captionsetup{format=plain, labelfont={bf,it},textfont=it,skip=6pt,font=small, singlelinecheck=on}

そこで、singlelinecheck を「オン」にします。しかし、動作しません。

これはどのように動作するのでしょうか? 私は LaTeX の初心者なので、renew コマンドを理解していないだけかもしれません。

よろしくお願いします!

私はレポートをメイン ファイルに分割し、このファイルに、個別のファイルであるすべての章を追加しました。このようにすると、おそらく不可能になるのでしょうか? これはメイン ファイル (の要約) です。

\documentclass[10pt, mathptmx,a4paper,twoside]{article}
\usepackage{Packages}
\setlength\columnsep{20pt}
\author{Anne Derks\,}
\title{Master Thesis Sandwich Panels}
\input{Input_titlepage}
\captionsetup{format=plain, labelfont={bf,it},textfont=it,skip=6pt,font=small, singlelinecheck=off}

\begin{document}
\include{Titlepage}
\setcounter{page}{0}
\pagenumbering{roman}
\newpage
\begin{flushleft}
\large\textbf{PREFACE}\\
\addcontentsline{toc}{section}{PREFACE}
\normalsize
\lipsum[1]
\end{flushleft}

\newpage
\renewcommand{\contentsname}{CONTENTS}
\tableofcontents

\newpage
\setcounter{page}{0}
\pagenumbering{arabic}  
\end{flushleft}
 
\vspace{60pt}

\begin{flushleft}
\textbf{ABSTRACT:} 
\hfill 
\\
\vspace{12pt}

\textbf{KEYWORDS:} \hspace{1mm} Sandwich Panels, Geometric Non-Linear Buckling, Connection Failure.
\end{flushleft}
 \vspace{24pt}

\begin{multicols}{2}
\section{INTRODUCTION}\label{section:Introduction}
\input{Chapters/Chapter1_Introduction}  

\section{THEORETICAL BACKGROUND}\label{section:Literature}
\input{Chapters/Chapter2_Literature}            

\section{ANALYTICAL MODEL}\label{section:Analytical_model}
\input{Chapters/Chapter3_AnalyticalModel}   

\renewcommand\refname{REFERENCES}
\bibliographystyle{unsrt}
\bibliography{references}
\addcontentsline{toc}{section}{REFERENCES}
\end{multicols}

\newpage
\appendix
\addcontentsline{toc}{section}{APPENDIX}
\counterwithin{figure}{section}
\counterwithin{table}{section}

\captionsetup{format=plain, labelfont={bf,it},textfont=it,skip=6pt,font=small, singlelinecheck=on}

\newpage
\section{Drawings Cembrit Cetris Basis tests}
\label{Appendix:Cembrit}
\input{Appendices/AppendixH_Cembrit_drawings}

\captionsetup{format=plain, labelfont={bf,it},textfont=it,skip=6pt,font=small, singlelinecheck=off}

\newpage
\section{Results sandwich panel test}
\input{Appendices/AppendixL_Panel_results}

\end{document}

答え1

\renewcommandコマンドを更新するために使用されます。あなたの場合は、コマンドを更新したいのではなく、適用したいのです。したがって、削除しても\renewcommand問題ないはずです。

\captionsetup次の MWE に示すように、ドキュメント内で複数回使用することも可能です。

\documentclass{article}
\usepackage{graphicx,subcaption}
\captionsetup{format=plain, labelfont={bf,it},textfont=it,skip=6pt,font=small,singlelinecheck=off}% Setup for main part
\begin{document}
\begin{figure}% figure in main part
    \centering \includegraphics[width=2cm]{example-image-duck} \caption{First caption.}
\end{figure}
% adapt setup for appendix:
\captionsetup{format=plain, labelfont={bf,it},textfont=it,skip=6pt,font=small,singlelinecheck=on}
\begin{figure}% figure in appendix
    \centering \includegraphics[width=2cm]{example-image-duck} \caption{Second caption.}
\end{figure}
% adapt setup for second part of appendix:
\captionsetup{format=plain, labelfont={bf,it},textfont=it,skip=6pt,font=small,singlelinecheck=off}
\begin{figure}% figure in second part of appendix
    \centering \includegraphics[width=2cm]{example-image-duck} \caption{Third caption.}
\end{figure}
\end{document}

結果

コメント後に編集

申し訳ありませんが、あなたのファイルがすべて揃っているわけではないので、あなたのコードから何か意味のあるものを得るのは非常に困難です。あなたのコードを MWE に縮小しようとしても、まだ動作します。

\documentclass[10pt, mathptmx,a4paper,twoside]{article}
\usepackage{subcaption,lipsum,multicol,graphicx}

\captionsetup{format=plain, labelfont={bf,it},textfont=it,skip=6pt,font=small, singlelinecheck=off}

\begin{document}
 
\begin{figure} %%%%%%%%%%%%%%%%%%%%% HERE %%%%%%%%%%%%%%%%%%%%%
    \centering
    \includegraphics[height=2cm]{example-image-a}
    \caption{First image}
\end{figure}
\begin{multicols}{2}
\section{INTRODUCTION}\label{section:Introduction}
\lipsum[1]

\section{THEORETICAL BACKGROUND}\label{section:Literature}
\lipsum[1]         

\section{ANALYTICAL MODEL}\label{section:Analytical_model}
\lipsum[1]

\end{multicols}

\newpage
\appendix
\addcontentsline{toc}{section}{APPENDIX}
\counterwithin{figure}{section}
\counterwithin{table}{section}

\captionsetup{format=plain, labelfont={bf,it},textfont=it,skip=6pt,font=small, singlelinecheck=on}


\newpage
\section{Drawings Cembrit Cetris Basis tests}
\label{Appendix:Cembrit}
\lipsum[1]
\begin{figure} %%%%%%%%%%%%%%%%%%%%% HERE %%%%%%%%%%%%%%%%%%%%%
    \centering
    \includegraphics{example-image-a}
    \caption{First image}
\end{figure}

\captionsetup{format=plain, labelfont={bf,it},textfont=it,skip=6pt,font=small, singlelinecheck=off}
\begin{figure} %%%%%%%%%%%%%%%%%%%%% HERE %%%%%%%%%%%%%%%%%%%%%
    \centering
    \includegraphics{example-image-a}
    \caption{First image}
\end{figure}
\newpage
\section{Results sandwich panel test}
\lipsum[1]

\end{document}

結果

関連情報