Very primitive AS5 specs added.

Originally committed to SVN as r1400.
This commit is contained in:
Rodrigo Braz Monteiro 2007-07-10 03:06:41 +00:00
parent 1fb4f58ff2
commit ddda631b69
4 changed files with 182 additions and 0 deletions

BIN
specs/as5/as5.pdf Normal file

Binary file not shown.

12
specs/as5/as5.tcp Normal file
View file

@ -0,0 +1,12 @@
[FormatInfo]
Type=TeXnicCenterProjectInformation
Version=4
[ProjectInfo]
MainFile=as5.tex
UseBibTeX=0
UseMakeIndex=0
ActiveProfile=LaTeX => PDF
ProjectLanguage=
ProjectDialect=

113
specs/as5/as5.tex Normal file
View file

@ -0,0 +1,113 @@
\documentclass{spec}
\newcommand{\syntax}[1]{
\subsubsection*{Syntax}
\begin{tabbing}
\hspace{2cm}\=\\[-16pt]
#1
\end{tabbing}
}
\newcommand{\secspec}[1]{Section:\>\texttt{#1}}
\newcommand{\secspecs}[2]{Sections:\>\texttt{#1}, \texttt{#2}}
\title{\LaTeX}
\date{}
\begin{document}
\title{AS5 Subtitle Format Draft}
\author{Rodrigo Braz Monteiro, Niels Martin Hansen, David Lamparter}
\spectitle
\section{Abstract}
This document specifies the \emph{AS5 subtitle format}, developed jointly by the
Aegisub\cite{Aegisub} and asa\cite{asa} teams in order to replace the old
\emph{Sub Station Alpha}\cite{SSA} subtitle format and its extensions:
\begin{itemize}
\item Advanced Sub Station Alpha (ASS) implemented by VSFilter\cite{VSFilter}
\item Advanced Sub Station Alpha 2 (ASS2), also implemented by VSFilter
\item Advanced Sub Station Alpha 3 (ASS3) implemented by equinox.
\end{itemize}
The goal is to create a flexible, easy to understand and powerful subtitle format
that can be used in hardsubs or multiplexed into Matroska Video\cite{mkv} files as
softsubs.
\section{File Structure}
\subsection{File Format}
All AS5 files are \emph{REQUIRED} to comply with the three requirements below:
\begin{itemize}
\item Be encoded with one of \emph{UTF-8}\cite{UTF-8}, \emph{UTF-16 Big Endian}
\cite{UTF-16} or \emph{UTF-16 Little Endian} Unicode Transformation Formats. UTF-8 is
preffered.
\item Not to have any character below Unicode code point U+20, except for U+09, U+0A, U+0D.
That is, it must be a plain-text file.
\item All lines must end with Windows line endings, that is, U+0D followed by U+0A.
\end{itemize}
The character set of a subtitle file can be autodetermined by its Byte-Order Mark or by
the value of the first four bytes. See below.
\subsection{File Structure}
The file is divided in \emph{sections}, which are uniquely identified by a string inside
square brackets, in a line of its own. From that point on, every next line is considered
to be part of the last found section until another section is found. There is no end-of-section
termination mark; they always end at the start of the next one or at the end of the file.
\subsubsection{[AS5]}
This must be the first section in every AS5 file. If the very first line of the file is not
[AS5], the file \emph{MUST} be rejected by the parser as invalid. Note, however, that the first
line is allowed to contain a Byte-Order Mark (BOM), which is the character U+FEFF encoded in
the encoding used for the rest of the script. The first four bytes will therefore be:
\begin{itemize}
\item 0xEF 0xBB 0xBF 0x5B - UTF-8 (with BOM)
\item 0x5B 0x41 0x53 0x53 - UTF-8 (without BOM)
\item 0xFF 0xFE 0x5B 0x00 - UTF-16 LE (with BOM)
\item 0x5B 0x00 0x41 0x00 - UTF-16 LE (without BOM)
\item 0xFE 0xFF 0x00 0x5B - UTF-16 BE (with BOM)
\item 0x00 0x5B 0x00 0x41 - UTF-16 BE (without BOM)
\end{itemize}
\addcontentsline{toc}{section}{References}
\begin{thebibliography}{1}
\bibitem{Aegisub} Rodrigo Braz Monteiro, Niels Martin Hansen, David Lamparter et al., Aegisub. Application, 2005-2007.\\
\url{http://www.aegisub.net/}
\bibitem{asa} David Lamparter, asa. Application, 2004-2007.\\
\url{http://asa.diac24.net/}
\bibitem{SSA} Kotus, Sub Station Alpha. Website, 1997-2003.\\
\url{http://web.archive.org/web/*/http://www.eswat.demon.co.uk/substation.html}
\bibitem{ASS} \#Anime-Fansubs, Advanced Sub Station Alpha.\\
\url{http://www.anime-fansubs.org}\\
\url{http://moodub.free.fr/video/ass-specs.doc}
\bibitem{VSFilter} Gabest, VSFilter. Application, 2003-2007.\\
\url{http://sourceforge.net/projects/guliverkli/}
\bibitem{ASS3} David Lamparter, Advanced Sub Station Alpha 3. Website, 2007.\\
\url{http://asa.diac24.net/ass3.pdf}
\bibitem{mkv} The Matroska project.\\
\url{http://www.matroska.org/}
\bibitem{UTF-8} The Internet Society, RFC 3629, "`UTF-8, a transformation format of ISO 10646"'. Website, 2003.\\
\url{http://tools.ietf.org/html/rfc3629}
\bibitem{UTF-16} The Internet Society, RFC 2781, "`UTF-16, an encoding of ISO 10646"'. Website, 2000.\\
\url{http://tools.ietf.org/html/rfc2781}
\end{thebibliography}
\end{document}

57
specs/as5/spec.cls Normal file
View file

@ -0,0 +1,57 @@
\NeedsTeXFormat{LaTeX2e}
\ProvidesClass{spec}
\ExecuteOptions{11pt,a4paper}
\ProcessOptions
\LoadClass{article}
% UTF-8 input
\RequirePackage{ucs}
\RequirePackage[utf8x]{inputenc}
\RequirePackage[english]{babel}
\RequirePackage[margin=3cm]{geometry}
%\RequirePackage{amsmath}
%\RequirePackage{amssymb}
%\RequirePackage{latexsym}
%\RequirePackage{amsxtra}
%\RequirePackage{amscd}
\RequirePackage{charter}
\RequirePackage{fancyhdr}
\RequirePackage{color}
\RequirePackage{hyperref}
\RequirePackage{url}
\pagestyle{plain}
% dont indent paragraphs
\setlength{\parindent}{0pt}
\setlength{\parskip}{0pt}
% some highlighting
% \todo (no args)
\definecolor{red}{rgb}{1,0,0}
\newcommand{\todo}{\textbf\textsf{\color{red}TODO: }}
% \ann{text...}
\definecolor{brown}{rgb}{0.66,0.33,0}
\newcommand{\ann}[1]{\textit\textsf{\color{brown}#1}}
% RFC2119, use like "x \should\ blah"
% (dont forget the \ at the end or it will stick to the next word)
\newcommand{\may}{\textsc{may}}
\newcommand{\should}{\textsc{should}}
\newcommand{\shouldnot}{\textsc{should not}}
\newcommand{\must}{\textsc{must}}
\newcommand{\mustnot}{\textsc{must not}}
% oc, as in override code - use: \oc{fade} (no \ inside!)
\newcommand{\oc}[1]{\texttt{\textbackslash #1}}
\newcommand{\spectitle}{
\maketitle
\setlength{\parskip}{0pt}
\tableofcontents
\setlength{\parskip}{8pt}
\newpage
}
\endinput