fragile ãªãã·ã§ã³ã®ããããã話
ããã¥ã¢ã«ã§èª¬æããã¦ããããã«ãBeamer ã®ãã¬ã¼ã è¨è¿°ï¼frame ç°å¢ï¼ã®ä¸ã« verbatim ç°å¢ãå«ããå ´åã¯ãç°å¢ã®ãªãã·ã§ã³ã¨ã㦠fragile ãæå®ããå¿ è¦ãããã
\documentclass{beamer} \begin{document} % âfragile ãªãã·ã§ã³ãå¿ è¦ï¼ \begin{frame}[fragile]{You know\ldots} Of course, all {\TeX} learners \alert{must} see what this means: \par\small \begin{verbatim} \begingroup\expandfater\expandfater\expandfater\endgroup \expandafter\ifx\csname xx@opt@\xx@opt\endcsname\relax ... \fi \end{verbatim} \end{frame} \end{document}
ããã¥ã¢ã«ãããèªãã¨è§£ãããfragile ãªãã·ã§ã³ã«ã¯ singleslide ã¨ããå¤ãè¨å®ãããã¨ãã§ãããã¤ã¾ããfragile ã®ãå¤ãã¯æ¬¡ã® 3 種é¡ããããã¨ã«ãªãã
- æå®ãªãï¼fragile=false ã¨åå¤ï¼
- fragile æå®ï¼fragile=true ã¨åå¤ï¼
- fragile=singleslide æå®ï¼containsverbatim ã¨åå¤*1ï¼
ãã®å¤ã«ããããã¬ã¼ã ã®ä¸èº«ã®å é¨å¦çã«éããããããããä»æ§ã¨ãã¦ã¯ä»¥ä¸ã®ç¹ãç°ãªãã*2
- ãæå®ãªããã®å ´åï¼
verbatim ç°å¢ã¯ä½¿ããªãã
- ãfragileãã®å ´åï¼
verbatim ç°å¢ã使ããããã«ãªãããã¬ã¼ã ã®ä¸èº«ãä¸æ¦ãã¡ã¤ã«ã«æ¸ãåºãã¦ãããæ¹ãã¦èªã¿è¾¼ãã¨ããå¦çãè¡ããããããããã®ãããå¦çãè¥å¹²éããªããã¾ããå¦çã®é½åä¸ã次ã®ãããªå¶ç´ãçããã((ããã¯ãfragile æå®æã«ã¯ããã¬ã¼ã ã®çµç«¯ãã
\end{frame}
ãã®è¡ã§å¤æããã¨ããå¦çãè¡ãããããã§ããã))ãã¬ã¼ã ã®å 容ã«
\end{frame}
ã ããããªãè¡ãå«ããããªãããã¡ãããframe ç°å¢ããã¹ãããããã¨ã¯ãªãã¯ãã§ãããããããBeamer ã®è§£èª¬ã®ãã¬ã¼ã³ãä½ã£ã¦ã㦠verbatim ç°å¢ã®ä¸ã«
\end{frame}
ã¨æ¸ãããã¨ããå ´åã«ã¯å°ããã¨ã«ãªãã - ãfragile=singleslideãã®å ´åï¼
verbatim ç°å¢ã使ããããã«ãªããã¾ã fragile ãæã¤æ¬ ç¹ãå¶ç´ã¯ãã¡ãã«ã¯å½ã¦ã¯ã¾ããªãã代ããã«æ¬¡ã®ãããªå¶ç´ãçããã
è¤æ°ã¹ã©ã¤ããããªããã¬ã¼ã ãä½ããªããã¤ã¾ã
\pause
çã使ããªããã ããããã®æå®ã¨ fragile æå®ã使ãåããå¿ è¦ãããããç¥ããªãã
frame ç°å¢ã§ã\end{frame}ãã¨æ¸ãããã®ç´ æµãªæ¹æ³
ã¨ããã§ãå
ã«èª¬æãããå¶ç´ããèãåãããã¨ããè¤æ°ã¹ã©ã¤ããçãããã¬ã¼ã ã®ä¸ã« verbatim ããã£ã¦ãã®ä¸ã« \end{frame}
ã ãã®è¡ãåå¨ãããã¨ããé常ã«ä¸å¹¸ãªç¶æ³ã§ã¯ fragile ã®å¤ãã©ãã«ãã¦ã解決ã§ããªããã¨ã«ãªãã
\documentclass{beamer} \begin{document} \begin{frame}[fragile]{Beamer is easy} Making a slide is as easy as follows:\par %âãªã¼ãã¬ã¤ã使ã£ã \begin{quote}<2>\small %âverbatim ããã£ã¦ä¸ã« \end{frame} ããã \begin{verbatim} \begin{frame}{Slide title} ...Content... \end{frame} \end{verbatim} \end{quote} \end{frame} \end{document}
\end{Frame}
ã®åå¾ã«ä½ãæåãããã°åé¡ãªãã®ã§ããããverbatim ã®ä¸ã ããå½ç¶è¿½å ããæåã¯ãã®ã¾ã¾åºåããã¦ãã¾ããããã¨ããå¾ãã«ç©ºç½æåãå
¥ããï¼ãããªãè¦ãç®ãå¤ãããªãï¼ãã¨ããæ¹çãæãã¤ãããæ®å¿µãªãã TeX ã®ä»æ§ã«ããå¶ç´ã®ããä¸æããããªãã*3ä½ãç´ æµãªè§£æ±ºæ³ã¯ãªããã®ãã
ãããç´ æµãªè§£æ±ºæ³ã¨ããã°ãåè§ã«ãã使ã£ã¦â¦â¦
â¦â¦ãããªãã¦ãframe ç°å¢ã® environment ãªãã·ã§ã³ãå©ç¨ããã®ãæ£è§£ã
\documentclass{beamer} \newenvironment{specialframe} {\begin{frame}[fragile,environment=specialframe]} {\end{frame}} \begin{document} \begin{specialframe}{Beamer is easy} Making a slide is as easy as follows:\par \begin{quote}<2>\small \begin{verbatim} \begin{frame}{Slide title} ...Content... \end{frame} \end{verbatim} \end{quote} \end{specialframe} \end{document}
frame ç°å¢ã«å±éããããspecialframe ç°å¢ããå®ç¾©ããããã®éã«ãframe ç°å¢ã« environment=specialframe ã¨ãããªãã·ã§ã³ãæå®ãããããã§ãBeamer ã¯ãã¬ã¼ã ã®çµç«¯ãã\end{specialframe}
ãã¨ããè¡ï¼å®éã«çµç«¯ã¨ãã¦æ¸ãããã®ã¯ããã®ã¯ãã§ããï¼ã§å¤æããããã«ãªããããªãã¡ãã\end{frame}
ãã®è¡ã¯å®å
¨ã«å«ãããã¨ãã§ããã
*1:containsverbatim 㯠fragile=singleslide ã®è¨å®ã«å¯¾ããæ§çã§ã®ååã§ããããç¾å¨ã§ããµãã¼ãããã¦ããã
*2:ãã¡ããããã¥ã¢ã«ã«è¨è¼ããã¦ããã
*3:è¡æ«ã«ãã空ç½æåã¯ãä¾ãï¼verbatim ã®ä¸ã®ããã«ï¼ç©ºç½æåã®ã«ãã´ãªã³ã¼ãã 10 以å¤ã«ãªã£ã¦ãã¦ããç¡æ¡ä»¶ã«ç¡è¦ããã¦ãã¾ãã®ã§ããããã ããå ¨è§ç©ºç½ï¼U+3000ï¼ã no-break spaceï¼U+00A0ï¼ã¯ãã®å¶ç´ãåããªãã®ã§ããã®æåã使ããç°å¢ã§ããã°åé¿çã«ãªãããã