Document ClassesBeamer+amspset: error

Information and discussion about specific document classes and how to create your own document classes.
Post Reply
tonguim
Posts: 24
Joined: Fri Nov 06, 2009 4:32 pm

Beamer+amspset: error

Post by tonguim »

Hi all,

I want to draw automatas in a beamer class document; this document contain latin-based (french) characters.

I use this command line to compile the document

Code: Select all

xelatex --shell-escape MyDocument.tex
as pdflatex doesn't works with vaucanson and pstricks packages.

How can I use beamer and amspset classes at the same time, in order to compile successfully the document, I mean to get the latin-based characters printed sucessfully? This is what I'm doing in a letterpaper classe based document, with this headline

Code: Select all

\documentclass[12pt,letterpaper,boxed]{amspset}
and the letterpaper class based document is printed successfully with the same command line

Code: Select all

xelatex --shell-escape MyDocument.tex
Actually using this command line

Code: Select all

xelatex --shell-escape MyDocument.tex
doesn't print the latin-based characters at all in the pdf document.

Thank you for helping.

Here is my document code:

Code: Select all

\documentclass[xcolor=pst,dvips]{beamer}{amspset}
\usepackage[utf8]{inputenc}
\usepackage[french]{babel}
\usepackage {textcomp}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{url}
\usepackage{graphicx}
\usepackage{xcolor}

\usepackage{vaucanson-g} %automates
\usepackage{pstricks} %automates

\usetheme{Warsaw}
\useinnertheme[shadow=true]{rounded}

\addtobeamertemplate{footline}{\insertframenumber/\inserttotalframenumber}

\setbeamercovered{transparent}

\title{Automates finis}

\date{\today}


\begin{document}

\maketitle

% --------- Sommaire ---------
\section*{Sommaire}
\begin{frame}\frametitle{Sommaire}
	\tableofcontents[hideallsubsections]
\end{frame}      
% ------------------------------

\section{Automates finis}
	\tableofcontents[currentsection, hideallsubsections]
	\subsection{Définitions}
		\begin{frame}{Automates finis}

		beaucoup d'application:
		-analyse lexicale des compilateurs: compilateur prog qui traduit un langage de haut niveau en un langage compréhensible par l'ordinateur;
		-edition de texte
		-résautique
		-compression d'image

		Soit 2 nombres binaires 100101 et 101110 et leur somme ainsi qu'il suit:
		 100101
		 101110
		------------
		1010011

			\begin{VCPicture}{(0,-2)(6,2)}
			% states
			\State[1]{(0,-3)}{A} \FinalState[2]{(3, -1)}{B} \State[3]{(6,-1)}{C} \State[4]{(9,-1)}{D} \State[5]{(12,-1)}{E}
						\FinalState[6]{(3,-5)}{F} \State[7]{(6,-5)}{G} \FinalState[8]{(9,-5)}{H}
			% initial--final
			\Initial{A}
			% transitions
			
			\EdgeL{A}{B}{\lambda}
			\LArcR{B}{C}{\lambda}
			\LArcR{C}{D}{a}
			\LArcR{D}{E}{b}
			\LArcR{E}{D}{b}
			\ArcR{D}{B}{\lambda}

			\LArcL{A}{F}{\lambda}
			\LArcL{F}{A}{\lambda}
			\LArcL{F}{G}{a}
			\LArcL{G}{F}{a}

			%\ArcR{A}{H}{b}
			\ncangles[angleA=-90, armA=3cm, angleB=-90,armB=0cm]{A}{H}{b}
			
			\end{VCPicture}

	\end{frame}
\end{document}

Recommended reading 2024:

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

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

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Beamer+amspset: error

Post by localghost »

I think that you neither have to give up your beamer presentation nor French accented characters nor the automata. And you necessarily don't have to rely on pstricks. The below code from my archives introduces not an automata but a flow chart done with pgf/tikZ that is revealed step by step. And it compiles with PDFLaTeX.

The example uses the selinput package from the oberdiek bundle for a semiautomatic determination of the input encoding. This is important for the accented characters.

Code: Select all

\documentclass[
  aspectratio=1610,
  smaller,
  professionalfonts,
  french
]{beamer}
%\usetheme{CambridgeUS}
\usepackage[T1]{fontenc}
\usepackage{selinput}
\SelectInputMappings{
  aacute={á},
  ccedilla={ç},
  Euro={€}
}
\usepackage{babel}
%\usepackage{cmbright}      % Sans serif font with math support
\usepackage[math]{iwona}    % Sans serif font with optional math support
\usepackage{tikz}
\usetikzlibrary{positioning,shapes.geometric}  % For automata the tikz library »automata« will be necessary

