2012-02-20 48 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?