2012-02-20 75 views
5

我怎么能保护重视像斜体或代码在Emacs组织模式 时,我有东西像组织模式:保护重点

/cologne/dome/ 

=<pre language="python">= 

+0

我不明白你的问题。也许你可以解释你现在得到什么以及你想做什么? – 2012-02-20 20:47:44

+0

这样的问题尚不清楚。在上面的例子中你想保护什么(输出是什么,你想要输出什么)? – 2012-02-20 23:18:01

+0

问题:我想装上去斜体,其包括用于斜体标记(=斜杠)或装上去的代码,其包括用于编码(=等号)的标记物。我有办法保护这些吗? – dshh2011 2012-02-21 00:32:48

回答

7

下组织块演示了其部分默认的工作和需要的变通少量工作。

下使用Org-mode version 7.8.03 (release_7.8.03.321.gaac1c)创建。如果您使用的是旧版本,则行为可能略有不同。

见ORG-手册中Literal ExamplesMonospace的全部细节

ORG
* Italics 
    - Your example simply works\\ 
    /cologne/dome/ 
    - It also works if your /example had/spaces within it/ 
    - It will only fail if/your /have spaces on one end or the other/
* Code 
    Code blocks can be delimited in multiple ways: 
** Inline formatting 
    - Using ~ for verbatim text works\\ 
     ~<pre language="python">~ 
    - ~ renders the same as = for blocks =test= ~test~ 
** Code Blocks 
    - Single-line blocks 
     : <pre language="python"> 
    - Multi-line blocks 
     #+BEGIN_EXAMPLE 
     asdf 
     #+END_EXAMPLE 
HTML导出
<div id="outline-container-1" class="outline-2"> 
<h2 id="sec-1"><span class="section-number-2">1</span> Italics</h2> 
<div class="outline-text-2" id="text-1"> 

<ul> 
<li>Your example simply works<br/> 
    <i>cologne/dome</i> 
</li> 
<li>It also works if your <i>example had/spaces within it</i> 
</li> 
<li>It will only fail if/your /have spaces on one end or the other/
</li> 
</ul> 

</div> 

</div> 

<div id="outline-container-2" class="outline-2"> 
<h2 id="sec-2"><span class="section-number-2">2</span> Code</h2> 
<div class="outline-text-2" id="text-2"> 

<p>Code blocks can be delimited in multiple ways: 
</p> 
</div> 

<div id="outline-container-2-1" class="outline-3"> 
<h3 id="sec-2-1"><span class="section-number-3">2.1</span> Inline formatting</h3> 
<div class="outline-text-3" id="text-2-1"> 

<ul> 
<li>Using ~ for verbatim text works<br/> 
    <code>&lt;pre language="python"&gt;</code> 
</li> 
<li>~ renders the same as = for blocks <code>test</code> <code>test</code> 
</li> 
</ul> 

</div> 

</div> 

<div id="outline-container-2-2" class="outline-3"> 
<h3 id="sec-2-2"><span class="section-number-3">2.2</span> Code Blocks</h3> 
<div class="outline-text-3" id="text-2-2"> 

<ul> 
<li>Single-line blocks 
<pre class="example"> 
&lt;pre language="python"&gt; 
</pre> 

</li> 
<li>Multi-line blocks 



<pre class="example">asdf 
</pre> 

</li> 
</ul> 
乳胶出口
\section{Italics} 
\label{sec-1} 

\begin{itemize} 
\item Your example simply works\\ 
\emph{cologne/dome} 
\item It also works if your \emph{example had/spaces within it} 
\item It will only fail if/your /have spaces on one end or the other/
\end{itemize} 
\section{Code} 
\label{sec-2} 

Code blocks can be delimited in multiple ways: 
\subsection{Inline formatting} 
\label{sec-2-1} 

\begin{itemize} 
\item Using \~{} for verbatim text works\\ 
\verb~<pre language="python">~ 
\item \~{} renders the same as = for blocks \texttt{test} \verb~test~ 
\end{itemize} 
\subsection{Code Blocks} 
\label{sec-2-2} 

\begin{itemize} 
\item Single-line blocks 
\begin{verbatim} 
    <pre language="python"> 
\end{verbatim} 
\item Multi-line blocks 

\begin{verbatim} 
asdf 
\end{verbatim} 
\end{itemize} 
+1

如前所述〜逐字〜工作,但它的报价打破了我,单双。此[链接](http://lists.gnu.org/archive/html/emacs-orgmode/2010-04/msg00330.html)由闭合之前添加U200B(ZERO WIDTH SPACE)字符〜帮助。 – nymo 2013-06-26 23:25:11

0

我猜你要输出的原始/cologne/dome/,但不是<i>cologne/dome</i>,对吧?

两种方式:

  1. 设置#+OPTIONS: *:nil关闭所有重点符号
  2. 修改org-emphasis-alist,删除相关项目

我也问过类似的问题在这里:How do I escape slash in org-mode?