Such a title may not be accurate, because it really can not explain exactly what "Linux under excellent text editor." In fact, I would like to explore this essay mainly Markdown, LaTeX, MathJax, interested friends can continue to look down, but do not forget easily point a praise.
We write articles what tools? Windows Notepad it? Certainly not now! Most people should use at least a similar Word "WYSIWYG" visual editor. Reason: Because the article is not just text Well, it contains a wide variety of formats, such as font, size, color, headers, lists, etc. "WYSIWYG" editor provides editing method is indeed the most simple editor thought: When you want to change some of the text style, you only need to select it, then set it in the various menus, dialog format can be. This layout is very beautiful, very rich style of the article, can be called "rich text."
If you were thinking deeper, you will find "rich text" many shortcomings, especially for those of us programmers TECHNOLOGY M is even more so. Below we cite a few examples:
"Rich Text" editor up too slow, when writing, that is, to consider the content of the article, but also consider the article format, for a long time to write a few paragraphs word will point the mouse;
"Rich Text" need a professional editor to edit and read, if not the editor, or editors are not compatible, and that only the tears;
"Rich Text" tends to make form override logic, the article may be viewed at all levels from the appearance of the title text size, indents are correct, but you can not specify a logical hierarchy;
"Rich text" formatting information too redundant, and flooded the contents of the article;
"Rich Text" unfriendly computer, opaque storage format does not say, but also to text-based tool for comparing (such as the type diff) useless.
So, good thought should be like this:
Articles should be stored as plain text, any tool can read and edit;
The contents of plain text that is to be fit for human reading, but also to computer easily understood;
Can specify the logical structure of the various parts of the article is correct;
Separation of content and display, the authors consider only the logical structure and content of the article, and the article shows how good-looking is a matter of professional people and tools.
This is what I said in the title of "text editor thought." This idea in the computer field for a long time, and gradually formed a philosophy. For example, the Internet is widely used in HTML, XML, etc., is to save the message as plain text, any tool can read and edit, and can correctly specify the logical structure of the content, and CSS and the browser how to display the control article. However, HTML tag or too much, if not the browser entirely by artificial brain supplement or too difficult to read. Thus, he was born Markdown.
Markdown features and tools
Markdown's mission is "Easy to read and write", so use Markdown syntax to write documents in plain text directly reading is also very convenient. If the appearance of the requirements are very high, it is possible through the appropriate tools Markdown documents into HTML or PDF. Markdown syntax is very simple, in general, more than one hour to learn.
At present, I made blog is basically using Markdown editor blog in blog park in the garden. Markdown realize blog Park is not perfect, for example, there is no instant preview feature, there is no segment continued behavior function, `\` $ \ `` incorrect interpretation, etc., but it is very comfortable to use, in addition to upload pictures, substantially without moving the mouse.
Why behavior segment continued function is very important?
Continued behavior section, another way is to ignore the non-blank line after the line breaks. This feature is very important. Without this feature, a section of text is a long, long, long line, which is based on comparing the text automation tools (such as diff) is undoubtedly a fatal blow. You can display line numbers for the editor concerned, the line numbers will be very jump, people looked uncomfortable. But the most important is that users do not always know exactly wrap it added to their own, or because the computer screen is not wide enough and wrap lines.
So whether it is Markdown or LaTeX, allows any author newline in the source code, as long as there are no blank lines of text lines split, these lines will be merged into a single paragraph. If you want to wrap in Markdown, you need at the end of a line increased by at least two spaces, and also allows users to use LaTeX \\ manual line breaks. So the question is, why get rid of garden blog such an important function?
In the Linux desktop, I use ReText edit Markdown document. Only in Ubuntu sudo apt-get install retext which can install the software
Configuring ReText use more beautiful CSS
Just installed ReText to preview the document may not be so good I figure above, should be like
References and code and body distinction is not obvious, and the font of the entire document display does not look good. The reason this happens is because no corresponding CSS file to ReText. The only regret is that certain configurations ReText can not be done through the menu, you must manually modify the configuration file ~ / .config / ReText project / ReText.conf
As for where to find a nice CSS, then the eyes of the beholder, the wise see wisdom. There are many good garden blog can learn.
Open support for mathematical formulas
Display mathematical formulas in Web pages thanks MathJax. Park open support blog mathematical formula is very simple, make a hook in admin page on the line. Due to the use of $ MathJax defined mathematical formulas, so there are a lot of articles or reviews $ sign students should pay attention. Think about it, my article with $ more? Really a lot, when AT & T introduced assembler syntax used to explore the Bash scripting, they also used, so publishing two articles that really cost me a lot of strength. In addition to $, MathJax also use \ (and \), $$ and $$ \ [and \] to define mathematical formula.
Since MathJax is so famous and excellent, so there is a corresponding MathJax ReText extension, but this time to modify the configuration file is ~ / .config / markdown-extensions.txt.
The first line of the configuration file is to open mathjax extension. As for the other extensions and features, you can read ReText help documentation.
See the text of the effect of the mathematical formula.
Effectiveness and efficiency are good, oh! At this point, my paperwork formally MathJax Markdown and take full control.