zoukankan      html  css  js  c++  java
  • Arch Linux 使用markdown

    Arch Linux 使用markdown

    ## pandoc ##

    pandoc号称文件格式转换的瑞士军刀,这里主要是用来把marddown文件转换成html。
    Arch需要安装haskell-pandoc,arch.2015.07的标准库里没有haskell-doc, AUR里的haskell-pandoc有依赖问题,安装失败。
    到pandoc的官网看一下能不能源码安装,根据安装指示到了ArchHaskell-wiki

    • haskell-core
    • haskell-happstack
    # edit /etc/pacman.conf to add repository
    [haskell-core]
    Server = http://orbitalfox.com/haskell/core/$arch
    [haskell-happstack]
    Server = http://noaxiom.org/$repo/$arch
    
    # Add Magnus Therning's key of haskell-core
    pacman-key -r 4209170B
    pacman-key --lsign-key 4209170B
    # Add Magnus Therning's key of haskell-happstack
    pacman-key -r B0544167
    pacman-key --lsign-key B0544167
    # refresh package list and install pandoc
    pacman -Syu
    pacman -S haskell-pandoc
    

    ## pygments ##

    # install pygements
    pacman -S python-pygments                                                                                               
    

    ## markdown-mode ##

    yaourt -S emacs-goodies-el                                                                                              
    
    ;; edit ~/.emacs 
    (add-to-list 'load-path "emacs-goodies-el")                                                                             
    (autoload 'markdown-mode "markdown-mode.el" "Major mode for editing Markdown files" t)                                  
    (add-to-list 'auto-mode-alist '("\.markdown\'". markdown-mode))                                                       
    (add-to-list 'auto-mode-alist '("\.md\'". markdown-mode))                                                             
    (custom-set-variables                                                                                                   
    '(markdown-command "pandoc -f markdown -t html -s --mathml --highlight-style pygments"))                                
    

    markdown-mode 快捷键

    • C-c C-t $nu: Title 插入标题1...6
    • C-c C-s e : Style emphasis,斜体
    • C-c C-s s : Style strong,加粗
    • C-c C-c e : Control 保存html
    • C-c C-c v : 保存html,并用浏览器查看
    • C-c C-c p : 并用浏览器查看
  • 相关阅读:
    Altera Coding Style 之多路选择器
    Altera Coding Style 之 时钟切换
    Altera Coding Style 之状态机
    Altera Coding Style 之 Latch
    Altera Coding Style 之 加法器
    JS代码小集合
    汉字转换字符C#(c shap) 代码
    php动态调用方法
    JavaScript 拖放效果
    C# 取得域名及目录地址
  • 原文地址:https://www.cnblogs.com/elmaple/p/4621228.html
Copyright © 2011-2022 走看看