测试-orgmode
宋望
2023-12-01
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
<title>Initial</title>
<!-- 2016-06-17 周五 09:54 -->
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
<meta name="generator" content="Org-mode" />
<style type="text/css">
<!--/*--><![CDATA[/*><!--*/
.title { text-align: center; }
.todo { font-family: monospace; color: red; }
.done { color: green; }
.tag { background-color: #eee; font-family: monospace;
padding: 2px; font-size: 80%; font-weight: normal; }
.timestamp { color: #bebebe; }
.timestamp-kwd { color: #5f9ea0; }
.right { margin-left: auto; margin-right: 0px; text-align: right; }
.left { margin-left: 0px; margin-right: auto; text-align: left; }
.center { margin-left: auto; margin-right: auto; text-align: center; }
.underline { text-decoration: underline; }
#postamble p, #preamble p { font-size: 90%; margin: .2em; }
p.verse { margin-left: 3%; }
pre {
border: 1px solid #ccc;
box-shadow: 3px 3px 3px #eee;
padding: 8pt;
font-family: monospace;
overflow: auto;
margin: 1.2em;
}
pre.src {
position: relative;
overflow: visible;
padding-top: 1.2em;
}
pre.src:before {
display: none;
position: absolute;
background-color: white;
top: -10px;
right: 10px;
padding: 3px;
border: 1px solid black;
}
pre.src:hover:before { display: inline;}
pre.src-sh:before { content: 'sh'; }
pre.src-bash:before { content: 'sh'; }
pre.src-emacs-lisp:before { content: 'Emacs Lisp'; }
pre.src-R:before { content: 'R'; }
pre.src-perl:before { content: 'Perl'; }
pre.src-java:before { content: 'Java'; }
pre.src-sql:before { content: 'SQL'; }
table { border-collapse:collapse; }
caption.t-above { caption-side: top; }
caption.t-bottom { caption-side: bottom; }
td, th { vertical-align:top; }
th.right { text-align: center; }
th.left { text-align: center; }
th.center { text-align: center; }
td.right { text-align: right; }
td.left { text-align: left; }
td.center { text-align: center; }
dt { font-weight: bold; }
.footpara:nth-child(2) { display: inline; }
.footpara { display: block; }
.footdef { margin-bottom: 1em; }
.figure { padding: 1em; }
.figure p { text-align: center; }
.inlinetask {
padding: 10px;
border: 2px solid gray;
margin: 10px;
background: #ffffcc;
}
#org-div-home-and-up
{ text-align: right; font-size: 70%; white-space: nowrap; }
textarea { overflow-x: auto; }
.linenr { font-size: smaller }
.code-highlighted { background-color: #ffff00; }
.org-info-js_info-navigation { border-style: none; }
#org-info-js_console-label
{ font-size: 10px; font-weight: bold; white-space: nowrap; }
.org-info-js_search-highlight
{ background-color: #ffff00; color: #000000; font-weight: bold; }
/*]]>*/-->
</style>
<script type="text/javascript">
/*
@licstart The following is the entire license notice for the
JavaScript code in this tag.
Copyright (C) 2012-2013 Free Software Foundation, Inc.
The JavaScript code in this tag is free software: you can
redistribute it and/or modify it under the terms of the GNU
General Public License (GNU GPL) as published by the Free Software
Foundation, either version 3 of the License, or (at your option)
any later version. The code is distributed WITHOUT ANY WARRANTY;
without even the implied warranty of MERCHANTABILITY or FITNESS
FOR A PARTICULAR PURPOSE. See the GNU GPL for more details.
As additional permission under GNU GPL version 3 section 7, you
may distribute non-source (e.g., minimized or compacted) forms of
that code without the copy of the GNU GPL normally required by
section 4, provided you include this license notice and a URL
through which recipients can access the Corresponding Source.
@licend The above is the entire license notice
for the JavaScript code in this tag.
*/
<!--/*--><![CDATA[/*><!--*/
function CodeHighlightOn(elem, id)
{
var target = document.getElementById(id);
if(null != target) {
elem.cacheClassElem = elem.className;
elem.cacheClassTarget = target.className;
target.className = "code-highlighted";
elem.className = "code-highlighted";
}
}
function CodeHighlightOff(elem, id)
{
var target = document.getElementById(id);
if(elem.cacheClassElem)
elem.className = elem.cacheClassElem;
if(elem.cacheClassTarget)
target.className = elem.cacheClassTarget;
}
/*]]>*///-->
</script>
<script type="text/javascript" src="http://orgmode.org/mathjax/MathJax.js"></script>
<script type="text/javascript">
<!--/*--><![CDATA[/*><!--*/
MathJax.Hub.Config({
// Only one of the two following lines, depending on user settings
// First allows browser-native MathML display, second forces HTML/CSS
// config: ["MMLorHTML.js"], jax: ["input/TeX"],
jax: ["input/TeX", "output/HTML-CSS"],
extensions: ["tex2jax.js","TeX/AMSmath.js","TeX/AMSsymbols.js",
"TeX/noUndefined.js"],
tex2jax: {
inlineMath: [ ["\\(","\\)"] ],
displayMath: [ ['$$','$$'], ["\\[","\\]"], ["\\begin{displaymath}","\\end{displaymath}"] ],
skipTags: ["script","noscript","style","textarea","pre","code"],
ignoreClass: "tex2jax_ignore",
processEscapes: false,
processEnvironments: true,
preview: "TeX"
},
showProcessingMessages: true,
displayAlign: "center",
displayIndent: "2em",
"HTML-CSS": {
scale: 100,
availableFonts: ["STIX","TeX"],
preferredFont: "TeX",
webFont: "TeX",
imageFont: "TeX",
showMathMenu: true,
},
MMLorHTML: {
prefer: {
MSIE: "MML",
Firefox: "MML",
Opera: "HTML",
other: "HTML"
}
}
});
/*]]>*///-->
</script>
</head>
<body>
<div id="content">
<h1 class="title">Initial</h1>
<div id="table-of-contents">
<h2>Table of Contents</h2>
<div id="text-table-of-contents">
<ul>
<li><a href="#sec-1">1. EMACS学习笔记</a>
<ul>
<li><a href="#sec-1-1">1.1. 安装</a></li>
<li><a href="#sec-1-2">1.2. 代码高亮插件</a></li>
<li><a href="#sec-1-3">1.3. 主题配色改变</a></li>
<li><a href="#sec-1-4">1.4. 自动换行</a></li>
</ul>
</li>
</ul>
</div>
</div>
<div id="outline-container-sec-1" class="outline-2">
<h2 id="sec-1"><span class="section-number-2">1</span> EMACS学习笔记</h2>
<div class="outline-text-2" id="text-1">
</div><div id="outline-container-sec-1-1" class="outline-3">
<h3 id="sec-1-1"><span class="section-number-3">1.1</span> 安装</h3>
<div class="outline-text-3" id="text-1-1">
<p>
直接解压就可以了(有一种绿色版的感觉)
解压之后,在我个人的机器上是这么干的:
</p>
<ol class="org-ol">
<li>运行addpm.exe他会提示你是否安装,选个是,其实我也不知道有没有什么用
</li>
<li>千万不要有中文目录,会报错
</li>
<li>然后直接运行下面几个中的一个就行,没看出有什么区别
<ol class="org-ol">
<li>emacs.exe
</li>
<li>emacs-24.5.exe
</li>
</ol>
</li>
</ol>
</div>
</div>
<div id="outline-container-sec-1-2" class="outline-3">
<h3 id="sec-1-2"><span class="section-number-3">1.2</span> 代码高亮插件</h3>
<div class="outline-text-3" id="text-1-2">
<p>
目前网上的代码高亮插件的配置确实让人看不懂,我的步骤是这样的:
</p>
<ol class="org-ol">
<li>首先,从各种渠道搞到那个htmlize.el文件或者它的代码都是可以的(似乎只能做到导出的html文件高亮,但是也够用了)
</li>
<li>把这个文件放入目录:C:\Users\CeShi\AppData\Roaming\.emacs.d (CeShi是我的计算机的用户名),当然,emacs本身会警告你,最好把这个文件放在这个目录的子目录下面,否则可能有问题,不管也是可以的
</li>
<li>在以下几个文件当中进行修改
<ol class="org-ol">
<li>所在目录\emacs-24.5-bin-i686-mingw32\share\emacs\site-lisp\subdirs.el
</li>
<li>所在目录\emacs-24.5-bin-i686-mingw32\share\emacs\24.5\site-lisp\subdirs.el
</li>
<li>所在目录\emacs-24.5-bin-i686-mingw32\share\emacs\24.5\lisp\subdirs.el
</li>
</ol>
</li>
</ol>
<p>
我到现在也没有搞清楚这几个文件的具体差别,各种网页上所说的“修改.emacs文件”其实和改他的效果是一样的(至少我这么觉得)
要改总是三个一起改,修改的内容是加入以下代码:
</p>
<p>
(setq load-path (append (list (expand-file-name "~/.emacs.d/")) load-path))
</p>
<p>
(setq load-path (append (list (expand-file-name "D:/-404-emacs<sub>note</sub>/emacs-24.5-bin-i686-mingw32/share/emacs/24.5/lisp/emacs-lisp")) load-path))
</p>
<p>
(require 'htmlize) ;htmlize.el
</p>
<p>
(setq org-src-fontify-natively t)
</p>
<p>
其中
</p>
<ul class="org-ul">
<li>第二条的前面的路径是我的计算机的,需要根据自己的位置进行一点小调整
</li>
<li>第二条好多的介绍没有写,但是我如果不加的话就是过不了,原因是htmlize.el自己要加载另外的el文件,那些文件统统都在这个路径底下
</li>
<li>第四条是一个“在编辑器里面直接看到自动高亮”的设置
</li>
</ul>
<p>
改完了之后,代码高亮应该就能实现了,语法是这样的:
</p>
<div class="org-src-container">
<pre class="src src-c"><span style="color: #228b22;">void</span> <span style="color: #0000ff;">main</span>(<span style="color: #228b22;">void</span>)
{
<span style="color: #228b22;">int</span> <span style="color: #a0522d;">a</span>;
<span style="color: #228b22;">int</span> <span style="color: #a0522d;">b</span>;
<span style="color: #228b22;">int</span> <span style="color: #a0522d;">c</span> = a + b;
}
</pre>
</div>
</div>
</div>
<div id="outline-container-sec-1-3" class="outline-3">
<h3 id="sec-1-3"><span class="section-number-3">1.3</span> 主题配色改变</h3>
<div class="outline-text-3" id="text-1-3">
<p>
这可能是最容易的了
</p>
<ol class="org-ol">
<li>alt+x 进入命令控制台
</li>
<li>输入load-theme
</li>
<li>输入相应的主题,目前感觉合适的是
<ol class="org-ol">
<li>deeper-bule
</li>
<li>tango(适合输出浅色背景)
</li>
<li>tango-dark(平常看比较合适)
</li>
</ol>
</li>
</ol>
</div>
</div>
<div id="outline-container-sec-1-4" class="outline-3">
<h3 id="sec-1-4"><span class="section-number-3">1.4</span> 自动换行</h3>
<div class="outline-text-3" id="text-1-4">
<p>
也是那几个文件里面,加入一个:
(add-hook 'org-mode-hook (lambda () (setq truncate-lines nil)))
即可
</p>
</div>
</div>
</div>
</div>
<div id="postamble" class="status">
<p class="date">Created: 2016-06-17 周五 09:54</p>
<p class="creator"><a href="http://www.gnu.org/software/emacs/">Emacs</a> 24.5.1 (<a href="http://orgmode.org">Org</a> mode 8.2.10)</p>
<p class="validation"><a href="http://validator.w3.org/check?uri=referer">Validate</a></p>
</div>
</body>
</html>