由于图片太小,SCfigure 中的标题变窄

由于图片太小,SCfigure 中的标题变窄

在我的文档中,标题的宽度取决于图形的宽度:

  • 对于大图像,标题足够大

在此处输入图片描述

\begin{SCfigure}[][p!]
\begin{tikzpicture}[x=20mm,y=20mm]
\begin{axis}[
            std_empty,
            width = 70mm,
        %   height = 60mm,
            xmin = -2,
            xmax = 2.2,
            ymax=1.1,
                ]
\addplot[   const plot mark mid,
            ]
coordinates 
{   (-2,0)
    (-1.5,0.2)
    (-1,0.6)
    (-0.5,0.7)
    (0,0.95)
    (0.5,0.8)
    (1,0.4)
    (1.5,0.3)
    (2,0)
};
\addplot[   sharp plot,
            ]
coordinates 
{   (-2,0)
    (-1.5,0.2)
    (-1,0.6)
    (-0.5,0.7)
    (0,0.95)
    (0.5,0.8)
    (1,0.4)
    (1.5,0.3)
    (2,0)
};
\end{axis}
\end{tikzpicture}
\caption{Poligono di frequenza}
\end{SCfigure}
  • 但对于小书来说,可供标题使用的空间非常小。

在此处输入图片描述

\begin{SCfigure}[][hp!]
\begin{tikzpicture}

\chemfig{
    -[:20]
        (-[:80]?-[:35,0.75]OH)
    -[:-20]
    -[:60,0.75]
    -[:160]
    ?-[:-160]
    =[:-120,0.75]
    }

\end{tikzpicture}
    \caption{il norbornen-7-olo presenta un centro stereogenico non chirale}
\end{SCfigure}

为什么会发生这种情况?

编辑:正如所问,

\documentclass[a5paper,]{book}

\usepackage[rightcaption,]{sidecap} 
\usepackage{tikz}
\usepackage{chemfig}

\begin{document}

\begin{SCfigure}[][hp!]
\begin{tikzpicture}

\chemfig{
    -[:20]
        (-[:80]?-[:35,0.75]OH)
    -[:-20]
    -[:60,0.75]
    -[:160]
    ?-[:-160]
    =[:-120,0.75]
    }

\end{tikzpicture}
    \caption{il norbornen-7-olo presenta un centro stereogenico non chirale}
\end{SCfigure}

\end{document}

答案1

您可以使用以下方式控制图形和标题之间的空间\sidecaptionsep:...

\documentclass[a4paper]{article}

\usepackage{pgfplots}
\usepackage{sidecap}
\renewcommand\sidecaptionsep{2cm}
\usepackage[text={6in,9in},centering]{geometry}

\begin{document}

\begin{SCfigure}[][hp!]
\begin{tikzpicture}
\begin{axis}[axis lines=left,
        width = 70mm,
    %   height = 60mm,
        xmin = -2,
        xmax = 2.2,
        ymax=1.1,xtick=\empty,ytick=\empty
            ]
\addplot[const plot mark mid] coordinates { (-2,0) (-1.5,0.2) (-1,0.6) (-0.5,0.7) (0,0.95) (0.5,0.8) (1,0.4) (1.5,0.3) (2,0) };
\addplot[sharp plot] coordinates { (-2,0) (-1.5,0.2) (-1,0.6) (-0.5,0.7) (0,0.95) (0.5,0.8) (1,0.4) (1.5,0.3) (2,0) };
\end{axis}
\end{tikzpicture}
\caption{il norbornen-7-olo presenta un centro stereogenico non chirale}
\end{SCfigure}

\end{document}

在此处输入图片描述

相关内容