如何用markdown写微信或邮件

  1. 在chrome和firefox浏览器中安装extension "Markdown Here"
  2. 在微信后台写或者粘贴markdown文本,然后"ctrl+alt+M", 文本就会变成渲染后的markdown 格式。
  3. 如果需要编辑,就重复"ctrl+alt+M", 然后文本会取消渲染效果,然后继续编辑,重复快捷键去渲染。直接发布就可以了。

值得注意的是:

  • 微信后台似乎不支持数学公式直接居中的表达,比如 $$ f(x)=x^2+1$$,而其他的一些编辑器支持。比如sublime text 2 + pandoc,或者markdown preview to html等。
  • 所以可以直接在sublime text写好之后,用pandoc 转成pdf,或者直接用markdown preview "ctrl+alt+M" 去查看渲染之后的效果。可以支持修改文件,然后refresh html去查看。
  • 写书也挺适合用markdown的,可以直接用pandoc转成许多其他格式,比如epub等。
  • 还可以直接写latex文档,以及latex slides 等等。

How to set up pandoc shortcut in sublime text 2

install pandoc

  • Suppose you have installed the package control in ST2, then "Command+Shift+P" or "tools > Command Palette" will pop out the dialog.

  • type "install packages"

  • type "pandoc", choose the most general one just with this name.

create short cut

  • In a normal way, you can just open "command palette" by "cmd+shift+p", and then type "pandoc", then type "PDF" or any other format you like.

  • Creating shortcut can help you save the typing "pandoc":

  1. Preferences > Key binding users
  2. Add { "keys": ["ctrl+alt+p"], "command": "pandoc"} in to the file.

For example, after adding, my files looks like:

[  { "keys": ["ctrl+alt+m"], "command": "markdown_preview", "args": {"target": "browser", "parser":"markdown"} }  ,  { "keys": ["ctrl+alt+p"], "command": "pandoc"}   ]  

Then in your markdown file, you can just use shortcut "ctrl+alt+p" then type "pdf" you can immediately convert it to pdf.

How to use pandoc to convert markdown files to pdf with math formula?

Pandoc Plugin for Sublime Text 2

A Sublime Text plugin that uses Pandoc to convert text from one markup format into another. Pandoc can convert documents in markdown, reStructuredText, textile, HTML, DocBook, LaTeX, MediaWiki markup, OPML, or Haddock markup to XHTML, HTML5, HTML slide shows using Slidy, reveal.js, Slideous, S5, or DZSlides, Microsoft Word docx, OpenOffice/LibreOffice ODT, OpenDocument XML, EPUB version 2 or 3, FictionBook2, DocBook, GNU TexInfo, Groff man pages, Haddock markup, OPML, LaTeX, ConTeXt, LaTeX Beamer slides, PDF via LaTeX, Markdown, reStructuredText, AsciiDoc, MediaWiki markup, Emacs Org-Mode, Textile, or custom writers can be written in lua.

Installation

You need to install Pandoc, and this module:

Usage

The input format is specified by setting the syntax of the document.

Run Pandoc on the current document via the Command Palette (Command+Shift+P on OS X, Control+Shift+P on Linux/Windows) by selecting "Pandoc". You will be presented with output formats to choose from.

Configure

You can fully configure the available formats, and configure the Pandoc options to customize transformation, via the plugin settings file. Via the application menu, go to "Preferences" -> "Package Settings" -> "Pandoc".

how to use markdown in sublime text 2

Install package control:

https://packagecontrol.io/installation#st2

Install MarkdownEditing

http://lucifr.com/2012/07/12/markdownediting-for-sublime-text-2/

Markdown preview

Follow this link for markdown preview:
https://github.com/revolunet/sublimetext-markdown-preview

Installation :

Using Package Control (Recommended)

For all Sublime Text 2/3 users we recommend install via Package Control.

Install Package Control if you haven't yet.
Use cmd+shift+P then Package Control: Install Package
Look for Markdown Preview and install it.

To preview :

optionally select some of your markdown for conversion
use cmd+shift+P then Markdown Preview to show the follow commands (you will be prompted to select which parser you prefer):

Markdown Preview: Preview in Browser
Markdown Preview: Export HTML in Sublime Text
Markdown Preview: Copy to Clipboard
Markdown Preview: Open Markdown Cheat sheet

or bind some key in your user key binding, using a line like this one: { "keys": ["alt+m"], "command": "markdown_preview", "args": {"target": "browser", "parser":"markdown"} }, for a specific parser and target or { "keys": ["alt+m"], "command": "markdown_preview_select", "args": {"target": "browser"} }, to bring up the quick panel to select enabled parsers for a given target.
once converted a first time, the output HTML will be updated on each file save (with LiveReload plugin)

Note:

If you want to set the keymap, just " preference> package setting> key bindings - user, and note to use the argument as above.

Then it is really convenient for you to use.

How to make sure "alt+z" is for typing Greek Omega in visual studio code

Just click preference of vscode and then in the json file, add:

{ "key": "alt+z",      "command": "-editor.action.toggleWordWrap",
                         "when": "editorTextFocus" }

in the keybinding.json.


This is from: https://code.visualstudio.com/docs/customization/keybindings

Removing a specific key binding rule

You can write a key binding rule that targets the removal of a specific default key binding. With the keybindings.json, it was always possible to redefine all the key bindings of VS Code, but it can be very difficult to make a small tweak, especially around overloaded keys, such as Tab or Escape. To remove a specific key binding, simply add a - to the command and the rule will be a removal rule.

Here is an example:

// In Default Keyboard Shortcuts  ...  { "key": "tab", "command": "tab", "when": ... },  { "key": "tab", "command": "editor.emmet.action.expandAbbreviation", "when": ... },  { "key": "tab", "command": "jumpToNextSnippetPlaceholder", "when": ... },  { "key": "tab", "command": "acceptQuickFixSuggestion", "when": ... },  { "key": "tab", "command": "acceptSelectedSuggestion", "when": ... },  ...    // To remove the second rule, for example, add in keybindings.json:  { "key": "tab", "command": "-editor.emmet.action.expandAbbreviation" }    

How to make pycharm work with tensorflow

Install tensorflow on your console follow the tensorflow installation.

Then go to python on console, and then print sys.version, you will see where tensorflow is installed to. Then you can use that one to set your pycharm.
PyCharm. And note that On macOS this might be a path such as ~/anaconda/bin/python or /Users/jsmith/anaconda/bin/python.

The former are a short link.

You can just open the system preference and set the project interpreter. Add the path to the pycharm and then you can run the tensorflow from there.