首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Org-mode:保护重点

Org-mode:保护重点
EN

Stack Overflow用户
提问于 2012-02-21 03:55:36
回答 2查看 1.9K关注 0票数 5

我如何在Emacs org-mode中保护重点,比如斜体或代码

代码语言:javascript
复制
/cologne/dome/

代码语言:javascript
复制
=<pre language="python">=
EN

回答 2

Stack Overflow用户

发布于 2012-02-21 09:11:04

下面的org-block演示了哪些部分默认工作,哪些需要少量的变通工作。

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

有关详细信息,请参阅组织-手册中的Literal ExamplesMonospace

组织

代码语言:javascript
复制
* 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导出

代码语言:javascript
复制
<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>

LaTeX导出

代码语言:javascript
复制
\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}
票数 7
EN

Stack Overflow用户

发布于 2013-03-11 16:11:11

我猜您想输出原始的/cologne/dome/,而不是<i>cologne/dome</i>,对吧?

两种方式:

  1. set #+OPTIONS: *:nil要关闭所有emphasis symbols
  2. modify org-emphasis-alist,请删除相关项目

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

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/9367565

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档