Set the caption
template to be numbered and then you can cross-reference your figure:
\setbeamertemplate{caption}[numbered]
Your code:
\documentclass[final, 12pt]{beamer}
\usepackage[size=custom,width=120,height=120,scale=1.7,orientation=portrait]{beamerposter}
\usepackage[english]{babel}
\usepackage{graphicx}
\usepackage{wrapfig,color,pgf}
\usepackage{array,booktabs,tabularx,amsthm,multirow,amsmath}
\usepackage[absolute,overlay]{textpos}
\usepackage{fancybox}
\usepackage{mdframed}
\usepackage{tikz}
\usepackage{pifont}
\usepackage{multicol}
\usepackage{listings}
\setbeamertemplate{caption}[numbered]
\newenvironment<>{varblock}[2][\textwidth]{%
\setlength{\textwidth}{#1}
\begin{actionenv}#3%
\def\insertblocktitle{ \centering#2\par}%
\par%
\usebeamertemplate{block begin}}
{\par%
\usebeamertemplate{block end}%
\end{actionenv}}
\begin{document}
\begin{frame}
\begin{textblock}{}(0.2,6.2)%
\begin{varblock}[57cm]{}
\begin{figure}
\includegraphics{Figure/LB.jpg}
\caption{TExt}
\label{LB}
\end{figure}
\end{varblock}
\end{textblock}
\begin{textblock}{}(4.15,8.7)%
\begin{varblock}[28cm]{\textbf{Location B}}
Figure~\ref{LB} shows...
\end{varblock}
\end{textblock}
\end{frame}
\end{document}
You are already using TiKZ
, then you can use
\tikz[remember picture,overlay]{\draw[red, line width=1cm]%
([shift={(1cm,-1cm)}]current page.north west) rectangle%
([shift={(-1cm,1cm)}]current page.south east);}
to draw a rectangle around the poster. Of course you need to adjust line width
, color and corners (shift
) according your taste.
My first idea was just include previous command inside poster frame
, but How does beamer build the frame? shows that footline
is the last layer to be drawn and this is done inside \end{frame}
.
Therefore, anything you draw inside a \frame
can be overdrawn by footline
contents.
A solution for this problem could be to include previous TiKZ
command inside footline
template definition as following code shows. (Note: I've simplified the example and used original I6pd2 theme)
\documentclass[final]{beamer}
\usetheme{I6pd2}
\usepackage[english]{babel}
\usepackage[latin1]{inputenc}
\usefonttheme{serif}
\usepackage[orientation=portrait,size=a0,scale=1.4]{beamerposter}
\usepackage{tikz}
\providecommand\thispdfpagelabel[1]{}
\definecolor{darkgreen}{RGB}{0,100,0}
\definecolor{darkred}{RGB}{100,0,0}
\definecolor{darkblue}{RGB}{75,25,100}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\title{My poster}
\author{Me}
\institute[My institute]{A longer name for my institute}
\date{}
\setbeamertemplate{footline}{
\begin{beamercolorbox}[wd=\paperwidth]{upper separation line foot}
\rule{0pt}{2pt}
\end{beamercolorbox}
\leavevmode%
\begin{beamercolorbox}[ht=4ex,leftskip=1cm,rightskip=1cm]{author in head/foot}%
\texttt{http://www.texstackexchange.com}
\hfill
\texttt{xxxxxxxxxxxxx}
\vskip1ex
\end{beamercolorbox}
\vskip0pt%
\begin{beamercolorbox}[wd=\paperwidth]{lower separation line foot}
\rule{0pt}{2pt}
\end{beamercolorbox}
\tikz[remember picture,overlay]{\draw[red, thick] ([shift={(1cm,-1cm)}]current page.north west)rectangle([shift={(-1cm,1cm)}]current page.south east);}
}
\begin{document}
\begin{frame}
\end{frame}
![enter image description here](https://i.stack.imgur.com/wmxFn.png)
Update (20/04/2015)
Instead of repeating \setbeamertemplate
in your main file or changing it in theme file, another option could be \addtobeamertemplate
which works in this case.
Now the code is your code with border line inclusion and the result shows what I get with your theme file copied from Overleaf
\documentclass[final]{beamer}
%\usepackage{grffile}
\usepackage[framemethod=default]{mdframed}
\usepackage{showexpl}
\usetheme{I6pd2}
\usepackage[english]{babel}
\usepackage[latin1]{inputenc}
\usepackage{psfrag}
\usepackage{amsmath,amsthm, amssymb, latexsym}
%\usepackage{times}\usefonttheme{professionalfonts} % obsolete
\usefonttheme{serif}
\graphicspath{ {./img/} }
%\boldmath
\usepackage[orientation=portrait,size=a0,scale=1.4]{beamerposter}
% change list indention level
% \setdefaultleftmargin{3em}{}{}{}{}{}
\usepackage{tikz}
\providecommand\thispdfpagelabel[1]{}
%\usepackage{snapshot} % will write a .dep file with all dependencies, allows for easy bundling
\usepackage{pgfplots}
\usepackage{ragged2e}
\usepackage{array,booktabs,tabularx}
\newcolumntype{Z}{>{\centering\arraybackslash}X} % centered tabularx columns
\newcommand{\pphantom}{\textcolor{ta3aluminium}} % phantom introduces a vertical space in p formatted table columns??!!
\newcommand{\psihat}{\hat{\psi}}
\newcommand{\phihat}{\hat{\phi}}
\newcommand{\rt}{(\mathbf{r},t)}
\newcommand{\xt}{(x,t)}
\newcommand{\ket}[1]{\ensuremath{|#1\rangle}\xspace}
\newcommand{\bra}[1]{\ensuremath{\langle #1|}\xspace}
\newcommand{\elemm}[3]{\ensuremath{\bra{#1}#2\ket{#3}}\xspace}
\newcommand{\braket}[2]{\ensuremath{\langle #1|#2\rangle}\xspace}
\newcommand\psfragg[2]{\psfrag{#1}{\small #2}}
\newcommand\psfraggg[2]{\psfrag{#1}{\footnotesize #2}}
\newcommand\psfragggg[2]{\psfrag{#1}{\scriptsize #2}}
\newcommand\psfraggggg[2]{\psfrag{#1}{\tiny #2}}
\definecolor{darkgreen}{RGB}{0,100,0}
\definecolor{darkred}{RGB}{100,0,0}
\definecolor{darkblue}{RGB}{75,25,100}
\listfiles
\definecolor{darkgreen}{RGB}{0,100,0}
\newcommand{\myref}[5]{\textcolor{darkgreen}{{\footnotesize [#1 \textit{et al.} #2 \textbf{#3}, #4 (#5)]}}}
\newcommand{\myrefarxiv}[1]{\textcolor{darkgreen}{{\footnotesize [arXiv #1]}}}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\title{My title}
\author{My name and coauthors}
\institute[A shorter name for my institute]{My institute}
\date{}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\newlength{\columnheight}
\setlength{\columnheight}{105cm}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%% This is the modified template. It needs two runs.
\addtobeamertemplate{footline}{}{
\tikz[remember picture,overlay]{\draw[red, thick] ([shift={(1cm,-1cm)}]current page.north west)rectangle([shift={(-1cm,1cm)}]current page.south east);}
}
\begin{document}
\begin{frame}
\begin{columns}
% ---------------------------------------------------------%
% Set up a column
\begin{column}{.33\textwidth}
\begin{beamercolorbox}[center,wd=\textwidth]{postercolumn}
\begin{minipage}[T]{.98\textwidth}
\parbox[t][\columnheight]{\textwidth}{
% ---------------------------------------------------------%
% fill each column with content
\begin{block}{}
\end{block}
\begin{block}{}
\end{block}
\begin{block}{}
\end{block}
\begin{block}{}
\end{block}
}
\end{minipage}
\end{beamercolorbox}
\end{column}
% ---------------------------------------------------------%
% end the column
% ---------------------------------------------------------%
% Set up a column
\begin{column}{.33\textwidth}
\begin{beamercolorbox}[center,wd=\textwidth]{postercolumn}
\begin{minipage}[T]{.98\textwidth}
\parbox[t][\columnheight]{\textwidth}{
% ---------------------------------------------------------%
% fill each column with content
\begin{block}{}
\end{block}
\begin{block}{}
\end{block}
\vspace{0.5cm}
\begin{mdframed}[style=innerleftmargin=20pt,innerrightmargin=20pt, innertopmargin=0pt, skipabove=0pt,skipbelow=0pt, linewidth=2pt]%
\usebeamerfont{block body}%
\begin{beamercolorbox}[leftskip=1em,colsep*=.0ex,sep=0.5ex,vmode]{block body}%
\end{beamercolorbox}
\end{mdframed}%
\vfill
}
% ---------------------------------------------------------%
% end the column
\end{minipage}
\end{beamercolorbox}
\end{column}
% ---------------------------------------------------------%
% ---------------------------------------------------------%
% Set up a column
\begin{column}{.33\textwidth}
\begin{beamercolorbox}[center,wd=\textwidth]{postercolumn}
\begin{minipage}[T]{.98\textwidth}
\parbox[t][\columnheight]{\textwidth}{
% ---------------------------------------------------------%
% fill each column with content
\begin{block}{}
\end{block}
\begin{block}{}
\end{block}
\begin{block}{}
\end{block}
}
% ---------------------------------------------------------%
% end the column
\end{minipage}
\end{beamercolorbox}
\end{column}
% ---------------------------------------------------------%
\end{columns}
\end{frame}
\end{document}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%% Local Variables:
%%% mode: latex
%%% TeX-PDF-mode: t
%%% End:
![enter image description here](https://i.stack.imgur.com/AtW7Q.png)
Best Answer
When TeX complains about an "Illegal parameter number in definition", it has just read a macro parameter character
#
that either isn't followed by1
,2
, ...9
, or the used number is outside of the parameter range of the current definiton. (In your document this definition is hidden somwhere in theblock
environment.)As you are trying to typeset a literal
#
character in this case, e.g. in#zhu
, just escape it as\#
.