mirror of
https://github.com/LCTT/TranslateProject.git
synced 2024-12-26 21:30:55 +08:00
翻译完成 by soooogreen
This commit is contained in:
parent
21adf175f9
commit
5c24e22135
@ -1,186 +0,0 @@
|
||||
How to create and show a presentation from the command line on Linux
|
||||
================================================================================
|
||||
When you prepare a talk for audience, the first thing that will probably come to your mind is shiny presentation charts filled with fancy diagrams, graphics and animation effects. Fine. No one can deny the power of visually charming presentation. However, not all presentations need to be Ted talk quality. Often times, the purpose of a presentation is to convey specific information, which can easily be done with textual messages. In such cases, your time can be better spent on gathering information and checking facts, rather than searching for good-looking graphics from Google Image.
|
||||
|
||||
In the world of Linux, you can do presentation in several different ways, e.g., Impress for multimedia-rich content, [Impress.js][1] for stunning visualization, Beamer for hardcore LaTex users, and so on. If you are looking for a simple means to create and show a textual presentation, look no further. [mdp][2] can get the job done for you.
|
||||
|
||||
### What is Mdp? ###
|
||||
|
||||
mdp is an ncurses-based command-line presentation tool for Linux. What I like about mdp is its [markdown][3] support, which makes it easy to create slides with familiar markdown format. Naturally, it becomes painless to publish the slides in HTML format as well. Another plus is its support for UTF-8 character encoding, which comes in handy when showing non-English characters (e.g., Greek or Cyrillic alphabets).
|
||||
|
||||
### Install Mdp on Linux ###
|
||||
|
||||
Installation of mdp is mostly painless due to its light dependency requirement (i.e., ncursesw).
|
||||
|
||||
#### Debian, Ubuntu or their derivatives ####
|
||||
|
||||
$ sudo apt-get install git gcc make libncursesw5-dev
|
||||
$ git clone https://github.com/visit1985/mdp.git
|
||||
$ cd mdp
|
||||
$ make
|
||||
$ sudo make install
|
||||
|
||||
#### Fedora or CentOS/RHEL ####
|
||||
|
||||
$ sudo yum install git gcc make ncurses-devel
|
||||
$ git clone https://github.com/visit1985/mdp.git
|
||||
$ cd mdp
|
||||
$ make
|
||||
$ sudo make install
|
||||
|
||||
#### Arch Linux ####
|
||||
|
||||
On Arch Linux, you can easily install mdp from [AUR][4].
|
||||
|
||||
### Create a Presentation from the Command Line ###
|
||||
|
||||
Once you installed mdp, you can easily create a presentation by using your favorite text editor. If you are familiar with markdown, it will take no time to master mdp. For those of you who are not familiar with markdown, starting with an example is the best way to learn mdp.
|
||||
|
||||
Here is a 6-page sample presentation for your reference.
|
||||
|
||||
%title: Sample Presentation made with mdp (Xmodulo.com)
|
||||
%author: Dan Nanni
|
||||
%date: 2015-01-28
|
||||
|
||||
-> This is a slide title <-
|
||||
=========
|
||||
|
||||
-> mdp is a command-line based presentation tool with markdown support. <-
|
||||
|
||||
*_Features_*
|
||||
|
||||
* Multi-level headers
|
||||
* Code block formatting
|
||||
* Nested quotes
|
||||
* Nested list
|
||||
* Text highlight and underline
|
||||
* Citation
|
||||
* UTF-8 special characters
|
||||
|
||||
-------------------------------------------------
|
||||
|
||||
-> # Example of nested list <-
|
||||
|
||||
This is an example of multi-level headers and a nested list.
|
||||
|
||||
# first-level title
|
||||
|
||||
second-level
|
||||
------------
|
||||
|
||||
- *item 1*
|
||||
- sub-item 1
|
||||
- sub-sub-item 1
|
||||
- sub-sub-item 2
|
||||
- sub-sub-item 3
|
||||
- sub-item 2
|
||||
|
||||
-------------------------------------------------
|
||||
|
||||
-> # Example of code block formatting <-
|
||||
|
||||
This example shows how to format a code snippet.
|
||||
|
||||
1 /* Hello World program */
|
||||
2
|
||||
3 #include <stdio.h>
|
||||
4
|
||||
5 int main()
|
||||
6 {
|
||||
7 printf("Hello World");
|
||||
8 return 0;
|
||||
9 }
|
||||
|
||||
This example shows inline code: `sudo reboot`
|
||||
|
||||
-------------------------------------------------
|
||||
|
||||
-> # Example of nested quotes <-
|
||||
|
||||
This is an example of nested quotes.
|
||||
|
||||
# three-level nested quotes
|
||||
|
||||
> This is the first-level quote.
|
||||
>> This is the second-level quote
|
||||
>> and continues.
|
||||
>>> *This is the third-level quote, and so on.*
|
||||
|
||||
-------------------------------------------------
|
||||
|
||||
-> # Example of citations <-
|
||||
|
||||
This example shows how to place a citation inside a presentation.
|
||||
|
||||
This tutorial is published at [Xmodulo](http://xmodulo.com)
|
||||
|
||||
You are welcome to connect with me at [LinkedIn](http://www.linkedin.com/in/xmodulo)
|
||||
|
||||
Pretty cool, huh?
|
||||
|
||||
-------------------------------------------------
|
||||
|
||||
-> # Example of UTF-8 special characters <-
|
||||
|
||||
This example shows UTF-8 special characters.
|
||||
|
||||
ae = ä, oe = ö, ue = ü, ss = ß
|
||||
alpha = ?, beta = ?, upsilon = ?, phi = ?
|
||||
Omega = ?, Delta = ?, Sigma = ?
|
||||
|
||||
???????????
|
||||
?rectangle?
|
||||
???????????
|
||||
|
||||
### Show a Presentation from the Command Line ###
|
||||
|
||||
Once you save the above code as slide.md text file, you can show the presentation by simply running:
|
||||
|
||||
$ mdp slide.md
|
||||
|
||||
You can navigate the presentation by pressing Enter/Space/Page-Down/Down-Arrow (next slide), Backspace/Page-Up/Up-Arrow (previous slide), Home (first slide), End (last slide), or numeric-N (N-th slide).
|
||||
|
||||
The title of the presentation appears on top of each slide, and your name and page number are shown at the bottom.
|
||||
|
||||
![](https://farm9.staticflickr.com/8637/16392457702_ec732d0094_c.jpg)
|
||||
|
||||
This is an example of a nested list and multi-level headers.
|
||||
|
||||
![](https://farm9.staticflickr.com/8567/16367397606_29be7df633_c.jpg)
|
||||
|
||||
This is an example of a code snippet and inline code.
|
||||
|
||||
![](https://farm9.staticflickr.com/8682/15770926144_0f982b0863_b.jpg)
|
||||
|
||||
This is an example of nested quotes.
|
||||
|
||||
![](https://farm9.staticflickr.com/8587/16393383115_0865c8b89b_c.jpg)
|
||||
|
||||
This is an example of placing citations.
|
||||
|
||||
![](https://farm8.staticflickr.com/7409/16392457712_ed36c14bc2_c.jpg)
|
||||
|
||||
This is an example of UTF-8 special characters.
|
||||
|
||||
![](https://farm9.staticflickr.com/8648/16205981560_7fa3debc75_c.jpg)
|
||||
|
||||
### Summary ###
|
||||
|
||||
In this tutorial, I showed you how to use mdp to create and show a presentation from the command line. Its markdown compatibility saves us the trouble and hassle of having to learn any new formatting, which is an advantage compared to [tpp][5], another command-line presentation tool. Due to its limitations, mdp may not qualify as your default presentation tool, but there should be definitely a use case for that. What do you think of mdp? Do you prefer something else?
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: http://xmodulo.com/presentation-command-line-linux.html
|
||||
|
||||
作者:[Dan Nanni][a]
|
||||
译者:[译者ID](https://github.com/译者ID)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
|
||||
|
||||
[a]:http://xmodulo.com/author/nanni
|
||||
[1]:http://bartaz.github.io/impress.js/
|
||||
[2]:https://github.com/visit1985/mdp
|
||||
[3]:http://daringfireball.net/projects/markdown/
|
||||
[4]:https://aur.archlinux.org/packages/mdp-git/
|
||||
[5]:http://www.ngolde.de/tpp.html
|
@ -0,0 +1,186 @@
|
||||
如何在Linux命令行中创建以及展示演示稿
|
||||
================================================================================
|
||||
你在准备一场演讲的时候,脑海可能会先被图文并茂、形象华丽的演示图稿所占据。诚然,没有人会否认一份生动形象的演讲稿所带来的积极作用。然而,并非所有的演讲都需要Ted Talk的质量。更多时候,演讲稿只为传达特定的信息。 而这个,使用文本信息足以完成。在这种情况下,你的时间可以更好的花在信息的搜集和核实上面,而不是在谷歌图像(Google Image)上寻找好看的图片。
|
||||
|
||||
在Linux的世界里,有几个不同的方式供你选择来做演讲。比如富多媒体展示,视觉冲击效果极佳的[Impress.js][1],还有专为LaTex用户提供的Beamer,等等。而如果你苦于寻找一种简单的方式来创建并且展示文本演示稿,[mdp][2]就能帮你实现。
|
||||
|
||||
### 什么是Mdp? ###
|
||||
|
||||
mdp是Linux下一款基于菜单窗口的命令行演示工具。我喜欢mdp在于它对[markdown][3]的支持,使得很容易以熟悉的markdown格式来创建幻灯片。自然,还可以很轻松地用HTML格式来发布幻灯片。另一个好处是它支持UTF-8字符编码,这让非英语字符(如希腊或西里尔字母)的展示也变得很方便。
|
||||
|
||||
### 在Linux中安装Mdp ###
|
||||
|
||||
mdp的少量依赖需求(也就是ncursesw)使得安装非常简单。
|
||||
|
||||
#### Debian、Ubuntu或者它们的衍生版 ####
|
||||
|
||||
$ sudo apt-get install git gcc make libncursesw5-dev
|
||||
$ git clone https://github.com/visit1985/mdp.git
|
||||
$ cd mdp
|
||||
$ make
|
||||
$ sudo make install
|
||||
|
||||
#### Fedora或者CentOS/RHEL ####
|
||||
|
||||
$ sudo yum install git gcc make ncurses-devel
|
||||
$ git clone https://github.com/visit1985/mdp.git
|
||||
$ cd mdp
|
||||
$ make
|
||||
$ sudo make install
|
||||
|
||||
#### Arch Linux ####
|
||||
|
||||
Arch Linux可以通过[AUR][4]轻松安装mdp。
|
||||
|
||||
### 在命令行中创建演示稿 ###
|
||||
|
||||
安装mdp完毕,你可以使用你喜欢的文本编辑器来轻松创建一个演示稿。如果你熟悉markdown,则很快可以驾驭mdp。而对于那些不熟悉markdown的人来说,学习mdp最好的方式就是从一个实例着手。
|
||||
|
||||
这里有一份6页的演示稿样本提供参考。
|
||||
|
||||
%标题: 利用mdp创建的演示稿样本(Xmodulo.com)
|
||||
%作者: Dan Nanni
|
||||
%日期: 2015-01-28
|
||||
|
||||
-> 这里是幻灯片标题 <-
|
||||
=========
|
||||
|
||||
-> mdp是一款基于命令行的支持markdown的演示工具 <-
|
||||
|
||||
*_特性_*
|
||||
|
||||
* 多层次标题
|
||||
* 代码块格式
|
||||
* 嵌套引用
|
||||
* 嵌套列表
|
||||
* 文本高亮以及下划线
|
||||
* 引证
|
||||
* UTF-8编码特殊字符支持
|
||||
|
||||
-------------------------------------------------
|
||||
|
||||
-> # 嵌套列表实例 <-
|
||||
|
||||
这里是一个多层次标题以及嵌套列表的实例
|
||||
|
||||
# 第一层标题
|
||||
|
||||
第二层
|
||||
------------
|
||||
|
||||
- *item 1*
|
||||
- sub-item 1
|
||||
- sub-sub-item 1
|
||||
- sub-sub-item 2
|
||||
- sub-sub-item 3
|
||||
- sub-item 2
|
||||
|
||||
-------------------------------------------------
|
||||
|
||||
-> # 代码块格式实例 <-
|
||||
|
||||
此例展示如何排版代码片段。
|
||||
|
||||
1 /* Hello World program */
|
||||
2
|
||||
3 #include <stdio.h>
|
||||
4
|
||||
5 int main()
|
||||
6 {
|
||||
7 printf("Hello World");
|
||||
8 return 0;
|
||||
9 }
|
||||
|
||||
此例展示内联代码: `sudo reboot`
|
||||
|
||||
-------------------------------------------------
|
||||
|
||||
-> # 嵌套引用实例 <-
|
||||
|
||||
这是一个嵌套引用实例
|
||||
|
||||
# 三层嵌套引用
|
||||
|
||||
> This is the first-level quote.
|
||||
>> This is the second-level quote
|
||||
>> and continues.
|
||||
>>> *This is the third-level quote, and so on.*
|
||||
|
||||
-------------------------------------------------
|
||||
|
||||
-> # 引证实例 <-
|
||||
|
||||
此例展示如何在演示稿中放置引证。
|
||||
|
||||
This tutorial is published at [Xmodulo](http://xmodulo.com)
|
||||
|
||||
You are welcome to connect with me at [LinkedIn](http://www.linkedin.com/in/xmodulo)
|
||||
|
||||
很酷是吧?
|
||||
|
||||
-------------------------------------------------
|
||||
|
||||
-> # UTF-8编码特殊字符支持实例 <-
|
||||
|
||||
此例展示UTF-8编码特殊字符支持。
|
||||
|
||||
ae = ä, oe = ö, ue = ü, ss = ß
|
||||
alpha = ?, beta = ?, upsilon = ?, phi = ?
|
||||
Omega = ?, Delta = ?, Sigma = ?
|
||||
|
||||
???????????
|
||||
?rectangle?
|
||||
???????????
|
||||
|
||||
### 在命令行中展示演示稿 ###
|
||||
|
||||
当你把以上代码保存为slide.md的文本文件后,你可以运行以下命令来展示演示稿:
|
||||
|
||||
$ mdp slide.md
|
||||
|
||||
你可以通过按键Enter/Space/Page-Down/Down-Arrow (下一张幻灯)、Backspace/Page-Up/Up-Arrow (上一张幻灯)、Home (幻灯首页)、 End (幻灯末页)或者 numeric-N (第N页幻灯)来操作你的演示稿。
|
||||
|
||||
演示稿的标题将在每页幻灯的顶部展示,而你的名字和页码则会出现在幻灯的底部。
|
||||
|
||||
![](https://farm9.staticflickr.com/8637/16392457702_ec732d0094_c.jpg)
|
||||
|
||||
这是嵌套列表和多层次标题的实例效果。
|
||||
|
||||
![](https://farm9.staticflickr.com/8567/16367397606_29be7df633_c.jpg)
|
||||
|
||||
这是代码片段和内联代码的实例效果。
|
||||
|
||||
![](https://farm9.staticflickr.com/8682/15770926144_0f982b0863_b.jpg)
|
||||
|
||||
这是嵌套引用的实例效果。
|
||||
|
||||
![](https://farm9.staticflickr.com/8587/16393383115_0865c8b89b_c.jpg)
|
||||
|
||||
这是放置引证的实例效果。
|
||||
|
||||
![](https://farm8.staticflickr.com/7409/16392457712_ed36c14bc2_c.jpg)
|
||||
|
||||
这是UTF-8编码特殊字符支持的实例效果。
|
||||
|
||||
![](https://farm9.staticflickr.com/8648/16205981560_7fa3debc75_c.jpg)
|
||||
|
||||
### 总结 ###
|
||||
|
||||
在本教程中,我演示了在命令行中如何使用mdp来创建并且展示一个演示稿。mdp的markdown兼容性让我们省去了学习其它新格式的麻烦,这相对于另一种名为[tpp][5]的演示工具来说是一个优势。拘于mdp的局限性,它可能无法作为你的默认演示工具。但是,值得肯定的是它一定能在某个场合下派上用场。你觉得mdp怎么样呢?你还喜欢其它的什么东西吗?
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: http://xmodulo.com/presentation-command-line-linux.html
|
||||
|
||||
作者:[Dan Nanni][a]
|
||||
译者:[soooogreen](https://github.com/soooogreen)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
|
||||
|
||||
[a]:http://xmodulo.com/author/nanni
|
||||
[1]:http://bartaz.github.io/impress.js/
|
||||
[2]:https://github.com/visit1985/mdp
|
||||
[3]:http://daringfireball.net/projects/markdown/
|
||||
[4]:https://aur.archlinux.org/packages/mdp-git/
|
||||
[5]:http://www.ngolde.de/tpp.html
|
Loading…
Reference in New Issue
Block a user