LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 986|回复: 9

emacs中转html

[复制链接]
发表于 2005-11-13 03:52:23 | 显示全部楼层 |阅读模式
rt
在emacs中怎么象vim中一样把字符文档转换成html?
发表于 2005-11-13 19:39:28 | 显示全部楼层
试试bhl-mode
in your debian/sarge
# apt-get install bhl
回复 支持 反对

使用道具 举报

 楼主| 发表于 2005-11-14 13:35:52 | 显示全部楼层
谢谢,但是那个好象是mule用的?还是Xemacs21用的?
我用的是GNU emacs,还有就是这个怎么用呢?
回复 支持 反对

使用道具 举报

发表于 2005-11-14 13:48:32 | 显示全部楼层
回复 支持 反对

使用道具 举报

发表于 2005-11-14 16:34:48 | 显示全部楼层
Post by pank7.yardbird
谢谢,但是那个好象是mule用的?还是Xemacs21用的?
我用的是GNU emacs,还有就是这个怎么用呢?


我在gnu emacs下面用阿。怎么用?打开文本文件,M-x bhl-mode。看看bhl的菜单~

bhl只依赖于emacsen!

$dpkg -s bhl
Package: bhl
Status: install ok installed
Priority: optional
Section: editors
Installed-Size: 280
Maintainer: Mario Lang <mlang@debian.org>
Architecture: all
Version: 1.7.3-1
Depends: emacs21 | emacsen
Conffiles:
/etc/emacs/site-start.d/50bhl.el 0a9bcb07827545cfa9ea61c7380ef5ba
Description: Emacs mode for converting brut text to HTML and LaTeX
BHL is an Emacs mode that enables you to convert brut text files into
HTML, LaTeX and SGML files.  "BHL" is an acronym for: "from *B*rut to
*H*tml and *L*aTeX" (SGML was implemented later).
.
In order to convert TXT files into other formats, you need to use some
syntactical elements.  The purpose of this mode is to use the most
invisible and convenient syntax.  Invisible syntax means that the
source file must be as readable as possible (like any TXT file must be).
Convenient syntax means that the syntax must fit user's habits.
回复 支持 反对

使用道具 举报

 楼主| 发表于 2005-11-14 20:49:43 | 显示全部楼层
谢谢了,但是这个好象不是我要的效果,不知道你有没有用过vim里的2html.vim?
级是那样,直接连颜色都转换的。
回复 支持 反对

使用道具 举报

发表于 2005-11-15 17:08:12 | 显示全部楼层
Post by pank7.yardbird
谢谢了,但是这个好象不是我要的效果,不知道你有没有用过vim里的2html.vim?
级是那样,直接连颜色都转换的。


没用过,我是vim菜鸟:-P

连颜色都转换是指转换语法高亮的颜色么?bhl-mode好像是作不了这个。
回复 支持 反对

使用道具 举报

发表于 2005-11-15 21:51:31 | 显示全部楼层
替楼主回复楼上:
VIM 中可以把带有颜色加亮的文档, 比如程序代码或者是脚本文件, 转换成具有相同浏览效果的 HTML, 即是说, 打开转换后的网页, 可以看到在 VIM 中相同的缩进和颜色加亮等效果
回复 支持 反对

使用道具 举报

发表于 2005-11-15 23:23:38 | 显示全部楼层
楼主要的应该是 htmlize 吧:
http://www.emacswiki.org/cgi-bin/wiki/SaveAsHtml
回复 支持 反对

使用道具 举报

 楼主| 发表于 2005-11-16 11:21:41 | 显示全部楼层
谢谢楼上的大哥,就是这个效果了!
谢谢!
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表