1

如何在不破坏环境的 org-mode latex 导出的情况下将 Tikz 节点包含在列表环境中?

我有一些代码,它使用 Tikz 沿着几个列表项创建大括号。理想情况下,该列表应如下所示(这是我手动输入的 xelatex 代码......实际上我更喜欢“枚举”,但一次只做一件事):

\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 代码列表中的中断导致列表环境中断,因此当我只想要一个列表时,我最终得到了多个列表。

请参阅下面的组织模式代码:

* 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 回答