! LaTeX 错误:不在外部模式中。
我寻求一个解决方案,以便能够使 leftbar 环境中的这个图形起作用:
\documentclass[12pt]{article}
\usepackage{graphicx}
\usepackage{framed}
\begin{document}
\begin{leftbar}
\begin{figure}[h!]
\caption{Mean data points enclosed by shapes are contained within the same group, within 95\% confidence.}
\includegraphics[scale=0.7]{"../Data Analysis Files/InteractionPlotforTransLog10(X+1)Count"}
\end{figure}
\end{leftbar}
\end{document}
@Stefan Kottwitz,您的解决方案非常完美,但它确实引入了页面末尾裁剪的问题:
答案1
在图形环境中使用 leftbar。通过更改嵌套,您仍然可以让它浮动。如果您不需要浮动,则不需要图形环境:然后可以使用 caption 包(或 capt-of)来完成标题。
\begin{figure}[h!]
\begin{leftbar}
\caption{Mean data points enclosed by shapes are contained within the same group, within 95\% confidence.}
\includegraphics[scale=0.7]{"../Data Analysis Files/InteractionPlotforTransLog10(X+1)Count"}
\end{leftbar}
\end{figure}
没有 的解决方案figure
,因此您可以将它和其他所有内容放入外部leftbar
环境中:
\usepackage{caption}
...
\begin{leftbar}
\begin{minipage}{\columnwidth}
\captionof{figure}{Mean data points enclosed by shapes are contained within the same group, within 95\% confidence.}
\includegraphics[scale=0.7]{"../Data Analysis Files/InteractionPlotforTransLog10(X+1)Count"}
\end{minipage}