J...S
I am using automata library of tikz and aobs-tikz to create overlays in beamer.
I am trying to make two slides, where a particular node has an attribute (`initial`) active in the first slide but not in the second slide.
I could use `alt=<2->{}{initial}` to make the `initial` attribute's effect visible only in the first slide.
(Got to know of `alt` thanks to [this](https://topanswers.xyz/tex?q=8083) answer.)
But since this is different from uncovering, the slide 'jumps' a little bit as we move from slide-1 to slide-2.
Is there a way to uncover the `initial` attribute only in the first slide while keeping it covered in the second slide?
Instead of making beamer behave in the second slide as if the `initial` attribute never existed.
This is what I have been trying:
```tex
\documentclass{beamer}
\usepackage{tikz}
\usetikzlibrary{automata}
\usetikzlibrary{positioning}
\usetikzlibrary{overlay-beamer-styles}
\begin{document}
\begin{frame}{Hi}
\begin{tikzpicture}
\node[{alt=<2->{}{initial}}, state] (a) {A};
\end{tikzpicture}
\end{frame}
\end{document}
```
And this is what I'm getting:

(By the way, what's a good way to make gif out of a beamer slide pdf? I tried `convert`.)
Top Answer
samcarter
Quick hack: you don't have to worry about your image jumping around if it has the same size on all overlays. To ensure this, draw an (invisible) rectangle which encompasses the whole image:
```
\documentclass{beamer}
\usepackage{tikz}
\usetikzlibrary{automata}
\usetikzlibrary{positioning}
\usetikzlibrary{overlay-beamer-styles}
\begin{document}
\begin{frame}
\frametitle{Hi}
\begin{tikzpicture}
\path (-2.2,-1) rectangle (1,1);
\node[{alt=<2->{initial}{}}, state] (a) {A};
\end{tikzpicture}
\end{frame}
\end{document}
```

Answer #2
samcarter
You could temporarily change the opacity of the `initial`:
```
\documentclass{beamer}
\usepackage{tikz}
\usetikzlibrary{automata}
\usetikzlibrary{positioning}
\usetikzlibrary{overlay-beamer-styles}
\begin{document}
\begin{frame}<1-2>
\frametitle{Hi}
\begin{tikzpicture}
\begin{scope}[
alt=<1>{
every initial by arrow/.style={opacity=0}
}{}
]
\node[
initial,
state,
] (a) {A};
\end{scope}
\end{tikzpicture}
\end{frame}
\end{document}
```
