使用 Beamerarticle
和presentation
选项我编写了以下代码:
Quadrant \presentation{\Romanbar{1}\xspace}\article{I\xspace} (lagging)
and \presentation{\Romanbar{4}}\article{I\hspace{-1pt}V} (leading)
无论使用哪种方式,都会错误地产生:
Quadrant
I
(lagging) and
IV
(leading)
因为我需要将所有内容都放在一行中。
我也尝试编写以下命令,但也失败了:
\newcommand\Roma{\presentation{\Romanbar{1}\xspace}\article{I\xspace}}
\newcommand\Romb{\presentation{\Romanbar{2}}\article{I\hspace{-1pt}I}}
\newcommand\Romc{\presentation{\Romanbar{3}}\article{I\hspace{-1pt}I\hspace{-1pt}I}}
\newcommand\Romd{\presentation{\Romanbar{4}}\article{I\hspace{-1pt}V}}
有解决方法吗?
梅威瑟:
\documentclass[10pt]{article}
\usepackage{beamerarticle}
\setjobnamebeamerversion{main.beamer}
\usepackage{xspace}
\usepackage{romanbar}
\usepackage{parskip}
\newcommand\Roma{\presentation{\Romanbar{1}\xspace}\article{I\xspace}}
\newcommand\Romb{\presentation{\Romanbar{2}}\article{I\hspace{-1pt}I}}
\newcommand\Romc{\presentation{\Romanbar{3}}\article{I\hspace{-1pt}I\hspace{-1pt}I}}
\newcommand\Romd{\presentation{\Romanbar{4}}\article{I\hspace{-1pt}V}}
\begin{document}
Quadrant \presentation{\Romanbar{1}\xspace}\article{I\xspace} (lagging)
and \presentation{\Romanbar{4}}\article{I\hspace{-1pt}V} (leading)
vs
Quadrant {I\xspace} (lagging)
and {I\hspace{-1pt}V} (leading)
\end{document}
背面写着:
Beamer MWE:
\documentclass[9pt, %handouts,
ignorenonframetext]{beamer}
\usepackage{pgfpages}
\pgfpagesuselayout{2 on 1}[landscape,a4paper,border shrink=5mm]\pgfpageslogicalpageoptions{1}{border code=\pgfusepath{stroke}}\pgfpageslogicalpageoptions{2}{border code=\pgfusepath{stroke}}
\setjobnamebeamerversion{main.beamer}
\usepackage{xspace}
\usepackage{romanbar}
\usepackage{parskip}
\newcommand\Roma{\presentation{\Romanbar{1}\xspace}\article{I\xspace}}
\newcommand\Romb{\presentation{\Romanbar{2}}\article{I\hspace{-1pt}I}}
\newcommand\Romc{\presentation{\Romanbar{3}}\article{I\hspace{-1pt}I\hspace{-1pt}I}}
\newcommand\Romd{\presentation{\Romanbar{4}}\article{I\hspace{-1pt}V}}
\begin{document}
\begin{frame}{Frame Title}
Quadrant \presentation{\Romanbar{1}\xspace}\article{I\xspace} (lagging)
and \presentation{\Romanbar{4}}\article{I\hspace{-1pt}V} (leading)
vs
Quadrant \Romanbar{1} (lagging)
and \Romanbar{4} (leading)
\end{frame}
\end{document}
给出:
答案1
你只需要\only<
模式>
\iftrue% \iftrue or \iffalse
\documentclass{beamer}
\else
\documentclass{article}
\usepackage{beamerarticle,pgfkeys}
\fi
\usepackage{romanbar}
\pgfkeys{
/skvery/rom/.cd,
1/.initial={I},
2/.initial={I\!I},
3/.initial={I\!I\!I},
4/.initial={I\!V},
5/.initial={V},
6/.initial={V\!I},
}
\def\skveryrom#1{\preORart{\Romanbar{#1}}{\pgfkeysvalueof{/skvery/rom/#1}}}
\def\preORart#1#2{\only<presentation>{#1}\only<article>{#2}}
\begin{document}
\begin{frame}{Two mode Roman numbers}
Roman one \skveryrom{1}
\pause
Roman two \skveryrom{2}
\pause
Roman three \skveryrom{3}
\pause
Roman four \skveryrom{4}
\pause
Roman five \skveryrom{5}
\pause
Roman six \skveryrom{6}
\end{frame}
\end{document}
⬆️ 处于演示模式
⬆️ 处于文章模式