emath saloon

新規発言一覧最新記事過去一覧検索HOME

No.1346  Re:beamer 樹形図がうまくいかない
発言者: 飯島 徹
発言日: 2015 12/10 18:00
beamerを使うなら描画はTikZでしょ!っということでTikZならこうなるという例を…
grow=rightの場合,直感とは異なる描画になるのが残念ですね

%#! ptex2pdf -l test
\documentclass[xcolor=dvipsnames,dvipdfmx]{beamer}
\usepackage{etex}
\usepackage{pxjahyper}
\usepackage{minijs}
\renewcommand{\kanjifamilydefault}{\gtdefault}
\usepackage{multirow}
%%%%%%%%%%%%%
\let\labelenumi\undefined
\let\labelenumii\undefined
\let\labelenumiii\undefined
\let\endproof\undefined
\let\pushQED\undefined
\let\popQED\undefined
\let\qedhere\undefined
\let\mathqed\undefined
\let\openbox\undefined
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\usepackage[notMy]{emathP}
\usepackage{emathWs}
%\usepackage{emathPs}
\usepackage{showexample,tikz}
\usetikzlibrary{calc}
\AtBeginDvi{\special{pdf:tounicode 90ms-RKSJ-UCS2}}
\usetheme{Copenhagen}
\title{}
\subtitle{}
\author{imai}

\begin{document}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{frame}{}

    \makebox[1.5em]{1}%
        \begin{zyukeizu}<W=2em>
          \Eda{2}{%
            \Eda{3}{%
              \Eda{4}{%
                \Eda{$\quad \cdots$}{%
          }}}}%
        \end{zyukeizu}\\

    \makebox[1.5em]{A}%
        \begin{zyukeizu}<W=2em>
           \Eda{A}{
           \Eda{A}{$\cdots$}
           \Eda{B}{}
           }
          \Eda{B}{
           \Eda{A}{$\cdots$}
           \Eda{\quad $\cdots$}{}
           }
          \end{zyukeizu}

\end{frame}
\begin{frame}{}
 \begin{tikzpicture}[grow=right,%基本(指定なし)は下の方向に枝が伸び,これを90度時計回りに回転させてような感じになる.
                                %したがって,AとBの順番がgrow=rightの場合感覚的に反対となる.
                     level 1/.style={sibling distance=15mm},%
                     level 2/.style={sibling distance=7.5mm}]
  \node(O){1}child{node{2}child{node{3}child{node{4}child{node(X)[white]{5}}}}};
  \node at($(O)+(0,-2)$){A}
   child{node{B}%
              child{node(ABB)[white]{B}}
              child{node(ABA){A}}
        }%
   child{node{A}%
             child{node(AAB){B}}
             child{node(AAA){A}}
        };
  \node at($(X)+(.5,0)$){$\cdots$};
  \node at(ABB)[right]{$\cdots$};
  \node at($(AAA)+(1.5,-.5)$){$\cdots$};
  \node at($(ABA)+(1.5,-.5)$){$\cdots$};
 \end{tikzpicture}
\end{frame}
\end{document}

▼関連発言

1343:beamer 樹形図がうまくいかない [imai] 12/10 14:54
 ├1344:Re:beamer 樹形図がうまくいかない [石原 守] 12/10 15:39
 │└1345:Re[2]:beamer 樹形図がうまくいかない [imai] 12/10 16:24
 └1346:Re:beamer 樹形図がうまくいかない [飯島 徹] 12/10 18:00<-last

Pass 保存


CGIROOM