我正在尝试将两个视频并排放在一个投影仪模板上:我尝试使用\minipage
本论坛相关文章中解释的方法。不幸的是,它不起作用,因为视频一个接一个地显示……
\documentclass[french]{beamer}
%%%%%% ENCODAGE %%%%%%%%%%%
\usepackage[utf8]{inputenc}
%%%%%% TIKZ %%%%%%%%%%%%%%%
\usepackage[beamer,customcolors,norndcorners]{hf-tikz}
%%%%%% OTHERS %%%%%%%%%%%%%
\usepackage{booktabs,calligra}
\usepackage{listings,stackengine}
\author{XXX}
\title{XXX}
\subtitle{XXX}
\institute [XXX] {XXX \\ XXX}
\date{\today}
\usepackage{YTU}
%%%%%% DEFINITIONS %%%%%%%%%
\def\cmd#1{\texttt{\color{red}\footnotesize $\backslash$#1}}
\def\env#1{\texttt{\color{blue}\footnotesize #1}}
\definecolor{deepblue}{rgb}{0,0,0.5}
\definecolor{deepred}{rgb}{0.6,0,0}
\definecolor{deepgreen}{rgb}{0,0.5,0}
\definecolor{halfgray}{gray}{0.55}
\lstset{
basicstyle=\ttfamily\small,
keywordstyle=\bfseries\color{deepblue},
emphstyle=\ttfamily\color{deepred}, % Custom highlighting style
stringstyle=\color{deepgreen},
numbers=left,
numberstyle=\small\color{halfgray},
rulesepcolor=\color{red!20!green!20!blue!20},
frame=shadowbox,
}
%%%%%% VIDEO %%%%%%%%%%%%%%
\usepackage{multimedia}
%%%%%% BOX %%%%%%%%%%%%%%%%
\usepackage{fancybox}
\usepackage{varwidth}
\usepackage{subcaption}
\hfsetbordercolor{blue!50!black}
%%%%%% PGFPLOTS %%%%%%%%%%%%
\usepackage[export]{adjustbox}
\usepackage{pgfplots}
\pgfplotsset{compat=newest}
\definecolor{mygreen}{RGB}{28,172,0} % color values Red, Green, Blue
\definecolor{mylilas}{RGB}{170,55,241}
\definecolor{BgYellow}{HTML}{FFF59C}
\definecolor{FrameYellow}{HTML}{F7A600}
\usepackage{pgf, tikz, adjustbox}
\usetikzlibrary{spy}
\usepgfplotslibrary{fillbetween}
\usetikzlibrary{patterns, matrix, positioning}
\usetikzlibrary{arrows.meta,
patterns.meta
}
\usepackage[most]{tcolorbox}
\tcbset{highlight math style={enhanced,colframe=red,colback=red!10!white,boxsep=0pt,sharp corners,
equal height group=C,
minimum for equal height group=C:1.5cm,
valign=center,
}}
\begin{document}
\begin{frame}{Mesure du champ de hauteur}
\begin{minipage}{.5\textwidth}
\movie[externalviewer]{\includegraphics[width=0.5\textwidth]{pic/Capture3D.png}}{pic/3Dmodel.mp4}
\end{minipage}
\begin{minipage}{.5\textwidth}
\movie[externalviewer]{\includegraphics[width=0.5\textwidth]{pic/Capture3D.png}}{pic/3Dmodel.mp4}
\end{minipage}
\end{frame}
\end{document}
答案1
你没有%
在行尾加上 。如果没有它们,换行符会像空格一样起作用,而且有 2 个空格和两个 .5\textwidth 的小页面,这根本无法放在一行中
\documentclass[french]{beamer}
%%%%%% ENCODAGE %%%%%%%%%%%
\usepackage[utf8]{inputenc}
%%%%%% TIKZ %%%%%%%%%%%%%%%
\usepackage[beamer,customcolors,norndcorners]{hf-tikz}
%%%%%% OTHERS %%%%%%%%%%%%%
\usepackage{booktabs,calligra}
\usepackage{listings,stackengine}
\author{XXX}
\title{XXX}
\subtitle{XXX}
\institute [XXX] {XXX \\ XXX}
\date{\today}
\usepackage{YTU}
%%%%%% DEFINITIONS %%%%%%%%%
\def\cmd#1{\texttt{\color{red}\footnotesize $\backslash$#1}}
\def\env#1{\texttt{\color{blue}\footnotesize #1}}
\definecolor{deepblue}{rgb}{0,0,0.5}
\definecolor{deepred}{rgb}{0.6,0,0}
\definecolor{deepgreen}{rgb}{0,0.5,0}
\definecolor{halfgray}{gray}{0.55}
\lstset{
basicstyle=\ttfamily\small,
keywordstyle=\bfseries\color{deepblue},
emphstyle=\ttfamily\color{deepred}, % Custom highlighting style
stringstyle=\color{deepgreen},
numbers=left,
numberstyle=\small\color{halfgray},
rulesepcolor=\color{red!20!green!20!blue!20},
frame=shadowbox,
}
%%%%%% VIDEO %%%%%%%%%%%%%%
\usepackage{multimedia}
%%%%%% BOX %%%%%%%%%%%%%%%%
\usepackage{fancybox}
\usepackage{varwidth}
\usepackage{subcaption}
\hfsetbordercolor{blue!50!black}
%%%%%% PGFPLOTS %%%%%%%%%%%%
\usepackage[export]{adjustbox}
\usepackage{pgfplots}
\pgfplotsset{compat=newest}
\definecolor{mygreen}{RGB}{28,172,0} % color values Red, Green, Blue
\definecolor{mylilas}{RGB}{170,55,241}
\definecolor{BgYellow}{HTML}{FFF59C}
\definecolor{FrameYellow}{HTML}{F7A600}
\usepackage{pgf, tikz, adjustbox}
\usetikzlibrary{spy}
\usepgfplotslibrary{fillbetween}
\usetikzlibrary{patterns, matrix, positioning}
\usetikzlibrary{arrows.meta,
patterns.meta
}
\usepackage[most]{tcolorbox}
\tcbset{highlight math style={enhanced,colframe=red,colback=red!10!white,boxsep=0pt,sharp corners,
equal height group=C,
minimum for equal height group=C:1.5cm,
valign=center,
}}
\begin{document}
\begin{frame}{Mesure du champ de hauteur}
\begin{minipage}{.5\textwidth}
xxx
%\movie[externalviewer]{\includegraphics[width=0.5\textwidth]{pic/Capture3D.png}}{pic/3Dmodel.mp4}
\end{minipage}%
\begin{minipage}{.5\textwidth}
xxx
%\movie[externalviewer]{\includegraphics[width=0.5\textwidth]{pic/Capture3D.png}}{pic/3Dmodel.mp4}
\end{minipage}%
\end{frame}
\end{document}