\begin{document}
  \begin{frame}
    \begin{columns}[t]
      \begin{column}{9cm}

        \begin{tikzpicture}[
          ->,
          shorten >=2pt,
          >=stealth,
          node distance=1cm,
          noname/.style={%
            ellipse,
            minimum width=5em,
            minimum height=3em,
            draw
          }
        ]
          \useasboundingbox (-5.3,0.65) rectangle (3.4,-6.65);
          \node[noname] (1)                                                 {1};
          \node<2->[noname] (2) [below=of 1]                                {2};
          \node<3->[noname] (3) [node distance=1cm and 3cm,below left=of 2] {3};
          \node<4->[noname] (4) [right=of 3]                                {4};
          \node<5->[noname] (5) [below=of 4]                                {5};
          \node<6->[noname] (6) [node distance=2cm,right=of 5]              {6};

          \path<2-> (1) edge                 node {} (2);
          \path<3-> (2) edge                 node {} (3);
          \path<4-> (2) edge                 node {} (4);
          \path<5-> (3) edge                 node {} (5);
          \path<5-> (4) edge                 node {} (5);
          \path<5-> (5) edge [bend right=21] node {} (2);
          \path<6-> (2) edge                 node {} (6);
        \end{tikzpicture}

      \end{column}
      \begin{column}{6cm}
        \begin{enumerate}
          \item Premier Objet
          \item<2-> Deuxième Objet
          \item<3-> Troisième Objet
          \item<4-> Quatrième Objet
          \item<5-> Et voilà!
          \item<6-> Içi la fin
        \end{enumerate}
    \end{column}
    \end{columns}
  \end{frame}
\end{document}
The principle for drawing automata with the according library is the same. For details please refer to the respective manuals (class as well as package).

Please disregard my French.

For a compilation with XeLaTeX you don't need to determine the input encoding explicitly. So, just drop (or comment) the inputenc package. It is only important that you save the source file with UTF-8 encoding. And for XeLaTeX you need to replace babel with polyglossia. See the package manual for details. Font specification for XeLaTeX is done by the fontspec package and enables LaTeX to use OpenType or TrueType fonts.

Nota bene:
You are using a non-standard class which besides is not listed on CTAN. It would be helpful if you attach it by upload to the forum server or at least give a link where to find it.


Thorsten
tonguim
Posts: 24
Joined: Fri Nov 06, 2009 4:32 pm

Beamer+amspset: error

Post by tonguim »

Thank you localghost for your answer. I choose then the replace Vaucason-g by tikz.
localghost wrote: Nota bene:
You are using a non-standard class which besides is not listed on CTAN. It would be helpful if you attach it by upload to the forum server or at least give a link where to find it.
Thorsten
I'm sorry, I didn't understood what do you want that I upload here.

Now I'm trying to draw an automata that has 2 states. Each state has 3 distincts loops. I was able to draw 2 loops around each state, but how to draw the third state around each state please?

This is the code:

Code: Select all

\documentclass[
      aspectratio=1610,
      smaller,
      professionalfonts,
      french
]{beamer}

\usetheme{Warsaw} 
\useinnertheme[shadow=true]{rounded}
\usepackage[T1]{fontenc}
\usepackage{selinput}
   \SelectInputMappings{
      aacute={á},
      ccedilla={ç},
      Euro={€}
    }
\usepackage{babel}
\usepackage[math]{iwona}    % Sans serif font with optional math support
\usepackage{tikz}

\usetikzlibrary{arrows,automata}

\addtobeamertemplate{footline}{\insertframenumber/\inserttotalframenumber}
\setbeamercovered{transparent}

\title{Automates finis}

\date{\today}

\begin{document}

\maketitle

% --------- Sommaire ---------
\section*{Sommaire}
	\begin{frame}\frametitle{Sommaire}
	%\tableofcontents[currentsection]
	%\tableofcontents[hideallsubsections]
	\tableofcontents[hideallsubsections]
	\end{frame}      
% ------------------------------

\section{Automates finis}

	\tableofcontents[currentsection, hideallsubsections]
	\subsection{Définitions}
      \begin{frame}
            \begin{tikzpicture}[->,>=stealth',shorten >=1pt,auto,node distance=2.8cm, semithick]
 								\node[initial,state] (A) {$q_a$};
\node[state] (B) [right of=A] {$q_b$};

\path
(A) edge [loop above] node {10/1} (A)
(A) edge [loop below] node {00/0} (A)
(A) edge [loop below] node {01/1} (A)

(A) edge [bend left] node {11/0} (B)
(B) edge [bend left] node {00/1} (A)

(B) edge [loop above] node {11/1} (B)
(B) edge [loop below] node {10/0} (B)
(B) edge [loop below] node {01/0} (B);
           \end{tikzpicture}
         \end{frame}
\end{document}
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Beamer+amspset: error

Post by localghost »

tonguim wrote:[…] I'm sorry, I didn't understood what do you want that I upload here. […]
I asked for the class file, that is to say the file called »amspset.cls«. You can attach it to your next post by upload to the forum server. But it's enough if you give a link where to find it.
tonguim wrote:[…] Now I'm trying to draw an automata that has 2 states. Each state has 3 distincts loops. I was able to draw 2 loops around each state, but how to draw the third state around each state please? […]
You can draw loops not only above and below a node, but also to the left or to the right.
Post Reply