그림 캡션의 추가 단어 간격

그림 캡션의 추가 단어 간격

캡션에 추가 단어 간격이 있는 이유를 알 수 없습니다. 아마도 하위 수치 때문일까요? 도움을 주셔서 감사합니다.

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

\begin{figure}[H]
\centering
\begin{subfigure}[h]{.45\textwidth}
\centering
    \includegraphics[width=\textwidth]{beest} 
    \caption{ Strandbeest Janson, Theo; hacknmod.com/wp-content/uploads/2013/07/theo-jansen-strandbeest.jpg} 
    \label{beest}
    \end{subfigure}
    \hfill
    \begin{subfigure}[h]{.45\textwidth}
    \centering
    \includegraphics[width=\textwidth]{umbrella}
    \caption{Sample umbrella mechanism;  wiki.ece.cmu.edu/ddl/images/thumb/Umbrella-wikiFrontpage.jpg/500px-Umbrella-wikiFrontpage.jpg}
    \label{umbrella}
    \end{subfigure}
    \caption{}
    \label{}
\end{figure}

답변1

캡션 자료의 정렬을 양쪽 맞춤에서 비정형 오른쪽으로 변경해야 합니다. 이미 패키지를 로드하고 있으므로 subcaption명령을 실행하십시오.

\captionsetup[subfigure]{justification=raggedright}

이 지침을 전체 문서에 적용하려면 서문에 배치하고, 현재 \begin{figure}두 하위 그림에만 적용하려면 바로 뒤에 배치하세요.

url별도로, 패키지를 로드하고(옵션을 사용하여 hyphens) 지시문의 캡션에 URL 문자열을 포함하는 것이 좋습니다 \url. 그렇게 하면 LaTeX가 긴 URL 문자열 내에서 추가 줄 바꿈 가능성을 찾을 수 있습니다.

사소한 점: 세 가지 \centering지침은 모두 사용 가능한 각 너비를 차지하는 엔터티에 적용되므로 생략할 수 있습니다.

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

\documentclass{article}
\usepackage[demo]{graphicx} % omit 'demo' version in real document
\usepackage{subcaption}
\usepackage[hyphens]{url}
\begin{document}
\begin{figure}
\captionsetup[subfigure]{justification=raggedright}
\urlstyle{same}
%%%\centering
\begin{subfigure}[t]{.45\textwidth}
    %%%\centering
    \includegraphics[width=\linewidth]{beest} 
    \caption{ Strandbeest Janson, Theo; \url{hacknmod.com/wp-content/uploads/2013/07/theo-jansen-strandbeest.jpg}} 
    \label{beest}
\end{subfigure}
\hfill
\begin{subfigure}[t]{.45\textwidth}
    %%%\centering
    \includegraphics[width=\linewidth]{umbrella}
    \caption{Sample umbrella mechanism;  \url{wiki.ece.cmu.edu/ddl/images/thumb/Umbrella-wikiFrontpage.jpg/500px-Umbrella-wikiFrontpage.jpg}}
    \label{umbrella}
\end{subfigure}
\caption{}
\label{}
\end{figure}
\end{document}

관련 정보