2

I'm trying to include sound clips in my .tex file.

In a minimal file, I have no problems:

\documentclass[a4paper, 11pt]{article}
\usepackage{media9}

\begin{document}
\section{Lyd}
\includemedia[addresource=dodonusman01.mp3,
transparent,
flashvars={source=dodonusman01.mp3&autoPlay=true}]{\bf Here}{APlayer.swf} 
is some sound.
\end{document}

However, if I enter the same code in the .tex file I actually want the sound files in, I get first these errors:

Extra \endcsname. ....mp3&autoPlay=true}]{\bf Her}{APlayer.swf}

Missing \endcsname inserted. ....mp3&autoPlay=true}]{\bf Here}{APlayer.swf}

When I compile again, I get:

TeX capacity exceeded, sorry [parameter stack size=10000]. \catcode`\noexpand\^^A

The file I tried to include is 15kb. I guess there's a clash with something else I use in my .tex document. Here's my preamble, I've deleted all text as it is 150 pages:

\documentclass[12pt,twoside]{report}
\usepackage[margin=2.5cm]{geometry} % margins
\usepackage[natbibapa]{apacite} % references
\usepackage{graphicx}
\usepackage{subfig}
\usepackage[section]{placeins}
\usepackage{tipa} % ipa
\usepackage{gb4e} % gloss
\usepackage{cgloss4e} % gloss
\usepackage{caption} % table and figure captions
\captionsetup[table]{skip=0pt,font=footnotesize}
\captionsetup[figure]{skip=0pt,font=footnotesize}
\usepackage[T1]{fontenc}
\usepackage{multicol}
\usepackage{nomencl}
\usepackage{longtable}
\usepackage{tabularx}
\usepackage{array}
\usepackage{marvosym} % play arrow button
\usepackage{media9} % sound files
\usepackage{enumitem} % to make lists with more levels
\setlistdepth{5}

\let\ipa\textipa
\let\cap\textsc
\usepackage{vowel}

\makeatletter
\renewcommand\paragraph{\@startsection{paragraph}{4}{\z@}%
{-2.5ex\@plus -1ex \@minus -.25ex}%
{1.25ex \@plus .25ex}%
{\normalfont\normalsize\bfseries}}
\makeatother
\setcounter{secnumdepth}{4} % how many sectioning levels to assign numbers to
\setcounter{tocdepth}{4}    % how many sectioning levels to show in ToC

\usepackage{wrapfig} % to wrap text around figures
\newcommand{\BlankCell}{}
\let\eachwordone=\it
\usepackage{slashbox} % to make tables with slash in upper left field
\usepackage{amssymb}


\newenvironment{dedication} % for the dedication
{\clearpage           % we want a new page
\thispagestyle{empty}% no header and footer
\vspace*{\stretch{1}}% some space at the top 
\itshape             % the text is in italics
\raggedleft          % flush to the right margin
}
{\par % end the paragraph
\vspace{\stretch{3}} % space at bottom is three times that at the top
\clearpage           % finish off the page
}

\begin{document}
\section{Test}

\includemedia[addresource=dodonusman01.mp3,
transparent,
flashvars={source=dodonusman01.mp3&autoPlay=true}]{\bfHere}{APlayer.swf} 
is some sound. 
\end{document}

1 Answer 1

2

The problem is in the automath feature of gb4e and the issue can be reproduced with the following minimal example:

\documentclass[12pt,twoside]{report}
\usepackage{media9} % sound files
\usepackage{gb4e} % gloss
\usepackage{cgloss4e} % gloss

\begin{document}

\section{Test}

\includemedia[
  addresource=click.mp3,
  transparent,
  flashvars={source=click.mp3&autoPlay=true}
]{\textbf{Here}}{APlayer.swf}

\end{document}

Just add \noautomath, as mentioned in the documentation for gb4e, section 3, “Varia”.

• Sub- & superscripts (_ and ^) work outside mathmode, too.
Note: This feature is known to cause problems for a number of other packages. It is retained for backward compatibility. In case of problems, you can disable it by adding the command \noautomath in your preamble immediately after loading the gb4e package. You can also re-enable it later with the command \automath. [Added 2009/12/28]

\documentclass[12pt,twoside]{report}
\usepackage{media9} % sound files
\usepackage{gb4e} % gloss
\usepackage{cgloss4e} % gloss
\noautomath % <----------------- Here it is!

\begin{document}

\section{Test}

\includemedia[
  addresource=click.mp3,
  transparent,
  flashvars={source=click.mp3&autoPlay=true}
]{\textbf{Here}}{APlayer.swf}

\end{document}

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .