% !TEX TS-program = LuaLaTeX
% Copyright 2007 by Till Tantau
%
% This file may be distributed and/or modified
%
% 1. under the LaTeX Project Public License and/or
% 2. under the GNU Public License.
%
% See the file doc/licenses/LICENSE for more details.



\documentclass[ucs]{beamer}

%
% DO NOT USE THIS FILE AS A TEMPLATE FOR YOUR OWN TALKS�!!
%
% Use a file in the directory solutions instead.
% They are much better suited.
%


% Setup appearance:

\usetheme{Warsaw}

%\usefonttheme[onlylarge]{structurebold}
\setbeamerfont*{frametitle}{size=\normalsize,series=\bfseries}
\setbeamertemplate{navigation symbols}{}


% Standard packages

\usepackage[persian]{babel}
%\deftranslation[english]{Example}{مثال}
%\usepackage{times}
\usepackage{fontspec}

\setmainfont[Script=Arabic,Numbers=Arabic]{XB Zar}
\setsansfont[Script=Arabic,Numbers=Arabic]{XB Zar}
% Setup TikZ

\usepackage{tikz}
\usetikzlibrary{arrows}
\tikzstyle{block}=[draw opacity=0.7,line width=1.4cm]


% Author, Title, etc.

\title[یک نمونه کامل از اسلاید با استفاده از لوالاتک] 
{%
 چگونه با لوالاتک اسلاید بسازیم 
}

\author[امیدعلی]
{
 مهدی امیدعلی
}

\institute[پارسی‌لاتک]
{
تالار گفتگوی پارسی‌لاتک
}

\date[WABI 2006]
{کارگروه لواتک،  \LR{1389}}



% The main document

\begin{document}
\input{translator-basic-dictionary-Persian.dict}
\input{translator-bibliography-dictionary-Persian.dict}
\input{translator-environment-dictionary-Persian.dict}
\input{translator-months-dictionary-Persian.dict}
\input{translator-numbers-dictionary-Persian.dict}
\input{translator-theorem-dictionary-Persian.dict}
\begin{frame}
  \titlepage
\end{frame}

\begin{frame}{چشم‌انداز}
  \tableofcontents
\end{frame}


\section{مقدمه}

\subsection{مدل و مسأله}

\begin{frame}{بیمر چیست؟}
  به‌زودی متوجه خواهید شد!
\end{frame}

\begin{frame}[t]{ملزومات بیمر}
  \begin{block}{ورودی}
    \begin{itemize}
    \item یک \alert{ماتریس ورودی} $G$.
    \item  \alert{سطرهای} ماتریس \alert{مجزا} هستند.
    \item \alert{ستونهای} ماتریس هم  \alert{مستقل } هستند. 
    \end{itemize}
  \end{block}
  \begin{block}{خروجی}
    \begin{itemize}
    \item یک \alert{ماتریس ورودی} $G$.
    \item  \alert{سطرهای} ماتریس \alert{مجزا} هستند.
    \item \alert{ستونهای} ماتریس هم  \alert{مستقل } هستند. 
    \end{itemize}
  \end{block}
\end{frame}




\begin{frame}{می‌توانیم اسلاید تهیه کنیم}
  \begin{enumerate}
  \item \alert{نقصان اطلاعات.}
    \begin{itemize}
    \item این موضوع مسأله را \LR{NP}-سخت می‌کند \dots
    \item \dots حتی برای حالات محدود
    \end{itemize}
    \textcolor{green!50!black}{حل:}
    \begin{itemize}
    \item مفروضات بیشتر 
    \end{itemize}
  \item \alert{امکان ندارد}
    \begin{itemize}
    \item بند اول
    \item بند دوم
    \item بند سوم
    \end{itemize}
    \textcolor{green!50!black}{حل:}
    \begin{itemize}
    \item بند اول
    \item بند دوم
    \item<alert@1->
       بند سوم
    \end{itemize}
  \end{enumerate}
\end{frame}


\subsection{بخش دیگر}

\begin{frame}{استفاده از تیکز}
  \begin{enumerate}
  \item بند اول
  \item بند دوم
  \item بند سوم
  \end{enumerate}

