1

org-mode latex export が環境を破壊することなく、リスト環境内に Tikz ノードを含めるにはどうすればよいですか?

Tikz を使用していくつかのリスト項目に沿って中括弧を作成するコードがいくつかあります。リストは理想的には次のようになります (これは手動で入力した xelatex コードです...実際には、一度に 1 つずつ「列挙」することをお勧めします):

\begin{itemize}[noitemsep=nosep]
   \item who tells (to whom)?
     \tikz[remember picture] \node[coordinate,yshift=0.5em] (n1) {}; %max 2 sentences
   \item what happens?
   \item to whom?
   \item with what result?
     \tikz[remember picture] \node[coordinate] (n2) {};
     \tikz[remember picture] \node[coordinate, yshift=0.5em] (n3) {}; %max 4 sentences
   \item beginning
   \item how action rises
   \item climax
   \item denouncement
     \tikz[remember picture] \node[coordinate] (n4) {};
\end{itemize}

問題: Tikz コードのリストの中断がリスト環境の中断を引き起こしているため、リストが 1 つだけ必要な場合でも、複数のリストが作成されてしまいます。

以下の組織モードのコードを参照してください。

* My list starts here
 -  who tells (to whom)?
      #+BEGIN_LaTeX
      \tikz[remember picture]\node[coordinate,yshift=0.5em] (n1) {}; 
      #+END_LaTeX
 -  what happens?
 -  to whom?
 -  with what result?
     #+BEGIN_LaTeX
     \tikz[remember picture] \node[coordinate] (n2) {};\tikz[remember picture] \node[coordinate, yshift=0.5em] (n3) {}; 
     #+END_LaTeX
 -  beginning
 -  how action rises
 -  climax
 -  denouncement
     #+BEGIN_LaTeX
     \tikz[remember picture] \node[coordinate] (n4) {};
     #+END_LaTeX

ここでラテックス出力を参照してください。

\begin{itemize}
\item who tells (to whom)?
\end{itemize} <--THIS IS THE PROBLEM, HOW CAN I STOP THE ITEMIZE ENVIRONMENT FROM ENDING HERE
\tikz[remember picture]\node[coordinate,yshift=0.5em] (n1) {}; 
\begin{itemize}
\item what happens?
\item to whom?
\item with what result?
\end{itemize}<--THIS IS THE PROBLEM AGAIN
\tikz[remember picture] \node[coordinate] (n2) {};\tikz[remember
picture] \node[coordinate, yshift=0.5em] (n3) {}; 
\begin{itemize}
\item beginning
\item how action rises
\item climax
\item denouncement
\end{itemize}<--THIS IS THE PROBLEM AGAIN, IT SHOULD BE THE ONLY \end{itemize} AND AT THE BOTTOM
\tikz[remember picture] \node[coordinate] (n4) {};
4

1 に答える 1

1

この問題に対する答えは、リスト内の tikz コードをインデントすることです。このウェブサイトのコードを読みやすくするためにインデントした後、それが解決策であることに気付きました。rvf0068 が提案した org-mode の新しいバージョンをテストしていたとき、インデントが解決策であることに気づきました。

-  who tells (to whom)?
   #+BEGIN_LaTeX
   \tikz[remember picture]\node[coordinate,yshift=0.5em] (n1) {}; 
   #+END_LaTeX
 -  what happens?
 -  to whom?
 -  with what result?

いいえ

-  who tells (to whom)?
#+BEGIN_LaTeX
\tikz[remember picture]\node[coordinate,yshift=0.5em] (n1) {}; 
#+END_LaTeX
 -  what happens?
 -  to whom?
 -  with what result?
于 2012-10-24T05:52:49.303 に答える