그림 아래 중앙에 캡션 삽입

그림 아래 중앙에 캡션 삽입

이를 수행할 수 있는 방법이 있습니까? 내 모든 것이 왼쪽 정렬되었습니다. 그러나 나는 그것들을 중앙에 두기를 원합니다. 어떻게 이루어 집니까?

관련 항목: 캡션을 모두 굵게 표시하려면 어떻게 해야 하나요?

\documentclass[a4paper,12pt,fleqn,titlepage]{report}
\usepackage[margin=2.0cm]{geometry}                % See geometry.pdf to learn the layout options. There are lots.
\geometry{letterpaper}                   % ... or a4paper or a5paper or ... 
%\geometry{landscape}                % Activate for for rotated page geometry
\usepackage[parfill]{parskip}    % Activate to begin paragraphs with an empty line rather than an indent
\usepackage{graphicx}
\usepackage{ulem}
\usepackage{mathtools}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{amsfonts}
\usepackage{epstopdf}
\usepackage{longtable}
\usepackage{color}
\usepackage{subfigure}
\usepackage{wrapfig}
\usepackage{pdfpages}
\usepackage{makecell}
\usepackage{caption}
\usepackage{titlesec}
\newcommand{\sectionbreak}{\clearpage}
\titleformat{\chapter}[display]
  {\normalfont\huge\bfseries}{\chaptertitlename\ \thechapter}{20pt}{\Huge}
