赞
踩
GitHub开发的跨平台编译器Atom中内置强大的markdown支持插件,完美支持实时预览、表格构建等功能,笔者喜欢用markdown写文档,而Atom自带的markdown-preview包并不支持实时预览,但是markdown-preview-plus包可实现实时预览,所以马上搭建起来。然而安装过程并不顺利。
搜索markdown-preview-plus包,直接点击install按钮,安装失败,换方法—到GitHub目录下载文件进行安装。
由于安装过程要用到Node.js的npm命令,所有先到官网下载安装:Node.js下载连接
markdown-preview-plus的Git-Hub目录
首先上面下载的zip压缩包一定要在C:\Users\PeaSt.atom\packages文件夹下解压,原因:
win+R打开CMD,cd进入刚刚解压的文件夹
cd C:\Users\PeaSt\.atom\packages\markdown-preview-plus-master
再使用nmp命令安装:
npm install
如果安装失败可以尝试清除npm缓存:
npm cache clean --force
重启Atom,markdown-preview-plus插件安装成功。
ctrl-shift-m #Toggle Preview,激活markdown-preview-plus
ctrl-shift-x #Toggle Math Rendering,数学公式渲染开启
效果:
Pandoc是加州伯克利分校的哲学系教授John MacFarlane用 Haskell 语言编写的生成和转化文档的功能强大的工具,在GitHub上开源:Pandoc GitHub
如果想输出markdown文档为pdf或HTML,可下载安装Pandoc:Pandoc安装包下载地址
Pandoc具体操作后续更新。
下载地址:atom安装包下载
cd到安装包所在文件夹后
sudo dpkg -i atom-amd64.deb
发现报错:
dpkg: dependency problems prevent configuration of atom:
atom depends on libgconf-2-4 (>= 3.2.5); however:
Package libgconf-2-4 is not installed. #由于缺少libgconf-2-4这个包,所以install
dpkg: error processing package atom (--install):
dependency problems - leaving unconfigured
Processing triggers for gnome-menus (3.13.3-11ubuntu1.1) ...
Processing triggers for desktop-file-utils (0.23-1ubuntu3.18.04.2) ...
Processing triggers for mime-support (3.60ubuntu1) ...
Errors were encountered while processing:
atom
由于缺少libgconf-2-4这个包,所以install:
sudo apt install libgconf-2-4
安装libgconf-2-4时又报错:
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
libgconf-2-4 : Depends: gconf2-common (= 3.2.6-4ubuntu1) but it is not going to be installed
Recommends: gconf-service
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).
使用系统给出的建议安装缺少的dependencies:
sudo apt --fix-broken install
修复成功后,再次安装Atom:
sudo dpkg -i atom-amd64.deb
安装成功:
(Reading database ... 305279 files and directories currently installed.)
Preparing to unpack atom-amd64.deb ...
Unpacking atom (1.53.0) over (1.53.0) ...
Setting up atom (1.53.0) ...
Processing triggers for gnome-menus (3.13.3-11ubuntu1.1) ...
Processing triggers for desktop-file-utils (0.23-1ubuntu3.18.04.2) ...
Processing triggers for mime-support (3.60ubuntu1) ...
应用列表里有了Atom图标,运行之。
ctrl+alt+T打开terminal,输入命令自动安装:
apm install markdown-preview-plus
安装成功:
Installing markdown-preview-plus to /home/zijiesun/.atom/packages ✓
重启Atom后在setting里发现原先的markdown-preview被自动disable了,所以直接调用即可(命令见上文)。
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。