1

I am building a presentation using Beamer and the Fitch Natural Deduction package by Selinger.

I am trying to use the \onslide command. For some reason it doesn't work when I follow the syntax and use a parenthesis afterwards {}, but if I just write it as is. Here is a code I found that works:

\documentclass[10pt,pdf]{beamer}

\usepackage{fitch} 
\usepackage{amssymb}

\begin{document}

\begin{frame}
\frametitle {Working}

\[
\begin{nd}
\have {1} {p \rightarrow q} \by {premise} {}
    \open
\onslide<3->    \hypo {2} {\neg q}
        \open
\onslide<5->        \hypo {3} {p} 
\onslide<6->        \have {a} {p \rightarrow q} \r{1}
\onslide<7->        \have {4} {q}   \ie{3,a}
\onslide<8->        \have {5} {q \wedge \neg q} \ai{2,4}
\onslide<9->        \have {6} {\bot} 
        \close
\onslide<4->    \have {8} {\neg p} \ni {3-6}
    \close
\onslide<2-> \have {9} {\neg q \rightarrow \neg p} \pause \ii{2-8}

\end{nd}
\]
\end{frame}


\end{document}

A problem I am facing is the inability to use the \onslide<+->, meaing with the plus sign. Meaning if I change the onslide from 6 onwards - it doesn't show the lines in the order I want to, meaing instead of: \onslide<6-> \have {a} {p \rightarrow q} \r{1}

write this: \onslide<+-> \have {a} {p \rightarrow q} \r{1}

and so on with 7, 8, 9 - when complied the order changes completely.

Thank you for your help.

0

1 Answer 1

1

Note: In your example, I removed the call to \pause (what was it supposed to be used for)?

The <+> notation uses the beamerpauses counter (beamer user guide, p.90). To use this notation from 6th overlays, use \setcounter{beamerpause}{6}.

\documentclass[10pt,pdf]{beamer}
\usepackage{fitch} 
\usepackage{amssymb}
\begin{document}
\begin{frame}
  \frametitle {Working}
  
  \[
    \begin{nd}
      \onslide<1-> \have {1} {p \rightarrow q} \by {premise} {}
      \onslide<1-> \open
      \onslide<3->   \hypo {2} {\neg q}
      \onslide<3->   \open
      \onslide<4->     \hypo {3} {p} 
      \onslide<5->     \have {a} {p \rightarrow q} \r{1}
      \setcounter{beamerpauses}{6}
      \onslide<+->     \have {4} {q}   \ie{3,a}
      \onslide<+->     \have {5} {q \wedge \neg q} \ai{2,4}
      \onslide<+->     \have {6} {\bot} 
      \onslide<+->   \close
      \onslide<4->   \have {8} {\neg p} \ni {3-6}
      \onslide<4-> \close
      \onslide<2-> \have {9} {\neg q \rightarrow \neg p} \ii{2-8}
    \end{nd}
  \]
\end{frame}
\end{document}

enter image description here

2
  • Thank you very much! The \pause command was there because I wanted to justification to appear after another click. Is there an option for that? Also, do you think there is a way line number 7 will appear after line number 3? The line with the \bot.
    – Cantor
    Commented Mar 19, 2022 at 15:04
  • @Cantor You can adapt the overlay changes as you wish. Here I just show the use of the beamerpauses counter with +. Commented Mar 19, 2022 at 15:24

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .