Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

LaTeX What is wrong in this Latex code?

Tags:
  1. Jun 5, 2013 #1
    Hi,

    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?

    Code (Text):
    \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,
            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
                %}
            %},
                    row 5/.style={
                nodes={
                    fill=black,
                    text=white,
                                    align=left,
                    font=\bfseries
                }
            },
        }
    }


    %\begin{frame}
    %\frametitle{Combining Scheme}
    \begin{figure}
    \begin{center}
    \begin{tikzpicture}

    \matrix (first) [table,text width=6em]
    {
    $\mathbf{x}^{(1)}$   & $x_0^{(1)}$            & $x_1^{(1)}$ & $\cdots$ & $x_{N-1}^{(1)}$ \\
    $\mathbf{x}^{(2)}$   & $x_0^{(2)}$            & $x_1^{(2)}$ & $\cdots$ & $x_{N-1}^{(2)}$ \\
    $\vdots$             & $\vdots$               & $\vdots$    & $\ddots$ & $\vdots$ \\
    $\mathbf{x}^{(M)}$   & |[name=a1]|$x_0^{(M)}$ & |[name=a2]|$x_1^{(M)}$ & $\cdots$ & |[name=a3]|$x_{N-1}^{(M)}$ \\[10mm]
                         & |[name=b1]| & |[name=b2]|&  & |[name=b3]| \\[10mm]
    $\mathbf{x}^{(R)}$   & |[name=c1]|$x_0^{(R)}$ & |[name=c2]|$x_1^{(R)}$ & $\cdots$ & |[name=c3]|$x_{N-1}^{(R)}$ \\
    };
    \draw[->,thick] (a1) edge (b1);
    \draw[->,thick] (b1) edge (c1);
    \draw[->,thick] (a2) edge (b2);
    \draw[->,thick] (b2) edge (c2);
    \draw[->,thick] (a3) edge (b3);
    \draw[->,thick] (b3) edge (c3);

    \end{tikzpicture}
    \end{center}
    \end{figure}
    %\end{frame}

    \end {document}
    I comment the beamer class and the commands associated with it.

    Thanks in advance for your help
     
  2. jcsd
  3. Oct 11, 2014 #2
    Your code works for me. I got no error messages with MikTeX 2.9 using TeXStudio.
     
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook




Loading...