在 Poster 中嵌入视频:media9 和 baposter

在 Poster 中嵌入视频:media9 和 baposter

我正在制作一张将在屏幕上显示的“海报”。海报的核心内容是连续播放的视频。

我正在使用baposter文档类来创建海报(http://www.brian-amberg.de/uni/poster/) 以及media9处理视频的包。

另外,我没有遇到依赖任何一个包的文档的问题,但是当我在文档中media9使用时,视频不会按预期在占位符图像上播放,而是显示在下方并偏移。列出了相同的问题\includevideo{}baposter这里,但作者baposter.cls并没有回答是什么原因导致了这个问题。

是什么原因导致了这个显示问题?看来文件中存在兼容性问题baposter.cls,但我无法查明并修复该问题。

下面是使用 Okular pdf 查看器在 Linux 操作系统上重现该问题的最小示例:

\documentclass[landscape,fontscale=0.5,paperwidth=37.5in,paperheight=21.1in]{baposter} 
\usepackage{graphicx,tabularx}
\usepackage{caption}
\usepackage{eqparbox}
\usepackage{media9}

\usepackage{amsmath,makecell} % For typesetting math
\usepackage{amssymb} % Adds new symbols tdo be used in math mode

\usepackage{booktabs} % Top and bottom rules for tables
\usepackage{enumitem} % Used to reduce itemize/enumerate spacing
\usepackage{palatino} % Use the Palatino font
\usepackage[most]{tcolorbox}
\usepackage[font=small,labelfont=bf]{caption} % Required for specifying captions to tables and figures
\usepackage[absolute,overlay]{textpos}

\usepackage{multicol} % Required for multiple columns
\setlength{\columnsep}{1.5em} % Slightly increase the space between columns
\setlength{\columnseprule}{0mm} % No horizontal rule between columns

\usepackage{tikz} % Required for flow chart
\usetikzlibrary{decorations.markings,calc,intersections}
\usepackage[latin1]{inputenc}
\usetikzlibrary{shapes,arrows}

\newcommand{\compresslist}{ % Define a command to reduce spacing within itemize/enumerate environments, this is used right after \begin{itemize} or \begin{enumerate}
\setlength{\itemsep}{0
pt}
\setlength{\parskip}{0pt}
\setlength{\parsep}{0pt}
}

\definecolor{lightblue}{rgb}{0.186, 0.504, 0.7}
\definecolor{darkblue}{rgb}{0.006, 0.324, 0.52}

\definecolor{ltyellow}{rgb}{1,0.8,0.2} % Defines the color used for content box headers
\definecolor{dkyellow}{rgb}{0.7804,0.6078,0.0549} % Defines the color used for content box headers

\newcommand{\mychar}[1]{%
  \begingroup\normalfont
  \includegraphics[height=\fontcharht\font`\m]{#1}%
  \endgroup
}

\newcommand{\ylitem}{%
    \item[\textcolor{ltyellow}{\textbullet}]%
}

% COLORS 
\definecolor{beaublue}{rgb}{0.74, 0.83, 0.9}
%\usepackage{hyperref}
\begin{document}

\begin{poster}
{
columns=6,%
headerborder=closed, % Adds a border around the header of content boxes
colspacing=1em, % Column spacing
bgColorOne=white, % Background color for the gradient on the left side of the poster
bgColorTwo=white, % Background color for the gradient on the right side of the poster
borderColor=dkyellow, % Border color
headerColorOne=dkyellow, % Background color for the header in the content boxes (left side)
headerColorTwo=ltyellow, % Background color for the header in the content boxes (right side)
headerFontColor=black, % Text color for the header text in the content boxes
boxColorOne=white, % Background color of the content boxes
textborder=rounded, % Format of the border around content boxes, can be: none, bars, coils, triangles, rectangle, rounded, roundedsmall, roundedright or faded
eyecatcher=true, % Set to false for ignoring the left logo in the title and move the title left
headerheight=0.1\textheight, % Height of the header
headershape=rounded, % Specify the rounded corner in the content box headers, can be: rectangle, small-rounded, roundedright, roundedleft or rounded
headerfont=\Large\bf\textsc, % Large, bold and sans serif font in the headers of content boxes
%textfont={\setlength{\parindent}{1.5em}}, % Uncomment for paragraph indentation
linewidth=2pt % Width of the border lines around content boxes
}

{} % First university/lab logo on the left
{\huge{\bf\textsc{Poster title\vspace{0.2em}}}} % Poster title
{\textsc{Authors}} 
{}

\headerbox{Video}{name=video,column=2,row=0, span=2}{
    \begin{minipage}{\linewidth}
    \centering
        \includemedia[
            width=\linewidth,
            noplaybutton,
            activate=pageopen,
            addresource=/path/to/video.mp4,
            flashvars={
                source=/path/to/video.mp4           
            }       
        ]{\includegraphics[]{/path/to/placeholder.png}}{VPlayer.swf}
    \end{minipage}
}

\end{poster}
\end{document}

相关内容