Graphics, Figures & TablesTable placement in Beamer and pdf output

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
venik
Posts: 12
Joined: Thu Feb 01, 2007 2:11 am

Table placement in Beamer and pdf output

Post by venik »

Two questions:
1) I created a table in Beamer, but I cannot center it. It ignores \centering , \begin{center}..\end{center} and even hspace{-.2in} does not work. It seems that Beamer uses a rather coarse grid, since positioning the table horizontally using hspace does not work and then overshoots the mark, leaving part of the table invisible.

2) I did all this in Lyx (1.6.7, Linux 64 bit), but when I exported it to Latex and ran it again (to discover whether the problem is with Lyx or with Latex/Beamer), I found that figures that looked fine under Lyx were shifted vertically when I compiled the .tex file into pdf. Why is there a difference between what Lyx (which is only a GUI front to Latex) produces and what Latex outputs?

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

Stefan Kottwitz
Site Admin
Posts: 10344
Joined: Mon Mar 10, 2008 9:44 pm

Table placement in Beamer and pdf output

Post by Stefan Kottwitz »

Hi venik,

perhaps post a minimal working example showing the problem. Your description does not tell which tabular environment do you use and if you use a (floating) table environment.

Stefan
LaTeX.org admin
venik
Posts: 12
Joined: Thu Feb 01, 2007 2:11 am

Table placement in Beamer and pdf output

Post by venik »

Since I am not sure how to post Latex files, I shall paste it here. As you can see, the Latex was exported from Lyx, and the table is not floating (no sense in floating graphics in a Beamer presentation).
Thanks for your help

Code: Select all

Code, edit and compile here:
%% LyX 1.6.7 created this file. For more info, see http://www.lyx.org/.
%% Do not edit unless you really know what you are doing.
\documentclass[english]{beamer}
\usepackage{mathptmx}
\usepackage[T1]{fontenc}
\usepackage[latin9]{inputenc}
\usepackage{array}
\usepackage{amsmath}
\usepackage{amssymb}
\makeatletter
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% LyX specific LaTeX commands.
\newcommand{\noun}[1]{\textsc{#1}}
\DeclareRobustCommand*{\lyxarrow}{%
\@ifstar
{\leavevmode\,$\triangleleft$\,\allowbreak}
{\leavevmode\,$\triangleright$\,\allowbreak}}
%% Because html converters don't know tabularnewline
\providecommand{\tabularnewline}{\\}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Textclass specific LaTeX commands.
% this default might be overridden by plain title style
\newcommand\makebeamertitle{\frame{\maketitle}}%
\AtBeginDocument{
\let\origtableofcontents=\tableofcontents
\def\tableofcontents{\@ifnextchar[{\origtableofcontents}{\gobbletableofcontents}}
\def\gobbletableofcontents#1{\origtableofcontents}
}
\makeatletter
\long\def\lyxframe#1{\@lyxframe#1\@lyxframestop}%
\def\@lyxframe{\@ifnextchar<{\@@lyxframe}{\@@lyxframe<*>}}%
\def\@@lyxframe<#1>{\@ifnextchar[{\@@@lyxframe<#1>}{\@@@lyxframe<#1>[]}}
\def\@@@lyxframe<#1>[{\@ifnextchar<{\@@@@@lyxframe<#1>[}{\@@@@lyxframe<#1>[<*>][}}
\def\@@@@@lyxframe<#1>[#2]{\@ifnextchar[{\@@@@lyxframe<#1>[#2]}{\@@@@lyxframe<#1>[#2][]}}
\long\def\@@@@lyxframe<#1>[#2][#3]#4\@lyxframestop#5\lyxframeend{%
\frame<#1>[#2][#3]{\frametitle{#4}#5}}
\makeatother
\def\lyxframeend{} % In case there is a superfluous frame end
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% User specified LaTeX commands.
 
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Post Reply