Graphics, Figures & TablesCode for Report fails in Presentation

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
Saed Daoud
Posts: 14
Joined: Thu Jun 06, 2013 4:24 pm

Code for Report fails in Presentation

Post by Saed Daoud »

Hello everyone,

I have the following LaTeX code, which is perfectly working under the class report, but when I change the class report to beamer to make slides, I get errors. Why? I comment the beamer class and the commands associated with it.

Code: Select all

Code, edit and compile here:
\documentclass{report}
%\documentclass{beamer}
%\setbeamertemplate{navigation symbols}{}
%\setbeamercovered{transparent}
\usepackage[autostyle]{csquotes}
%\usepackage{beamerthemeshadow}
\usepackage{pst-sigsys}
\usepackage{setspace}
\usepackage{dsfont}
%\usepackage[top=2.3cm, bottom=2.5cm, left=2.5cm, right=2.5cm]{geometry}
\usepackage{enumerate}
\usepackage{amsmath}
%\usepackage{mathtools}
\usepackage{graphicx}
\usepackage[hang,scriptsize,bf]{caption}
\usepackage{lettrine}
\usepackage{amsfonts}
\usepackage[printonlyused]{acronym}
\usepackage{amssymb}
\usepackage{multirow}
\usepackage{pifont}
\usepackage{tikz}
\usepackage{epstopdf}
\usepackage{psfrag}
\usepackage{epsfig}
\usepackage[english]{babel}
\usepackage{longtable}
\usepackage{setspace}
\usepackage[autostyle]{csquotes}
\usepackage{fancybox}
%\usecolortheme{crane}
\usetikzlibrary{positioning}
\usetikzlibrary{shapes,arrows,fadings, shadows}
\usetikzlibrary{matrix}
\begin{document}
\tikzset{
table/.style={
matrix of nodes,
row sep=-\pgflinewidth,
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Thanks in advance for your help.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org
LaTeX Beginner's Guide LaTeX Cookbook LaTeX TikZ graphics TikZによるLaTeXグラフィックス
User avatar
localghost
Site Moderator
Posts: 9201
Joined: Fri Feb 02, 2007 12:06 pm

Code for Report fails in Presentation

Post by localghost »

Your code works fine for me with beamer on my own machine as well as on writeLaTeX.


Remarks:

Best regards and welcome to the board
Thorsten
How to make a "Minimal Example"
Board Rules
Avoidable Mistakes[/size]

¹ System: openSUSE 42.2 (Linux 4.4.52), TeX Live 2016 (vanilla), TeXworks 0.6.1
Saed Daoud
Posts: 14
Joined: Thu Jun 06, 2013 4:24 pm

Code for Report fails in Presentation

Post by Saed Daoud »

localghost wrote:Your code works fine for me with beamer on my own machine as well as on writeLaTeX.


Best regards and welcome to the board
Thorsten
Thanks for your replying and for the welcoming.

I tried it over and over again, I get 122 errors in the beamer, and this is the code I am trying to run as Latex->PS->PDF:

Code: Select all

Code, edit and compile here:
%\documentclass{report}
\documentclass{beamer}
\setbeamertemplate{navigation symbols}{}
\setbeamercovered{transparent}
\usepackage[autostyle]{csquotes}
\usepackage{beamerthemeshadow}
\usepackage{pst-sigsys}
\usepackage{setspace}
\usepackage{dsfont}
%\usepackage[top=2.3cm, bottom=2.5cm, left=2.5cm, right=2.5cm]{geometry}
\usepackage{enumerate}
\usepackage{amsmath}
\usepackage{mathtools}
\usepackage{graphicx}
\usepackage[hang,scriptsize,bf]{caption}
\usepackage{lettrine}
\usepackage{amsfonts}
\usepackage[printonlyused]{acronym}
\usepackage{amssymb}
\usepackage{multirow}
\usepackage{pifont}
\usepackage{tikz}
\usepackage{epstopdf}
\usepackage{psfrag}
\usepackage{epsfig}
\usepackage[english]{babel}
\usepackage{longtable}
\usepackage{setspace}
\usepackage[autostyle]{csquotes}
\usepackage{fancybox}
%\usecolortheme{crane}
\usetikzlibrary{positioning}
\usetikzlibrary{shapes,arrows,fadings, shadows}
\usetikzlibrary{matrix}
\begin{document}
\tikzset{
table/.style={
matrix of nodes,
row sep=-\pgflinewidth,
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Do you think it is a machine specific problem?

Thanks
User avatar
Johannes_B
Site Moderator
Posts: 4182
Joined: Thu Nov 01, 2012 4:08 pm

Re: Code for Report fails in Presentation

Post by Johannes_B »

Can you tell us your first error?
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.
Saed Daoud
Posts: 14
Joined: Thu Jun 06, 2013 4:24 pm

Code for Report fails in Presentation

Post by Saed Daoud »

Johannes_B wrote:Can you tell us your first error?
Please, run the above code in WriteLatex (it is above the code) and you will see it.
Saed Daoud
Posts: 14
Joined: Thu Jun 06, 2013 4:24 pm

Re: Code for Report fails in Presentation

Post by Saed Daoud »

I have a conference soon, and I need to resolve this issue as soon as possible to include this figure in my presentation. I appreciate your help.
User avatar
localghost
Site Moderator
Posts: 9201
Joined: Fri Feb 02, 2007 12:06 pm

Code for Report fails in Presentation

Post by localghost »

For the code in beamer you need to replace the ampersand (&) as alignment character in the matrix. This is due to the fact that the class messes a bit with the so called category codes (catcodes). The below example works in your presentation. I have made it a bit more minimal and optimized it here and there.

Code: Select all

Code, edit and compile here:
\documentclass[professionalfonts]{beamer}
\usepackage[T1]{fontenc}
\usepackage{fix-cm}
\usepackage{tikz}
\usetikzlibrary{matrix}
\tikzset{
table/.style={
row sep=-\pgflinewidth,
column sep=-\pgflinewidth,
nodes={
rectangle,
draw=black,
align=center
},
minimum height=1.5em,
text depth=0.5ex,
text height=2ex,
nodes in empty cells,
% every even row/.style={
% nodes={fill=gray!20}
% },
column 1/.style={
nodes={text width=2em,fill=gray!20,font=\bfseries,align=center}
},
column 2/.style={
nodes={text=red}
},
column 3/.style={
nodes={text=blue}
},
column 5/.style={
nodes={text=violet}
},
% row 6/.style={
% nodes={
% fill=gray!20,
% text=black,
% font=\bfseries
% }
% },
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
How to make a "Minimal Example"
Board Rules
Avoidable Mistakes[/size]

¹ System: openSUSE 42.2 (Linux 4.4.52), TeX Live 2016 (vanilla), TeXworks 0.6.1
Saed Daoud
Posts: 14
Joined: Thu Jun 06, 2013 4:24 pm

Re: Code for Report fails in Presentation

Post by Saed Daoud »

I really would like to thank you. Everything is OK now.
Post Reply