% Lighting-Chart-Template.tex
% Hussein Esmail
% Created 2021 08 14
% Updated 2021 08 14
% Description: [DESCRIPTION]

% This part is used for https://github.com/hussein-esmail7/template-maker
% templateDescription: LaTeX Theatre Lighting Notes Document

% This file can be found at https://husseinesmail.com/guides/all/

% What is LaTeX? definition from https://www.latex-project.org/about
% LaTeX is a document preparation system for high-quality typesetting. It is 
% most often used for medium-to-large technical or scientific documents but it 
% can be used for almost any form of publishing.

% Why use LaTeX instead of Microsoft Word?
% 1. You don't have to indent text manually, LaTeX can do it by itself when you 
%		tell it to.
% 2. LaTeX doesn't require a Microsoft Office licence to use. It's free for 
%		everyone (and part of the Free Open Source Software movement)!
% 3. If you have a table of contents with numbered sections and you add another 
%		one in the middle, everything is renumbered automatically (acts and 
%		scenes in this case).
% 4. (The reason why it got me into it) It can be typed in any text editor 
%		(though I recommend using VSCode with the "LaTeX Workshop" extension 
%		by James Yu).

% This document is formatted so that you can follow along with these comments 
% (starting with a `%') so you know what's happening. You may notice that the 
% lines in this file are not exceeding 80 characters. This is just my 
% preference, and is not at all required by LaTeX.

% Here is the variables section where you can easily change what parameters are 
% used (title, author, date typed/written, etc.)

% =========================== Variables ===========================
\newcommand{\myTitle}{Show Title Here}      % Title of show
\newcommand{\myAuthor}{Author Here}         % Author of the show
\newcommand{\mySubject}{PDF Subject Here}   % Used for Metadata
\newcommand{\myKeywords}{PDF Keywords Here} % Separated by comma
\newcommand{\myDate}{Created Date Here}     % Written or typed date
\newcommand{\myLXcounter}{1}                % Lx counter first number
% =========================== Variables ===========================

% You don't need to worry about this ``Configurations'' section. This is where 
% most of the variable values are actually implemented (setting the title, 
% author, date typed/written, etc.)

% ======================== Configurations ========================
\documentclass{article}
\usepackage{hyperref}       % Used for adding PDF metadata
\usepackage{multirow}       % Multiple rows/columns in table
\usepackage{longtable}      % Tables that can go past 1 page
\usepackage{fancyhdr}       % Used for page numbers on RS
\usepackage{calc}           % Used for LX counter variable
                            % https://tex.stackexchange.com/a/93865/236070
\setlength\parindent{0pt}   % Paragraph indent to 0
\title{\myTitle}            % Title  = stored variable
\author{\myAuthor}          % Author = stored variable
\date{\myDate}              % Date   = stored variable
\hypersetup{colorlinks=false, 
	pdfborder={0 0 0}, 
	pdftitle={\myTitle}, 
	pdfauthor={\myAuthor}, 
	pdfsubject={\mySubject}, 
	pdfkeywords={\myKeywords}
}							% PDF metadata
\newcounter{lx}
\setcounter{lx}{\myLXcounter-1}
\newenvironment{itemize*}{\begin{itemize}\setlength{\itemsep}{0pt}\setlength{\parskip}{0pt}}{\end{itemize}}
\newenvironment{enumerate*}{\begin{enumerate}\setlength{\itemsep}{0pt}\setlength{\parskip}{0pt}}{\end{enumerate}}
% ======================== Configurations ========================

% These following commands are what you can use when typing lines so you don't 
% need to know too much of how LaTeX works. If at any point you have questions 
% about how to do something in LaTeX, please don't hesitate to email me at 
% HusseinEsmailContact@gmail.com

% Descriptions of these shortcuts:
% \comment -> If you need to write a multi-line comment here
% \LX -> Lighting cue, between 2 lines
%   1: Hardcoded cue number
%       If you don't put a number here, it will use the counter in steps of 1, 
%       starting at the predefined number at \myLXcounter in the variables 
%       section. If you do put a value here, it will use that number and the 
%       next cue's number will continue as if this one isn't there. 
%       Ex, 1, 2, 6.23, 3.
%   1: Page in script
%   2: Fade time/duration of cue in seconds
%   3: Line before cue
%   4: Line after cue
%   5: Cue description
%   6: Other notes
% \newScene -> When you want to skip to a scene in the Table of Contents
%   1: Scene number
%   2: Scene title (optional, can just be {})
% \note ->
%   1: The actual note...

% ======================= Shortcut Commands =======================
\newcommand{\comment}[1]{}  % Multiline comments - does not show in PDF
\newcommand{\LX}[7]{
    \textbf{-Lx-} & \ifx&#1&\setcounter{lx}{\value{lx}+1}\arabic{lx} \else#1\fi \\
    \ifx&#2&\else \textbf{Page} &#2 \\ \fi
    \ifx&#3&\else \textbf{Time} &#3s \\ \fi
    \textbf{Line} & \ifx&#4&\textbf{[None]}\else#4 \fi \\
    & \hspace*{1cm} \underline{\textbf{Cue here.}} \\
    \textbf{Line} & \ifx&#5&\textbf{[None]}\else#5 \fi \\
    \ifx&#6&\else \textbf{Desc} &#6 \\ \fi
    \ifx&#7&\else \textbf{Note} &#7 \\ \fi \\
}
\newcommand{\newScene}[2]{
    \newcommand{\SceneTitle}{Scene #1\ifx&#2&\else: #2 \fi}
	\subsection*{\SceneTitle} 
	\addcontentsline{toc}{subsection}{\protect\numberline{}\SceneTitle}
}
\newcommand{\note}[1]{\hline{} \textbf{Note} & #1 \\ \hline{} \\ }
% ======================= Shortcut Commands =======================

\begin{document} % Official beginning of the document. 
\maketitle
\tableofcontents        % Makes TOC

\section{Introduction}
This PDF are the lighting notes for \myTitle, written by \myAuthor. 

This document is made using \LaTeX{}, a typesetting document format, mainly used for large documents like STEM documents, theses, and research papers. To read more about \LaTeX{}, you \href{https://husseinesmail.xyz/articles/is-latex-better.html}{can go here}.

\section{Areas of the Stage}
\begin{tabular}{r l} 
    Term    & Name 
	\\ USR  & Upstage Right 
	\\ USC  & Upstage Centre
	\\ USL  & Upstage Left 
	\\ SR   & Stage Right 
	\\ CS   & Centre Stage 
	\\ SL   & Stage Left 
	\\ DSR  & Downstage Right 
	\\ DSC  & Downstage Centre 
	\\ DSL  & Downstage Left 
	\\ AL   & Apron Left 
	\\ AC   & Apron Centre 
	\\ AR   & Apron Right
\end{tabular}

\section{Cues}

% ============================ Example ============================
\newScene{1}{Test}
\begin{longtable}{l|p{\textwidth}}  % Table start
    \LX{}{2}{4}{This is the line before the cue.}{This is the line after the cue.}{House lights}{When people enter, before show}
    \note{When the admission period ends.}
    \LX{}{2}{4}{}{The first line in the script}{Blackout}{Before the show starts}
    \LX{}{2}{4}{This is the line before.}{This is the line after}{Some description}{were}
    \LX{}{}{}{}{}{}{}
    \LX{}{2}{4}{This is the line before.}{This is the line after}{Some description}{were}

\end{longtable} % Table end
% ============================ Example ============================

% TODO: Here is where you would continue writing cues and notes

% This commented block is a template scene you can copy to write cues quicker
\comment{
\newScene{SCENE NUMBER}{SCENE NAME}   % Scene _ with its title
\begin{longtable}{l p{\textwidth}}    % Table start
    CUES HERE
    \LX{}{}{}{}{}{}{}
\end{longtable}                       % Table end
}

\end{document}
