![\fbox 和 minipage 之间有一条垂直线?](https://linux22.com/image/290829/%5Cfbox%20%E5%92%8C%20minipage%20%E4%B9%8B%E9%97%B4%E6%9C%89%E4%B8%80%E6%9D%A1%E5%9E%82%E7%9B%B4%E7%BA%BF%EF%BC%9F.png)
\fbox
我使用的是 beamer 的一个模板。在一个框架中,左边 有一个minipage
,右边有一个。但是我觉得它很丑。所以我想如果我在这里加一条蓝色的竖线会更好。因为模板的主色调是蓝色。
For the .sty files, please download at http://www.ist.tugraz.at/staff/weiglhofer/misc/tugrazposter/
\documentclass[final,hyperref={pdfpagelabels=false}]{beamer}
\mode<presentation> {
\usetheme{TUGraz}
}
\usepackage{tikz}
\usepackage{pgflibraryshapes}
\usetikzlibrary{arrows}
\usetikzlibrary{shapes}
\usetikzlibrary{automata}
\tikzstyle{model_node}=[circle,draw=black,fill=tuggreen!50,minimum size=50pt]
\tikzstyle{tool}=[draw,double,rounded corners,inner sep=10pt]
\tikzstyle{aut_node}=[circle,draw=black,fill=black,inner sep=0pt,minimum size=7pt,font=\footnotesize]
\usefonttheme[onlymath]{serif}
\boldmath
\usepackage[orientation=portrait,size=a0,scale=1.4,debug]{beamerposter}
\begin{document}
\begin{block}{Primal Dual Algorithm{\color{block title.bg}p}}
\fbox{
\begin{minipage}[c]{0.48\textwidth}%
$\bullet$ Initialization: $\tau\sigma\le\frac{1}{\norm{K}^2}$,$\theta\in\sbra{0,1}$,$(x^0,y^0)\in X\times Y$,$\overline{x}^0 = x^0, \lambda \in \mathbb{R}$
$\bullet$ Iterations $n\ge 0$: Update $x^n, y^n$ as follows,
\begin{align*}
y^{n+1}&=(I+ \sigma \partial F^*)^{-1}(y^n+\sigma K \overline{x}^n) \\
x^{n+1}&=(I+\tau \lambda\partial G)^{-1}({x}^n-\tau K^*y^{n+1}) \\
\overline{x}^{n+1} &= x^{n+1}+\theta (x^{n+1}-x^{n})
\end{align*}
\end{minipage}
}
\hfill
\begin{minipage}{0.48\textwidth}
\centering
Online Primal-dual Algorithm:
\begin{equation*}
\left\{
\begin{array}{rl}
\widetilde{L}^{n+1}&=\frac{\avg{K(x^n-x^{n-1}),y^{n+1}-y^n}}{\norm{x^{n-1}-x^n}\norm{y^{n+1}-y^n}}\\
L^{n+1}&=\max\lbra{L^n,\widetilde{L}^{n+1}}\\
\tau^{n+1}&=\frac{a}{{L^{n+1}}}, \sigma^{n+2}=\frac{1}{a{L^{n+1}}} \\
\end{array}
\right.
\end{equation*}
\end{minipage}
\end{block}
\end{document}
答案1
使用minipage
右侧将会把物体推得太远。
这是一种可能性,注意规则是如何获得的
{\color{red}\vrule}
代码如下;调整间距以适应。
\documentclass[final,hyperref={pdfpagelabels=false}]{beamer}
%\mode<presentation> {
% \usetheme{TUGraz}
%}
\usepackage{tikz}
\usepackage{pgflibraryshapes}
\usetikzlibrary{arrows}
\usetikzlibrary{shapes}
\usetikzlibrary{automata}
\tikzstyle{model_node}=[circle,draw=black,fill=tuggreen!50,minimum size=50pt]
\tikzstyle{tool}=[draw,double,rounded corners,inner sep=10pt]
\tikzstyle{aut_node}=[circle,draw=black,fill=black,inner sep=0pt,minimum size=7pt,font=\footnotesize]
\usefonttheme[onlymath]{serif}
\boldmath
\usepackage[orientation=portrait,size=a0,scale=1.4,debug]{beamerposter}
\newcommand{\norm}[1]{\|#1\|}
\newcommand{\lbra}[1]{?#1?}
\newcommand{\sbra}[1]{?#1?}
\newcommand{\avg}[1]{?#1?}
\begin{document}
\vspace*{1cm}
\begin{block}{Primal Dual Algorithm{\color{block title.bg}p}}
\centering
\fbox{%
\begin{minipage}[c]{0.48\textwidth}%
$\bullet$ Initialization: $\tau\sigma\le\frac{1}{\norm{K}^2}$,$\theta\in\sbra{0,1}$,$(x^0,y^0)\in X\times Y$,$\overline{x}^0 = x^0, \lambda \in \mathbb{R}$
$\bullet$ Iterations $n\ge 0$: Update $x^n, y^n$ as follows,
\begin{align*}
y^{n+1}&=(I+ \sigma \partial F^*)^{-1}(y^n+\sigma K \overline{x}^n) \\
x^{n+1}&=(I+\tau \lambda\partial G)^{-1}({x}^n-\tau K^*y^{n+1}) \\
\overline{x}^{n+1} &= x^{n+1}+\theta (x^{n+1}-x^{n})
\end{align*}
\end{minipage}%
}
\qquad{\color{red}\vrule}\qquad
\begin{tabular}{@{}l@{}}
Online Primal-dual Algorithm:\\
$\displaystyle
\left\{
\begin{array}{rl}
\widetilde{L}^{n+1}&=\frac{\avg{K(x^n-x^{n-1}),y^{n+1}-y^n}}{\norm{x^{n-1}-x^n}\norm{y^{n+1}-y^n}}\\
L^{n+1}&=\max\lbra{L^n,\widetilde{L}^{n+1}}\\
\tau^{n+1}&=\frac{a}{{L^{n+1}}}, \sigma^{n+2}=\frac{1}{a{L^{n+1}}} \\
\end{array}
\right.
$
\end{tabular}\hspace*{\fill}
\end{block}
\end{document}