\titlespacing*{\chapter}{0pt}{-30pt}{12pt}
\DeclareGraphicsRule{.tif}{png}{.png}{`convert #1 `dirname #1`/`basename #1 .tif`.png}
\renewcommand{\thefootnote}{\arabic{footnote}}
\usepackage[perpage,bottom]{footmisc}

\begin{document}

\begin{table}[h!]
\centering
\captionsetup{width=13cm}
\caption{Load of stuff above the table which is wider than the table, can use width to limit that as above but want it centralised, also might be numbers in here which means when I want to embolden the entire caption from the preamle so that it does it for all figures in my document that the numbers like this $n=1,2,3,4,5,6$ and $7$ will embolden too. If I put this in at the moment it looks like my actual text and so there is lttle way to discern between the two.}
\vspace{0.3cm}
\begin{tabular}{| l | l | l |}
\hline
Thing1 & Thing2 & Thing3 \\ \hline
blah1 & blah2 & blah3 \\ \hline
\end{tabular}
\label{table:stuff}
\end{table}

\end{document}

무엇이 무엇과 관련되어 있는지 잘 모르기 때문에 전문을 이해해 주시기 바랍니다. 전체 문서를 작성할 수 있도록 시간이 지남에 따라 이러한 내용이 수집되었으므로 모두 어느 시점에서 사용된다는 것만 알고 있습니다. 내가 그것들을 편집할 수 있기를 바랍니다...

그래서 저는 모든 캡션의 글꼴 크기를 전체적으로 강조하고, 중앙화하고, 글꼴 크기를 변경하는 방법을 원합니다. 중앙 집중화란 중앙 정렬을 의미하므로 캡션이 왼쪽 정렬되지 않습니다.

답변1

추가 패키지가 필요하지 않습니다. 로드 중이므로 caption해당 기능을 사용할 수 있습니다.

\documentclass[a4paper,12pt,fleqn,titlepage]{report}
\usepackage{caption}

\captionsetup{width=.75\textwidth,font={bf,scriptsize},skip=0.3cm,within=none}


\begin{document}

\chapter{Test}
\begin{table}
\centering
\caption{Load of stuff above the table which is wider than the table, can use width to limit that as above but want it centralised, also might be numbers in here which means when I want to embolden the entire caption from the preamle so that it does it for all figures in my document that the numbers like this $n=1,2,3,4,5,6$ and $7$ will embolden too. If I put this in at the moment it looks like my actual text and so there is lttle way to discern between the two.}
\begin{tabular}{| l | l | l |}
\hline
Thing1 & Thing2 & Thing3 \\ \hline
blah1 & blah2 & blah3 \\ \hline
\end{tabular}
\label{table:stuff}
\end{table}

\end{document}

여기에 이미지 설명을 입력하세요

답변2

이것이 당신이 찾고 있는 것에 더 가깝습니까? 첫 번째 테이블은 당신이 가지고 있던 것입니다. 두 번째는 를 사용하는 것입니다 boxhandler. 캡션 너비, 캡션 글꼴 크기 및 캡션의 일반 텍스트 굵기가 모두 서문에서 변경되었으며 모든 표와 그림에 적용됩니다. 캡션의 굵은 수학은 문서의 나머지 부분에서 변경하지 않고는 테이블 캡션에서 전체적으로 변경할 수 없습니다. 따라서 는 \mathbf수학을 사용하는 각 그림 캡션의 일부입니다. 내가 사용한 매개변수는 캡션 너비= .5\textwidth이고 캡션은 스크립트 크기로 굵게 표시되어 있습니다.

\documentclass[a4paper,12pt,fleqn,titlepage]{report}
\usepackage[margin=2.0cm]{geometry}                % See geometry.pdf to learn the layout options. There are lots.
\geometry{letterpaper}                   % ... or a4paper or a5paper or ... 
%\geometry{landscape}                % Activate for for rotated page geometry
\usepackage[parfill]{parskip}    % Activate to begin paragraphs with an empty line rather than an indent
\usepackage{graphicx}
\usepackage{ulem}
\usepackage{mathtools}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{amsfonts}
\usepackage{epstopdf}
\usepackage{longtable}
\usepackage{color}
\usepackage{subfigure}
\usepackage{wrapfig}
\usepackage{pdfpages}
\usepackage{makecell}
\usepackage{caption}
\usepackage{titlesec}
%
\usepackage{boxhandler}
\captionStyle{n}{c}
\constrainCaptionWidth{.5\textwidth}
\def\CaptionFontSize{\scriptsize\bfseries}
%
\newcommand{\sectionbreak}{\clearpage}
\titleformat{\chapter}[display]
  {\normalfont\huge\bfseries}{\chaptertitlename\ \thechapter}{20pt}{\Huge}
\titlespacing*{\chapter}{0pt}{-30pt}{12pt}
\DeclareGraphicsRule{.tif}{png}{.png}{`convert #1 `dirname #1`/`basename #1 .tif`.png}
\renewcommand{\thefootnote}{\arabic{footnote}}
\usepackage[perpage,bottom]{footmisc}

\begin{document}

\begin{table}[h!]
\centering
\captionsetup{width=13cm}
\caption{Load of stuff above the table which is wider than the table, can use width to limit that as above but want it centralised, also might be numbers in here which means when I want to embolden the entire caption from the preamle so that it does it for all figures in my document that the numbers like this $n=1,2,3,4,5,6$ and $7$ will embolden too. If I put this in at the moment it looks like my actual text and so there is lttle way to discern between the two.}
\vspace{0.3cm}
\begin{tabular}{| l | l | l |}
\hline
Thing1 & Thing2 & Thing3 \\ \hline
blah1 & blah2 & blah3 \\ \hline
\end{tabular}
\label{table:stuff}
\end{table}

\bxtable[ht]
{Load of stuff above the table which is wider than the table,
can use width to limit that as above but want it centralised, also might
be numbers in here which means when I want to embolden the entire
caption from the preamle so that it does it for all figures in my
document that the numbers like this $\mathbf{n=1,2,3,4,5,6}$ and
$\mathbf{7}$ will
embolden too. If I put this in at the moment it looks like my actual
text and so there is lttle way to discern between the two}
{
\begin{tabular}{| l | l | l |}
\hline
Thing1 & Thing2 & Thing3 \\ \hline
blah1 & blah2 & blah3 \\ \hline
\end{tabular}
}

\end{document}

여기에 이미지 설명을 입력하세요

답변3

사용\makebox[\textwidth]{}

\begin{table}[h!]
\centering
\makebox[\textwidth]{
\captionsetup{width=13cm}
\caption{Load of stuff above the table which is wider than the table, can use width to limit that as above but want it centralised, also might be numbers in here which means when I want to embolden the entire caption from the preamle so that it does it for all figures in my document that the numbers like this $n=1,2,3,4,5,6$ and $7$ will embolden too. If I put this in at the moment it looks like my actual text and so there is lttle way to discern between the two.}
\vspace{0.3cm}
\begin{tabular}{| l | l | l |}
\hline
Thing1 & Thing2 & Thing3 \\ \hline
blah1 & blah2 & blah3 \\ \hline
\end{tabular}}
\label{table:stuff}
\end{table}

관련 정보