\setLR
  \begin{tikzpicture}
    \useasboundingbox (0,1) rectangle (10,2);
    
    \draw[line width=2mm,dash pattern=on 1mm off 1mm]
      (0,1) -- (9.99,1) node[midway,above] {\RL{ماتریس ژنی}}
      (0,0.6666) -- (9.99,0.6666)
      (0,0.3333) -- (9.99,0.3333)
      (0,0) -- (9.99,0) node[midway,below] {\only<1>{\RL{بدون رنگ‌آمیزی}}};

    \begin{scope}[xshift=-.5mm]
      \only<2->
      {
        \draw[red,block]            (0,.5)   -- (4,.5)
          node[midway,below] {\RL{رنگ‌آمیزی}};
      }
        
      \only<3->
      {
        \draw[green!50!black,block] (2.5,.5)   -- (7,.5)
          node[pos=0.6,below] {\RL{رنگ‌آمیزی}};
      }

      \only<4->
      {
        \draw[blue,block]           (6.5,.5) -- (10,.5)
          node[pos=0.6,below] {\RL{رنگ‌آمیزی}};
      }
    \end{scope}
  \end{tikzpicture}
\setRL
\end{frame}

\begin{frame}{هدف اسلاید}
  \begin{enumerate}
  \item هدف اول
  \item هدف دوم
  \item<alert@1->مهمترین هدف
  \end{enumerate}

\setLR
  \begin{tikzpicture}
    \useasboundingbox (0,1) rectangle (10,2);

    \draw[line width=2mm,dash pattern=on 1mm off 1mm]
      (0,1) -- (9.99,1) node[midway,above] {\RL{ماتریس ژنی}}
      (0,0.6666) -- (9.99,0.6666)
      (0,0.3333) -- (9.99,0.3333)
      (0,0) -- (9.99,0) node[midway,below] {\only<1>{\RL{بدون رنگ‌آمیزی}}};

    \only<2->
    {
      \begin{scope}[xshift=-0.5mm]
        \draw[red,block] (0,.5)   -- (3,.5) 
          node[midway,below] {\RL{رنگ‌آمیزی}}
                         (8,.5) -- (9,.5);

        \draw[green!50!black,block]
          (3,.5)   -- (6,.5)
            node[pos=0.6,below] {\RL{رنگ‌آمیزی}}
          (6.4,.5)   -- (8,.5)
          (9,.5) -- (10,.5);

        \draw[blue,block] (6,.5) -- (6.4,.5)
          node[midway,below=5mm] {\RL{رنگ‌آمیزی}};
      \end{scope}
    }
  \end{tikzpicture}
\setRL
\end{frame}




\section{خبر خوش: لواتک}

\subsection{امکانات لواتک برای حروف‌چینی}

\begin{frame}{مثال}
 یک حالت خاص:
  \begin{itemize}
  \item بند اول
  \item بند دوم
  \item بند سوم؟
  \end{itemize}
  \begin{example}
\setLR
    \begin{columns}
      \column{.3\textwidth}
      $M\colon$
      \footnotesize
      \begin{tabular}{cccc}
        0 & 0 & 0 & 1 \\
        0 & 1 & 0 & 0 \\
        1 & 0 & 0 & 0 \\
        0 & 1 & 0 & 0 \\
        1 & 0 & 0 & 0 \\
        0 & 1 & 0 & 1 \\
        1 & 1 & 0 & 0 \\
        0 & 0 & 1 & 0 \\
        1 & 0 & 1 & 0
      \end{tabular}%
      \only<2>
      {%
        \begin{tikzpicture}
          \useasboundingbox (2.9,0);

          \draw [red, opacity=0.7,line width=1cm] (1.7 ,1.9) -- (1.7 ,-1.7);
          \draw [blue,opacity=0.7,line width=5mm] (0.85,1.9) -- (0.85,-1.7)
                                                  (2.55,1.9) -- (2.55,-1.7);
        \end{tikzpicture}
      }
      \column{.6\textwidth}
      \begin{overprint}
        \onslide<1>
        \RL{بدون رنگ‌آمیزی کامل}
        
        \onslide<2>
        \textcolor{blue!70!bg}{\RL{رنگ‌آمیزی کامل}}
        
        \textcolor{red!70!bg}{\RL{رنگ‌آمیزی کامل}}
        
        $\chi_{\operatorname{PP}}(M) = 2$.
        
      \end{overprint}
    \end{columns}
\setRL
  \end{example}
\end{frame}

\section*{جمع‌بندی}

\begin{frame}
  \frametitle<presentation>{جمع‌بندی}

  \begin{itemize}
  \item
    بند اول
  \item
   بند دوم
  \item
   بند سوم
  \end{itemize}
\end{frame}

\end{document}


