\documentclass[svgnames,letterpaper]{l3doc}

\hypersetup{urlcolor = teal, filecolor = violet}
\hologoFontSetup{general = \sffamily}
\usepackage[mono = false]{libertine}
\usepackage{hologo,verbatim,geometry,framed,notebeamer,pdfpages}
\hologoFontSetup{general = \sffamily}
\setlength{\oddsidemargin}{63pt}\setlength{\evensidemargin}{63pt}
\FrameSep = 0pt
\linespread{1.1}
\usepackage{indentfirst}
\setlength{\parindent}{2em}
\usepackage[os = mac]{menukeys}
\AddToHook{env/function/before}{\vspace{-.3\baselineskip}}
\AddToHook{env/syntax/after}{\vspace{-.2\baselineskip}}

\title
{
  \bfseries
  The \cls{notebeamer} Package
  \thanks{\url{https://github.com/xiamyphys/notebeamer}}
}
\author
{
  Mingyu Xia \texttt{<\href{mailto:xiamyphys@gmail.com}{xiamyphys@gmail.com}>}
}
\date{Version 4.0A, \today}

\begin{document}
\maketitle

\section{Introduction}

The \pkg{notebeamer} package provides an easy way to input slides on notepages quickly for making annotations, based on \pkg{expl3} and \pkg{tikz}. It is compatible with \hologo{TeX} Live 2019 or later distributions, they all work fine for \hologo{pdfLaTeX} and \hologo{XeLaTeX} compilers. This is the English manual for the \pkg{notebeamer} package.

\section{Loading \pkg{notebeamer} and input}

Just like loading any class, write

\begin{framed}
  \begin{verbatim}
    \usepackage{notebeamer}
  \end{verbatim}
\end{framed}

\begin{function}{\includebeamer}
  \begin{syntax}
    \cs{includebeamer} \oarg{keyvals} \marg{filename} \oarg{keyvals}
  \end{syntax}
\end{function}

The \cs{includebeamer} command can create pages with note lines, and import the specific pages of the \file{.pdf} file on the left side of the note pages. The optional argument accepts the following keys: \keys{\cmdmac~color} \keys{\cmdmac~ratio} \keys{\cmdmac~sep} \keys{\cmdmac~nup} \keys{\cmdmac~pages} \keys{\cmdmac~lefthead} \keys{\cmdmac~righthead}, and the mandatory argument can set the \file{.pdf} file that you want to insert.

\begin{itemize}
  \item The key \keys{\cmdmac~color} can set the color of the note lines, its default value is \cmd{black}.
  \item The key \keys{\cmdmac~ratio} can set the ratio of the widths of imported beamer frames and empty area, its default value is \cmd{0.48}.
  \item The key \keys{\cmdmac~sep} can set the vertical space between beamer frames, its default value is \cmd{2ex}.
  \item The key \keys{\cmdmac~nup} can set the number of beamer frames on every physical page, its default value is \cmd{3}.
  \item The key \keys{\cmdmac~pages} can select pages to insert. The argument is a comma separated list, containing page numbers, ranges of page numbers or any combination. Its default value is \cmd{1}.
  \item The keys \keys{\cmdmac~lefthead} and \keys{\cmdmac~righthead} can set the left header and right header of the note pages.
\end{itemize}

\section{Working Examples}

For 4 logical pages per physical page and 3 logical pages per physical page

\begin{framed}
  \verbatiminput{notebeamer-demo1.tex}
\end{framed}

For one logical page per page, landscape is recommanded:

\begin{framed}
  \verbatiminput{notebeamer-demo2.tex}
\end{framed}

\includepdfmerge[nup = 2x2]
  { notebeamer-demo1, -, notebeamer-demo2, -}

\end{document}
