0

I am trying to make a long table that includes embedded audio files. Whenever I try adding files with media9, LaTeX won't create a pdf. Any suggestions on how to make a long table with embedded audio files and a clickable icon that plays it in the appropriate column?

Here is the code I have so far:

\documentclass[10pt,oneside]{article}
\usepackage{media9}
\usepackage{booktabs}
\usepackage{multirow}
\usepackage{longtable}
\begin{document}
\newcommand{\rr}{\raggedright} %allows for left alignment
\newcommand{\tn}{\tabularnewline}
\begin{center}
\begin{longtable}{@{}p{.5cm} p{1cm} p{2cm} p{2cm} p{1cm} p{2cm} p{3cm}@{}}
\caption{Swadesh List}\\
\toprule
 & Audio & Gloss & \rr Phonemic Transcription & Tonemes & \rr Phonetic Transcription    & \rr Notes on translation\tn
\midrule

\endfirsthead

\multicolumn{4}{c}%
{\tablename\ \thetable\ -- \textit{Continued from previous page}} \\
\toprule
 & Audio & Gloss & \rr Phonemic Transcription & Tonemes & \rr Phonetic Transcription & \rr Notes on translation\tn
\midrule
\endhead
\toprule \multicolumn{4}{r}{\textit{Continued on next page}} \\
\endfoot
\bottomrule
\endlastfoot

1. & \includemedia[
width=1cm,
height=1cm,
activate=onclick,
addresource=1.mp3,
transparent=false,
flashvars={source=1.mp3}
]{}{VPlayer.swf} & big & \textipa{/\!b\'e\t{tS}:/} & H & \textipa{[\!b\'E\t{tC}:]} & \rr also: `respected'; `important'\tn
\end{longtable}
\end{center}
\end{document}
  • if it works in a tabular ? it should work in longtable, does it work if you use \mbox{\includemedia.. so \includemedia isn't the first thing in the cell? – David Carlisle Nov 4 '14 at 7:43
  • 1
    This is a bug in media9 that has already been fixed as of v0.46; current is 0.48. – AlexG Nov 4 '14 at 7:55
  • 1
    Also note that you need APlayer.swf to play audio, not VPlayer.swf. – AlexG Nov 4 '14 at 9:03
  • After updating to texlive2014, it worked. Thanks for pointing that out. – Brad Nov 5 '14 at 23:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.