Here are a couple of options to get you started- of course, Paulo might provide better alternatives :)
makepowerdot.yaml
!config
# Make chapter files rule for arara
# author: Chris Hughes
# last edited by: cmh, Dec 2nd 2013
# http://tex.stackexchange.com/questions/148095/using-arara-to-compile-powerdot-twice
# requires arara 3.0+
identifier: makepowerdot
name: MakePowerdot
commands:
- <arara> latex "\def\powerdotmode{slides}\input{@{file}}"
- <arara> dvips @{getBasename(file)}.dvi -o @{getBasename(file)}.ps
- <arara> ps2pdf @{getBasename(file)}.ps
- <arara> @{ isWindows( "cmd /c move", "mv" ) } @{getBasename(file)}.pdf @{getBasename(file).concat('SLIDES')}.pdf
- <arara> latex "\def\powerdotmode{slidesnotes}\input{@{file}}"
- <arara> dvips @{getBasename(file)}.dvi -o @{getBasename(file)}.ps
- <arara> ps2pdf @{getBasename(file)}.ps
- <arara> @{ isWindows( "cmd /c move", "mv" ) } @{getBasename(file)}.pdf @{getBasename(file).concat('NOTES')}.pdf
arguments: []
If you compile the following file with arara
then this will give you both
demoSLIDES.pdf
demoNOTES.pdf
demo.tex
% arara: makepowerdot
\documentclass[mode=present,display=\powerdotmode]{powerdot}
\begin{document}
\begin{slide}{a slide}
Contents of the slide.
\end{slide}
\section{first section}
\begin{slide}{another slide}
Contents of the slide.
\end{slide}
\begin{note}{personal note}
The note.
\end{note}
\end{document}
Of course, you might want the choice to produce notes or slides, in which case you might prefer the following modification
makepowerdot.yaml
(modified)
!config
# Make chapter files rule for arara
# author: Chris Hughes
# last edited by: cmh, Dec 2nd 2013
# http://tex.stackexchange.com/questions/148095/using-arara-to-compile-powerdot-twice
# requires arara 3.0+
#
# Sample usage
#
# % arara: makepowerdot
# % arara: makepowerdot: {powerdotmode: slides}
# % arara: makepowerdot: {powerdotmode: slidesnotes}
#
identifier: makepowerdot
name: MakePowerdot
commands:
- <arara> latex "\def\powerdotmode{@{powerdotmode}}\input{@{file}}"
- <arara> dvips @{getBasename(file)}.dvi -o @{getBasename(file)}.ps
- <arara> ps2pdf @{getBasename(file)}.ps
- <arara> @{ isWindows( "cmd /c move", "mv" ) } @{getBasename(file)}.pdf @{getBasename(file)}@{powerdotmode.toUpperCase()}.pdf
arguments:
- identifier: powerdotmode
flag: <arara> @{parameters.powerdotmode}
default: slides
which can be used as
% arara: makepowerdot
which produces demoSLIDES.pdf
(and is the default)
% arara: makepowerdot: {powerdotmode: slides}
which also produces demoSLIDES.pdf
, or finally
% arara: makepowerdot: {powerdotmode: slidesnotes}
which produces demoSLIDESNOTES.pdf
. Of course, you can use a combination:
% arara: makepowerdot: {powerdotmode: slides}
% arara: makepowerdot: {powerdotmode: slidesnotes}
\documentclass[mode=present,display=\powerdotmode]{powerdot}
\begin{document}
\begin{slide}{a slide}
Contents of the slide.
\end{slide}
\section{first section}
\begin{slide}{another slide}
Contents of the slide.
\end{slide}
\begin{note}{personal note}
The note.
\end{note}
\end{document}