[Tuglist] Multimedia & pdfTeX
H.S.Rai
tuglist@tug.org.in
Sat, 17 Aug 2002 13:11:34 +0530 (IST)
Today at 9:36am +0530 Radhakrishnan CV wrote:
Thank you for detailed reply.
> \newwrite\tmpout % we define an output stream
>
> \def\editdoc#1#2#3{\immediate\openout\tmpout=#2
Now I tried code appended below. The content of 2.sh is:
mplayer RoseBloom.avi
which I type on fly.
The problem is that I have to "chmod +x" manually, it
appers that "write18" is not doing its job. Which thing I
am missing or doing wrong.
It appers that movie.sh is produced during compilation, not
when one click on link. That way one has to supply this
file movie.sh with pdf file, if one is not distributing tex
file.
\documentclass{article}
\topmargin=-.5in \pagestyle{empty}
\usepackage{fancybox,color,hyperref}
\begin{document}
\newwrite\tmpout
\def\editdoc#1#2#3{\immediate\openout\tmpout=#2
\immediate\write\tmpout{\string\xterm\space -e joe #1}
\immediate\closeout\tmpout
\immediate\write18{chmod +x #2}
\href{run:./#2}%
{\fboxsep5pt\fboxrule1pt\color{red}\shadowbox{#3}}
\immediate\write18{chmod +x #1}
\href{run:./#1}%
{\fboxsep5pt\fboxrule1pt\color{green}\shadowbox{see movie}}
}
\editdoc{2.sh}{movie.sh}{Edit to give me Media player and avi file}
\end{document}
--
H.S.Rai
Wait for wisdom...it will come with experience.