两幅图以下的长文本

两幅图以下的长文本

在我的文档中,我想并排包含两个图(这部分我知道如何做)。在这两个图下方,我想包含一个长文本,以脚注大小显示,这是这两个图内的文本的翻译。问题是由于文本很长,页面无法显示它,无法footnotesize正常工作。这是我目前的代码:

\documentclass[12pt, times]{article}
\usepackage{UF_FRED_paper_style}

\begin{document}
\begin{figure}
\centering
\caption{My title}
{\includegraphics[width=0.49\textwidth]{fig1.jpeg}}
\hfill
{\includegraphics[width=0.49\textwidth]{fig2.jpeg}}
\textit{Source:} Origin \\
\textit{Translation:} 
\captionof{\footnotesize{Here I want to add a text with around 20 lines, justified, with the translation of what is inside the figures. 
But footnotesize is not working. 
What appears to me is the text with normal size, and it does not show all the text because there is no space for that in the page}}
\label{fig1}
\end{figure}
\end{document}

答案1

我认为没有必要发布两项\caption指令,或者,发布一项指令\caption和一份\captionof声明。

在此处输入图片描述

\documentclass[12pt]{article}
%\usepackage{UF_FRED_paper_style} % I don't have this file...
\usepackage[demo]{graphicx} % remove 'demo' option in real document

\usepackage{newtxtext,newtxmath} % optional: Times Roman text and math fonts

\begin{document}

\begin{figure}[hp]
\caption{Caption uses \texttt{\string\normalsize}}\label{fig1}

%% there's no need for a '\centering' directive.

\smallskip
\includegraphics[width=0.49\textwidth]{fig1}% % no need for 'jpeg' filename extension
\hfill
\includegraphics[width=0.49\textwidth]{fig2}

\smallskip\footnotesize

\textit{Source}: Origin.

\smallskip
\textit{Legend}: Here I add about twenty lines of text, justified, with 
an explanation of what is shown in the graphs. 
\verb+\footnotesize+ is working fine.
More text in footnotesize. More text in footnotesize. 
More text in footnotesize. More text in footnotesize. 
More text in footnotesize. More text in footnotesize. 
More text in footnotesize. More text in footnotesize. 
More text in footnotesize. More text in footnotesize. 
More text in footnotesize. More text in footnotesize. 
More text in footnotesize. More text in footnotesize. 
More text in footnotesize. More text in footnotesize. 
More text in footnotesize. More text in footnotesize. 
More text in footnotesize. More text in footnotesize. 
More text in footnotesize. More text in footnotesize. 
More text in footnotesize. More text in footnotesize. 
More text in footnotesize. More text in footnotesize.
\par

\end{figure}

A cross-reference to figure \ref{fig1}.
\end{document}

答案2

有多种方式来放置长文本:

  • 不幸的是我建议使用\footnote{}不起作用
  • @Mico 的想法很好,我认为,放一个图例
  • LaTeX提供了更多选项
  • 在这里我将展示使用tikz

关于我修改您的代码的一些评论:

  • 这个UF_FRED...包看起来不太知名,所以我把它丢掉了
  • graphicx应使用包;选项draft忽略缺失的图像
  • 我打电话\tikz{ }把文字
  • 里面只放了一个\node
  • 节点需要提供(空)文本,如下所示{your long text here};
  • [ .. ]您可以使用保存格式语句来修改节点的外观
  • text width=.8\textwidth
  • font=\small(或 \huge,或 \tiny 等等)
  • align=center; 看有关 pgfmanual 中的更多详细信息,请参阅 ch. 17.4.3

结果

\documentclass[12pt, times]{article}
    %\usepackage{UF_FRED_paper_style}% seems to be hardly known
\usepackage[draft]{graphicx}% for images; draft puts dummy boxes
\usepackage{tikz}

\begin{document}
 \begin{figure}
    \centering
    \caption{My title}
    {\includegraphics[width=0.49\textwidth]{fig1.jpeg}}
    \hfill
    {\includegraphics[width=0.49\textwidth]{fig2.jpeg}}
    \textit{Source:} Origin\\
    \textit{Translation:\\
        \tikz{
            \node[text width=.8\textwidth,font=\small,align=center] 
            {Here I want to add a text with 
            around 20 lines, justified, with the translation of what is inside 
            the figures. But footnotesize is not working.  What appears to me 
            is the text with normal size, and it does not show all the text 
            because there is no space for that in the page}% closing \node-text
            }% closing \tikz
        }% closing \textit 
    \label{fig1}
 \end{figure}
\end{document}

相关内容