\documentclass[DIV=13,%
BCOR=0mm,%
headinclude=false,%
footinclude=false,open=any,%
fontsize=10pt,%
oneside,%
paper=a5]%
{scrbook}
\usepackage[noautomatic]{imakeidx}
\usepackage{microtype}
\usepackage{graphicx}
\usepackage{alltt}
\usepackage{verbatim}
\usepackage[shortlabels]{enumitem}
\usepackage{tabularx}
\usepackage[normalem]{ulem}
\def\hsout{\bgroup \ULdepth=-.55ex \ULset}
% https://tex.stackexchange.com/questions/22410/strikethrough-in-section-title
% Unclear if \protect \hsout is needed. Doesn't looks so
\DeclareRobustCommand{\sout}[1]{\texorpdfstring{\hsout{#1}}{#1}}
\usepackage{wrapfig}
% avoid breakage on multiple
and avoid the next [] to be eaten
\newcommand*{\forcelinebreak}{\strut\\*{}}
\newcommand*{\hairline}{%
\bigskip%
\noindent \hrulefill%
\bigskip%
}
% reverse indentation for biblio and play
\newenvironment*{amusebiblio}{
\leftskip=\parindent
\parindent=-\parindent
\smallskip
\indent
}{\smallskip}
\newenvironment*{amuseplay}{
\leftskip=\parindent
\parindent=-\parindent
\smallskip
\indent
}{\smallskip}
\newcommand*{\Slash}{\slash\hspace{0pt}}
% http://tex.stackexchange.com/questions/3033/forcing-linebreaks-in-url
\PassOptionsToPackage{hyphens}{url}\usepackage[hyperfootnotes=false,hidelinks,breaklinks=true]{hyperref}
\usepackage{bookmark}
\usepackage{fontspec}
\usepackage{polyglossia}
\setmainlanguage{english}
\setmainfont{texgyrepagella-regular.otf}[Script=Latin,%
Ligatures=TeX,%
Path=/usr/share/texmf/fonts/opentype/public/tex-gyre/,%
BoldFont=texgyrepagella-bold.otf,%
BoldItalicFont=texgyrepagella-bolditalic.otf,%
ItalicFont=texgyrepagella-italic.otf]
\setmonofont{cmuntt.ttf}[Script=Latin,%
Ligatures=TeX,%
Scale=MatchLowercase,%
Path=/usr/share/fonts/truetype/cmu/,%
BoldFont=cmuntb.ttf,%
BoldItalicFont=cmuntx.ttf,%
ItalicFont=cmunit.ttf]
\setsansfont{cmunss.ttf}[Script=Latin,%
Ligatures=TeX,%
Scale=MatchLowercase,%
Path=/usr/share/fonts/truetype/cmu/,%
BoldFont=cmunsx.ttf,%
BoldItalicFont=cmunso.ttf,%
ItalicFont=cmunsi.ttf]
\newfontfamily\englishfont{texgyrepagella-regular.otf}[Script=Latin,%
Ligatures=TeX,%
Path=/usr/share/texmf/fonts/opentype/public/tex-gyre/,%
BoldFont=texgyrepagella-bold.otf,%
BoldItalicFont=texgyrepagella-bolditalic.otf,%
ItalicFont=texgyrepagella-italic.otf]
\renewcommand*{\partpagestyle}{empty}
% global style
\pagestyle{plain}
\usepackage{indentfirst}
% remove the numbering
\setcounter{secnumdepth}{-2}
% remove labels from the captions
\renewcommand*{\captionformat}{}
\renewcommand*{\figureformat}{}
\renewcommand*{\tableformat}{}
\KOMAoption{captions}{belowfigure,nooneline}
\addtokomafont{caption}{\centering}
\deffootnote[3em]{0em}{4em}{\textsuperscript{\thefootnotemark}~}
\addtokomafont{disposition}{\rmfamily}
\addtokomafont{descriptionlabel}{\rmfamily}
\frenchspacing
% avoid vertical glue
\raggedbottom
% this will generate overfull boxes, so we need to set a tolerance
% \pretolerance=1000
% pretolerance is what is accepted for a paragraph without
% hyphenation, so it makes sense to be strict here and let the user
% accept tweak the tolerance instead.
\tolerance=200
% Additional tolerance for bad paragraphs only
\setlength{\emergencystretch}{30pt}
% (try to) forbid widows/orphans
\clubpenalty=10000
\widowpenalty=10000
% given that we said footinclude=false, this should be safe
\setlength{\footskip}{2\baselineskip}
\title{Creating slides}
\date{2016}
\author{Marco Pessotto}
\subtitle{}
% https://groups.google.com/d/topic/comp.text.tex/6fYmcVMbSbQ/discussion
\hypersetup{%
pdfencoding=auto,
pdftitle={Creating slides},%
pdfauthor={Marco Pessotto},%
pdfsubject={},%
pdfkeywords={howto}%
}
\begin{document}
\begin{titlepage}
\strut\vskip 2em
\begin{center}
{\usekomafont{title}{\huge Creating slides\par}}%
\vskip 1em
\vskip 2em
{\usekomafont{author}{Marco Pessotto\par}}%
\vskip 1.5em
\vfill
{\usekomafont{date}{2016\par}}%
\end{center}
\end{titlepage}
\cleardoublepage
\tableofcontents
% start a new right-handed page
\cleardoublepage
Amusewiki, beside the usual output formats (HTML, EPUB, LaTeX, HTML),
is able to create slides in PDF via the Beamer package with LaTeX.
The slides feature is off by default, but you can easily activate it
in the admin console with the checkbox under “Formats”.
Now, given that you generally don't want slides for \emph{all} your texts,
you have to flag it accordingly. You can do so with the provided
checkbox in the text creation page, or simply adding the header
\begin{alltt}
\#slides yes
\end{alltt}
in the editing screen (i.e., in the \texttt{.muse} file).
It's important to note that the slide material must be placed inside a
section, no matter how deep.
Material at the beginning of the text, not belonging to any section,
is just ignored.
You can exclude sections of the documents from the slides by placing a
comment cookie in the excluded sections.
\begin{alltt}
*** this section will be excluded
; no slides
Here goes the lengthy explanation...
\end{alltt}
This is useful if you want to create slides and handout from the same
source (as you should).
Finally, when you have the document ready, you can change the theme,
the colors and the fonts adding it to the bookbuilder (using the
button in the text's infobox) and asking for slides.
\begin{figure}[p]
\centering
\includegraphics[keepaspectratio=true,height=0.75\textheight,width=\textwidth]{c-s-rebuild-1.png}
\end{figure}
\clearpage
When writing slides, you probably want to leverage the list syntax, e.g:
\begin{alltt}
*** Slide title
- first item
1. numbered items
2. second item
another :: item
**** Explanation
; no slides
Here goes the lengthy explanation...
\end{alltt}
\chapter{Full example}
% no slides
\begin{alltt}
** Activate
- Amusewiki can produce slides
- Activate it in the admin to enable them
- Flag the text accordingly with =\#slides yes=
*** Explanation
; no slides
See above, I won't repeat it here
** Syntax
- material must belong to a section
- keep the section short
- exclude sections with a ; no slides
comment cookie
*** Explanation
; no slides
Again, Here we can write something which doesn't end up in the slides.
See the produced formats.
** Bookbuilder
- Selection of theme, color and fonts
- slides rebuilding are available if you compile just one text
\end{alltt}
Produces this output:
\chapter{Activate}
\begin{itemize}
\item\relax
Amusewiki can produce slides
\item\relax
Activate it in the admin to enable them
\item\relax
Flag the text accordingly with \texttt{\#slides yes}
\end{itemize}
\section{Explanation}
% no slides
See above, I won't repeat it here
\chapter{Syntax}
\begin{itemize}
\item\relax
material must belong to a section
\item\relax
keep the section short
\item\relax
exclude sections with a \texttt{; no slides} comment cookie
\end{itemize}
\section{Explanation}
% no slides
Again, Here we can write something which doesn't end up in the slides.
See the produced formats.
% begin final page
\clearpage
% new page for the colophon
\thispagestyle{empty}
\begin{center}
\bigskip
\includegraphics[width=0.25\textwidth]{logo-amw.pdf}
\bigskip
\end{center}
\strut
\vfill
\begin{center}
Marco Pessotto
Creating slides
2016
\bigskip
\bigskip
\textbf{amusewiki.org}
\end{center}
% end final page with colophon
\end{document}
% No format ID passed.