Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

In my beamer poster, I like to give caption for images and cross reference that in writing like my thesis ("Figure 2.1: Text" like this)

enter image description here.

But when I use the following code, I found ("Figure: Text" Like this)

enter image description here

and in the cross reference position shows "Fig.1". -I like to write the caption like "Figure A: Text" and in writing cross reference it like "(Fig. A)". Is it possible to do?

\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}


\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}}
\ref{LB} shows...
\end{varblock}
\end{textblock}

\end{frame}
\end{document}
share|improve this question
add comment

1 Answer

up vote 2 down vote accepted

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}
share|improve this answer
    
It works....thank you. –  Mahzabin May 16 '12 at 22:35
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.