删除 fbox 缩进

删除 fbox 缩进

以下是我的问题的更新,显示了我的真实意思:

我想给我的小頁面。

\fbox缩进小页面,导致overfull hbox错误

\documentclass{beamer}
\usepackage{showframe}

\begin{document}

\begin{frame} %works fine
\begin{center}
a

\begin{minipage}{0.4\textwidth}
\hfill
b

\begin{minipage}{\textwidth}

\begin{itemize}
\item one
\end{itemize}
\end{minipage}
\end{minipage}
\hfill
\begin{minipage}{0.4\textwidth}
c

\begin{minipage}{\textwidth}

\begin{itemize}
\item two
\end{itemize}
\end{minipage}
\end{minipage}

d
\end{center}
\end{frame}

\begin{frame} %overfull hbox
\begin{center}
a

\begin{minipage}{0.4\textwidth}
\hfill
b

\fbox{\begin{minipage}{\textwidth}

\begin{itemize}
\item one
\end{itemize}
\end{minipage}}
\end{minipage}
\hfill
\begin{minipage}{0.4\textwidth}
c

\fbox{\begin{minipage}{\textwidth}

\begin{itemize}
\item two
\end{itemize}
\end{minipage}}
\end{minipage}

d
\end{center}
\end{frame}

\end{document}

答案1

以下是有和没有framed环境的几种解决方案:

\documentclass{article}
\usepackage[showframe]{geometry}
\usepackage{framed}

\begin{document}

\fbox{\begin{minipage}{0.4\textwidth} % fbox only for showing problem
% insert some tikz picture
\noindent
\fbox{\begin{minipage}{\dimexpr\linewidth-2\fboxsep-2\fboxrule}
some text
\end{minipage}}
\end{minipage}}
\hfill
\fbox{\begin{minipage}{0.4\textwidth} % fbox only for showing problem
% insert some tikz picture
\begin{framed}\begin{minipage}{\linewidth}
some other text
\end{minipage}\end{framed}
\end{minipage}}

\fbox{\begin{minipage}{0.4\textwidth} % fbox only for showing problem
% insert some tikz picture
\begin{minipage}{\linewidth}\begin{framed}
some other text
\end{framed}\end{minipage}
\end{minipage}}

\end{document} 

在此处输入图片描述

相关内容