mirror of
https://github.com/LCTT/TranslateProject.git
synced 2025-02-03 23:40:14 +08:00
Merge remote-tracking branch 'LCTT/master'
This commit is contained in:
commit
a4b2a899a2
@ -1,7 +1,7 @@
|
||||
容器技术对 DevOps 的一些启发
|
||||
======
|
||||
|
||||
容器技术的使用支撑了目前 DevOps 三大主要实践:工作流,及时反馈,持续学习。
|
||||
> 容器技术的使用支撑了目前 DevOps 三大主要实践:工作流、及时反馈、持续学习。
|
||||
|
||||
![](https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/LAW-patent_reform_520x292_10136657_1012_dc.png?itok=Cd2PmDWf)
|
||||
|
||||
@ -11,11 +11,11 @@
|
||||
|
||||
#### 容器中的工作流
|
||||
|
||||
每个容器都可以看成一个独立的运行环境,对于容器内部,不需要考虑外部的宿主环境、集群环境、以及其它基础设施。在容器内部,每个功能看起来都是以传统的方式运行。从外部来看,容器内运行的应用一般作为整个应用系统架构的一部分:比如 web API,web app 用户界面,数据库,任务执行,缓存系统,垃圾回收等。运维团队一般会限制容器的资源使用,并在此基础上建立完善的容器性能监控服务,从而降低其对基础设施或者下游其他用户的影响。
|
||||
每个容器都可以看成一个独立的运行环境,对于容器内部,不需要考虑外部的宿主环境、集群环境,以及其它基础设施。在容器内部,每个功能看起来都是以传统的方式运行。从外部来看,容器内运行的应用一般作为整个应用系统架构的一部分:比如 web API、web app 用户界面、数据库、任务执行、缓存系统、垃圾回收等。运维团队一般会限制容器的资源使用,并在此基础上建立完善的容器性能监控服务,从而降低其对基础设施或者下游其他用户的影响。
|
||||
|
||||
#### 现实中的工作流
|
||||
|
||||
那些跟“容器”一样业务功能独立的团队,也可以借鉴这种容器思维。因为无论是在现实生活中的工作流(代码发布、构建基础设施,甚至制造 [Spacely’s Sprockets][2] 等),还是技术中的工作流(开发、测试、运维、发布)都使用了这样的线性工作流,一旦某个独立的环节或者工作团队出现了问题,那么整个下游都会受到影响,虽然使用这种线性的工作流有效降低了工作耦合性。
|
||||
那些跟“容器”一样业务功能独立的团队,也可以借鉴这种容器思维。因为无论是在现实生活中的工作流(代码发布、构建基础设施,甚至制造 [《杰森一家》中的斯贝斯利太空飞轮][2] 等),还是技术中的工作流(开发、测试、运维、发布)都使用了这样的线性工作流,一旦某个独立的环节或者工作团队出现了问题,那么整个下游都会受到影响,虽然使用这种线性的工作流有效降低了工作耦合性。
|
||||
|
||||
#### DevOps 中的工作流
|
||||
|
||||
@ -23,7 +23,7 @@ DevOps 中的第一条原则,就是掌控整个执行链路的情况,努力
|
||||
|
||||
> 践行这样的工作流后,可以避免将一个已知缺陷带到工作流的下游,避免局部优化导致可能的全局性能下降,要不断探索如何优化工作流,持续加深对于系统的理解。
|
||||
|
||||
—— Gene Kim,[支撑 DevOps 的三个实践][3],IT 革命,2017.4.25
|
||||
> —— Gene Kim,《[支撑 DevOps 的三个实践][3]》,IT 革命,2017.4.25
|
||||
|
||||
### 反馈
|
||||
|
||||
@ -33,7 +33,7 @@ DevOps 中的第一条原则,就是掌控整个执行链路的情况,努力
|
||||
|
||||
#### 现实中的反馈
|
||||
|
||||
在现实中,从始至终同样也需要反馈。一个高效的处理流程中,及时的反馈能够快速地定位事情发生的时间。反馈的关键词是“快速”和“相关”。当一个团队被淹没在大量不相关的事件时,那些真正需要快速反馈的重要信息很容易被忽视掉,并向下游传递形成更严重的问题。想象下[如果露西和埃塞尔][6]能够很快地意识到:传送带太快了,那么制作出的巧克力可能就没什么问题了(尽管这样就不那么搞笑了)。
|
||||
在现实中,从始至终同样也需要反馈。一个高效的处理流程中,及时的反馈能够快速地定位事情发生的时间。反馈的关键词是“快速”和“相关”。当一个团队被淹没在大量不相关的事件时,那些真正需要快速反馈的重要信息很容易被忽视掉,并向下游传递形成更严重的问题。想象下[如果露西和埃塞尔][6]能够很快地意识到:传送带太快了,那么制作出的巧克力可能就没什么问题了(尽管这样就不那么搞笑了)。(LCTT 译注:露西和埃塞尔是上世纪 50 年代的著名黑白情景喜剧《我爱露西》中的主角)
|
||||
|
||||
#### DevOps 中的反馈
|
||||
|
||||
@ -41,7 +41,7 @@ DevOps 中的第二条原则,就是快速收集所有相关的有用信息,
|
||||
|
||||
> 快速的反馈对于提高技术的质量、可用性、安全性至关重要。
|
||||
|
||||
—— Gene Kim 及其他,DevOps 手册:如何在技术组织中创造世界级的敏捷性,可靠性和安全性,IT 革命,2016
|
||||
> —— Gene Kim 等人,《DevOps 手册:如何在技术组织中创造世界级的敏捷性,可靠性和安全性》,IT 革命,2016
|
||||
|
||||
### 持续学习
|
||||
|
||||
@ -71,7 +71,7 @@ DevOps 中的第二条原则,就是快速收集所有相关的有用信息,
|
||||
|
||||
> 实验和冒险让我们能够不懈地改进我们的工作,但也要求我们尝试之前未用过的工作方式。
|
||||
|
||||
—— Gene Kim 及其他,[凤凰计划:让你了解 IT、DevOps 以及如何取得商业成功][7],IT 革命,2013
|
||||
> —— Gene Kim 等人,《[凤凰计划:让你了解 IT、DevOps 以及如何取得商业成功][7]》,IT 革命,2013
|
||||
|
||||
### 容器技术带给 DevOps 的启迪
|
||||
|
||||
@ -84,7 +84,7 @@ via: https://opensource.com/article/18/9/containers-can-teach-us-devops
|
||||
作者:[Chris Hermansen][a]
|
||||
选题:[lujun9972](https://github.com/lujun9972)
|
||||
译者:[littleji](https://github.com/littleji)
|
||||
校对:[pityonline](https://github.com/pityonline)
|
||||
校对:[pityonline](https://github.com/pityonline), [wxy](https://github.com/wxy)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
@ -1,56 +0,0 @@
|
||||
HankChow translating
|
||||
|
||||
What you need to know about the GPL Cooperation Commitment
|
||||
======
|
||||
|
||||
The GPL Cooperation Commitment fosters innovation by freeing developers from fear of license termination.
|
||||
|
||||
![](https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/OSDC_Law_balance_open_source.png?itok=5c4JhuEY)
|
||||
|
||||
Imagine what the world would look like if growth, innovation, and development were free from fear. Innovation without fear is fostered by consistent, predictable, and fair license enforcement. That is what the [GPL Cooperation Commitment][1] aims to accomplish.
|
||||
|
||||
Last year, I wrote an article about licensing effects on downstream users of open source software. As I was conducting research for that article, it became apparent that license enforcement is infrequent and often unpredictable. In that article, I offered potential solutions to the need to make open source license enforcement consistent and predictable. However, I only considered "traditional" methods (e.g., through the court system or some form of legislative action) that a law student might consider.
|
||||
|
||||
In November 2017, Red Hat, IBM, Google, and Facebook proposed the the "non-traditional" solution I had not considered: the GPL Cooperation Commitment, which provides for fair and consistent enforcement of the GPL. I believe the GPL Cooperation Commitment is critical for two reasons: First, consistent and fair license enforcement is crucial for growth in the open source community; second, unpredictability is undesirable in the legal community.
|
||||
|
||||
### Understanding the GPL
|
||||
|
||||
To understand the GPL Cooperation Commitment, you must first understand the GPL's history. GPL is short for [GNU General Public License][2]. The GPL is a "copyleft" open source license, meaning that a software's distributor must make the source code available to downstream users. The GPL also prohibits placing restrictions on downstream use. These requirements keep individual users from denying freedoms (to use, study, share, and improve the software) to others. Under the GPL, a license to use the code is granted to all downstream users, provided they meet the requirements and conditions of the license. If a licensee does not meet the license's requirements, they are non-compliant.
|
||||
|
||||
Under the second version of the GPL (GPLv2), a license automatically terminates upon any non-compliance, which causes some software developers to shy away from using the GPL. However, the third version of the GPL (GPLv3) [added a "cure provision"][3] that gives a 30-day period for a licensee to remediate any GPL violation. If the violation is cured within 30 days following notification of non-compliance, the license is not terminated.
|
||||
|
||||
This provision eliminates the fear of termination due to an innocent mistake, thus fostering development and innovation by bringing peace of mind to users and distributors of the software.
|
||||
|
||||
### What the GPL Cooperation Commitment does
|
||||
|
||||
The GPL Cooperation Commitment applies the GPLv3's cure provisions to GPLv2-licensed software, thereby protecting licensees of GPLv2 code from the automatic termination of their license, consistent with the protections afforded by the GPLv3.
|
||||
|
||||
The GPL Cooperation Commitment is important because, while software engineers typically want to do the right thing and maintain compliance, they sometimes misunderstand how to do so. This agreement enables developers to avoid termination when they are non-compliant due to confusion or simple mistakes.
|
||||
|
||||
The GPL Cooperation Commitment spawned from an announcement in 2017 by the Linux Foundation Technical Advisory Board that the Linux kernel project would [adopt the cure provision from GPLv3][4]. With the GPL Cooperation Commitment, many major technology companies and individual developers made the same commitment and expanded it by applying the cure period to all of their software licensed under GPLv2 (and LGPLv2.1), not only to contributions to the Linux kernel.
|
||||
|
||||
Broad adoption of the GPL Cooperation Commitment will have a positive impact on the open source community because a significant amount of software is licensed under GPLv2. An increasing number of companies and individuals are expected to adopt the GPL Cooperation Commitment, which will lead to a significant amount of GPLv2 (and LGPLv2.1) code under license terms that promote fair and predictable approaches to license enforcement.
|
||||
|
||||
In fact, as of November 2018, more than 40 companies, including industry leaders IBM, Google, Amazon, Microsoft, Tencent, Intel, and Red Hat, have [signed onto the GPL Cooperation Commitment][5] and are working collaboratively to create a standard of fair and predictable enforcement within the open source community. The GPL Cooperation Commitment is just one example of how the community comes together to ensure the future of open source.
|
||||
|
||||
The GPL Cooperation Commitment tells downstream licensees that you respect their good intentions and that your GPLv2 code is safe for them to use. More information, including about how you can add your name to the commitment, is available on the [GPL Cooperation Commitment website][6].
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://opensource.com/article/18/11/gpl-cooperation-commitment
|
||||
|
||||
作者:[Brooke Driver][a]
|
||||
选题:[lujun9972][b]
|
||||
译者:[译者ID](https://github.com/译者ID)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]: https://opensource.com/users/bdriver
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://gplcc.github.io/gplcc/
|
||||
[2]: https://www.gnu.org/licenses/licenses.en.html
|
||||
[3]: https://opensource.com/article/18/6/gplv3-anniversary
|
||||
[4]: https://www.kernel.org/doc/html/v4.16/process/kernel-enforcement-statement.html
|
||||
[5]: https://gplcc.github.io/gplcc/Company/Company-List.html
|
||||
[6]: http://gplcc.github.io/gplcc
|
@ -1,72 +0,0 @@
|
||||
Emacs #4: Automated emails to org-mode and org-mode syncing
|
||||
======
|
||||
This is fourth in [a series on Emacs and org-mode][1].
|
||||
|
||||
Hopefully by now you’ve started to see how powerful and useful org-mode is. If you’re like me, you’re thinking:
|
||||
|
||||
“I’d really like to have this in sync across all my devices.”
|
||||
|
||||
and, perhaps:
|
||||
|
||||
“Can I forward emails into org-mode?”
|
||||
|
||||
This being Emacs, the answers, of course, are “Yes.”
|
||||
|
||||
### Syncing
|
||||
|
||||
Since org-mode just uses text files, syncing is pretty easily accomplished using any number of tools. I use git with git-remote-gcrypt. Due to some limitations of git-remote-gcrypt, each machine tends to push to its own branch, and to master on command. Each machine merges from all the other branches and pushes the result to master after a merge. A cron job causes pushes to the machine’s branch to happen, and a bit of elisp coordinates it all — making sure to save buffers before a sync, refresh them from disk after, etc.
|
||||
|
||||
The code for this post is somewhat more extended, so I will be linking to it on github rather than posting inline.
|
||||
|
||||
I have a directory $HOME/org where all my org-stuff lives. In ~/org lives [a Makefile][2] that handles the syncing. It defines these targets:
|
||||
|
||||
* push: adds, commits, and pushes to a branch named after the machine’s hostname
|
||||
* fetch: does a simple git fetch
|
||||
* sync: adds, commits, pulls remote changes, merges, and (assuming the merge was successful) pushes to the branch named after the machine’s hostname plus master
|
||||
|
||||
|
||||
|
||||
Now, in my user’s crontab, I have this:
|
||||
```
|
||||
*/15 * * * * make -C $HOME/org push fetch 2>&1 | logger --tag 'orgsync'
|
||||
|
||||
```
|
||||
|
||||
The [accompanying elisp code][3] defines a shortcut (C-c s) to cause a sync to occur. Thanks to the cronjob, as long as files were saved — even if I didn’t explicitly sync on the other boxen — they’ll be pulled in.
|
||||
|
||||
I have found this setup to work really well.
|
||||
|
||||
### Emailing to org-mode
|
||||
|
||||
Before going down this path, one should ask the question: do you really need it? I use org-mode with mu4e, and the integration is excellent; any org task can link to an email by message-id, and this is ideal — it lets a person do things like make a reminder to reply to a message in a week.
|
||||
|
||||
However, org is not just about reminders. It’s also a knowledge base, authoring system, etc. And, not all of my mail clients use mu4e. (Note: things like MobileOrg exist for mobile devices). I don’t actually use this as much as I thought I would, but it has its uses and I thought I’d document it here too.
|
||||
|
||||
Now I didn’t want to just be able to accept plain text email. I wanted to be able to handle attachments, HTML mail, etc. This quickly starts to sound problematic — but with tools like ripmime and pandoc, it’s not too bad.
|
||||
|
||||
The first step is to set up some way to get mail into a specific folder. A plus-extension, special user, whatever. I then use a [fetchmail configuration][4] to pull it down and run my [insorgmail][5] script.
|
||||
|
||||
This script is where all the interesting bits happen. It starts with ripmime to process the message. HTML bits are converted from HTML to org format using pandoc. an org hierarchy is made to represent the structure of the email as best as possible. emails can get pretty complicated, with HTML and the rest, but I have found this does an acceptable job with my use cases.
|
||||
|
||||
### Up next…
|
||||
|
||||
My last post on org-mode will talk about using it to write documents and prepare slides — a use for which I found myself surprisingly pleased with it, but which needed a bit of tweaking.
|
||||
|
||||
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: http://changelog.complete.org/archives/9898-emacs-4-automated-emails-to-org-mode-and-org-mode-syncing
|
||||
|
||||
作者:[John Goerzen][a]
|
||||
译者:[译者ID](https://github.com/译者ID)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]:http://changelog.complete.org/
|
||||
[1]:https://changelog.complete.org/archives/tag/emacs2018
|
||||
[2]:https://github.com/jgoerzen/public-snippets/blob/master/emacs/org-tools/Makefile
|
||||
[3]:https://github.com/jgoerzen/public-snippets/blob/master/emacs/org-tools/emacs-config.org
|
||||
[4]:https://github.com/jgoerzen/public-snippets/blob/master/emacs/org-tools/fetchmailrc.orgmail
|
||||
[5]:https://github.com/jgoerzen/public-snippets/blob/master/emacs/org-tools/insorgmail
|
@ -1,177 +0,0 @@
|
||||
Emacs #5: Documents and Presentations with org-mode
|
||||
======
|
||||
|
||||
### 1 About org-mode exporting
|
||||
|
||||
#### 1.1 Background
|
||||
|
||||
org-mode isn't just an agenda-making program. It can also export to lots of formats: LaTeX, PDF, Beamer, iCalendar (agendas), HTML, Markdown, ODT, plain text, man pages, and more complicated formats such as a set of web pages.
|
||||
|
||||
This isn't just some afterthought either; it's a core part of the system and integrates very well.
|
||||
|
||||
One file can be source code, automatically-generated output, task list, documentation, and presentation, all at once.
|
||||
|
||||
Some use org-mode as their preferred markup format, even for things like LaTeX documents. The org-mode manual has an extensive [section on exporting][13].
|
||||
|
||||
#### 1.2 Getting started
|
||||
|
||||
From any org-mode document, just hit C-c C-e. From there will come up a menu, letting you choose various export formats and options. These are generally single-key options so it's easy to set and execute. For instance, to export a document to a PDF, use C-c C-e l p or for HTML export, C-c C-e h h.
|
||||
|
||||
There are lots of settings available for all of these export options; see the manual. It is, in fact, quite possible to use LaTeX-format equations in both LaTeX and HTML modes, to insert arbitrary preambles and settings for different modes, etc.
|
||||
|
||||
#### 1.3 Add-on packages
|
||||
|
||||
ELPA containts many addition exporters for org-mode as well. Check there for details.
|
||||
|
||||
### 2 Beamer slides with org-mode
|
||||
|
||||
#### 2.1 About Beamer
|
||||
|
||||
[Beamer][14] is a LaTeX environment for making presentations. Its features include:
|
||||
|
||||
* Automated generating of structural elements in the presentation (see, for example, [the Marburg theme][1]). This provides a visual reference for the audience of where they are in the presentation.
|
||||
|
||||
* Strong help for structuring the presentation
|
||||
|
||||
* Themes
|
||||
|
||||
* Full LaTeX available
|
||||
|
||||
#### 2.2 Benefits of Beamer in org-mode
|
||||
|
||||
org-mode has a lot of benefits for working with Beamer. Among them:
|
||||
|
||||
* org-mode's very easy and strong support for visualizing and changing the structure makes it very quick to reorganize your material.
|
||||
|
||||
* Combined with org-babel, live source code (with syntax highlighting) and results can be embedded.
|
||||
|
||||
* The syntax is often easier to work with.
|
||||
|
||||
I have completely replaced my usage of LibreOffice/Powerpoint/GoogleDocs with org-mode and beamer. It is, in fact, rather frustrating when I have to use one of those tools, as they are nowhere near as strong as org-mode for visualizing a presentation structure.
|
||||
|
||||
#### 2.3 Headline Levels
|
||||
|
||||
org-mode's Beamer export will convert sections of your document (defined by headings) into slides. The question, of course, is: which sections? This is governed by the H [export setting][15] (org-export-headline-levels).
|
||||
|
||||
There are many ways to go, which suit people. I like to have my presentation like this:
|
||||
|
||||
```
|
||||
#+OPTIONS: H:2
|
||||
#+BEAMER_HEADER: \AtBeginSection{\frame{\sectionpage}}
|
||||
```
|
||||
|
||||
This gives a standalone section slide for each major topic, to highlight major transitions, and then takes the level 2 (two asterisks) headings to set the slide. Many Beamer themes expect a third level of indirection, so you would set H:3 for them.
|
||||
|
||||
#### 2.4 Themes and settings
|
||||
|
||||
You can configure many Beamer and LaTeX settings in your document by inserting lines at the top of your org file. This document, for instance, defines:
|
||||
|
||||
```
|
||||
#+TITLE: Documents and presentations with org-mode
|
||||
#+AUTHOR: John Goerzen
|
||||
#+BEAMER_HEADER: \institute{The Changelog}
|
||||
#+PROPERTY: comments yes
|
||||
#+PROPERTY: header-args :exports both :eval never-export
|
||||
#+OPTIONS: H:2
|
||||
#+BEAMER_THEME: CambridgeUS
|
||||
#+BEAMER_COLOR_THEME: default
|
||||
```
|
||||
|
||||
#### 2.5 Advanced settings
|
||||
|
||||
I like to change some colors, bullet formatting, and the like. I round out my document with:
|
||||
|
||||
```
|
||||
# We can't just +BEAMER_INNER_THEME: default because that picks the theme default.
|
||||
# Override per https://tex.stackexchange.com/questions/11168/change-bullet-style-formatting-in-beamer
|
||||
#+BEAMER_INNER_THEME: default
|
||||
#+LaTeX_CLASS_OPTIONS: [aspectratio=169]
|
||||
#+BEAMER_HEADER: \definecolor{links}{HTML}{0000A0}
|
||||
#+BEAMER_HEADER: \hypersetup{colorlinks=,linkcolor=,urlcolor=links}
|
||||
#+BEAMER_HEADER: \setbeamertemplate{itemize items}[default]
|
||||
#+BEAMER_HEADER: \setbeamertemplate{enumerate items}[default]
|
||||
#+BEAMER_HEADER: \setbeamertemplate{items}[default]
|
||||
#+BEAMER_HEADER: \setbeamercolor*{local structure}{fg=darkred}
|
||||
#+BEAMER_HEADER: \setbeamercolor{section in toc}{fg=darkred}
|
||||
#+BEAMER_HEADER: \setlength{\parskip}{\smallskipamount}
|
||||
```
|
||||
|
||||
Here, aspectratio=169 sets a 16:9 aspect ratio, and the remaining are standard LaTeX/Beamer configuration bits.
|
||||
|
||||
#### 2.6 Shrink (to fit)
|
||||
|
||||
Sometimes you've got some really large code examples and you might prefer to just shrink the slide to fit.
|
||||
|
||||
Just type C-c C-x p, set the BEAMER_opt property to shrink=15\.
|
||||
|
||||
(Or a larger value of shrink). The previous slide uses this here.
|
||||
|
||||
#### 2.7 Result
|
||||
|
||||
Here's the end result:
|
||||
|
||||
[![screenshot1](https://farm1.staticflickr.com/889/26366340577_fbde8ff266_o.png)][16]
|
||||
|
||||
### 3 Interactive Slides
|
||||
|
||||
#### 3.1 Interactive Emacs Slideshows
|
||||
|
||||
With the [org-tree-slide package][17], you can display your slideshow from right within Emacs. Just run M-x org-tree-slide-mode. Then, use C-> and C-< to move between slides.
|
||||
|
||||
You might find C-c C-x C-v (which is org-toggle-inline-images) helpful to cause the system to display embedded images.
|
||||
|
||||
#### 3.2 HTML Slideshows
|
||||
|
||||
There are a lot of ways to export org-mode presentations to HTML, with various levels of JavaScript integration. See the [non-beamer presentations section][18] of the org-mode wiki for details.
|
||||
|
||||
### 4 Miscellaneous
|
||||
|
||||
#### 4.1 Additional resources to accompany this post
|
||||
|
||||
* [orgmode.org beamer tutorial][2]
|
||||
|
||||
* [LaTeX wiki][3]
|
||||
|
||||
* [Generating section title slides][4]
|
||||
|
||||
* [Shrinking content to fit on slide][5]
|
||||
|
||||
* A great resource: refcard-org-beamer See its [Github repo][6] Make sure to check out both the PDF and the .org file
|
||||
|
||||
* A nice [Theme matrix][7]
|
||||
|
||||
#### 4.2 Up next in my Emacs series…
|
||||
|
||||
mu4e for email!
|
||||
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: http://changelog.complete.org/archives/9900-emacs-5-documents-and-presentations-with-org-mode
|
||||
|
||||
作者:[John Goerzen][a]
|
||||
译者:[译者ID](https://github.com/译者ID)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
选题:[lujun9972](https://github.com/lujun9972)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]:http://changelog.complete.org/archives/author/jgoerzen
|
||||
[1]:https://hartwork.org/beamer-theme-matrix/all/beamer-albatross-Marburg-1.png
|
||||
[2]:https://orgmode.org/worg/exporters/beamer/tutorial.html
|
||||
[3]:https://en.wikibooks.org/wiki/LaTeX/Presentations
|
||||
[4]:https://tex.stackexchange.com/questions/117658/automatically-generate-section-title-slides-in-beamer/117661
|
||||
[5]:https://tex.stackexchange.com/questions/78514/content-doesnt-fit-in-one-slide
|
||||
[6]:https://github.com/fniessen/refcard-org-beamer
|
||||
[7]:https://hartwork.org/beamer-theme-matrix/
|
||||
[8]:https://changelog.complete.org/archives/tag/emacs2018
|
||||
[9]:https://github.com/jgoerzen/public-snippets/blob/master/emacs/emacs-org-beamer/emacs-org-beamer.org
|
||||
[10]:http://changelog.complete.org/archives/9900-emacs-5-documents-and-presentations-with-org-mode
|
||||
[11]:https://github.com/jgoerzen/public-snippets/raw/master/emacs/emacs-org-beamer/emacs-org-beamer.pdf
|
||||
[12]:https://github.com/jgoerzen/public-snippets/raw/master/emacs/emacs-org-beamer/emacs-org-beamer-document.pdf
|
||||
[13]:https://orgmode.org/manual/Exporting.html#Exporting
|
||||
[14]:https://en.wikipedia.org/wiki/Beamer_(LaTeX)
|
||||
[15]:https://orgmode.org/manual/Export-settings.html#Export-settings
|
||||
[16]:https://www.flickr.com/photos/jgoerzen/26366340577/in/dateposted/
|
||||
[17]:https://orgmode.org/worg/org-tutorials/non-beamer-presentations.html#org-tree-slide
|
||||
[18]:https://orgmode.org/worg/org-tutorials/non-beamer-presentations.html
|
@ -1,3 +1,5 @@
|
||||
translating---geekpi
|
||||
|
||||
GPaste Is A Great Clipboard Manager For Gnome Shell
|
||||
======
|
||||
**[GPaste][1] is a clipboard management system that consists of a library, daemon, and interfaces for the command line and Gnome (using a native Gnome Shell extension).**
|
||||
|
@ -1,56 +0,0 @@
|
||||
translating---geekpi
|
||||
|
||||
How to enter single user mode in SUSE 12 Linux?
|
||||
======
|
||||
Short article to learn how to enter single user mode in SUSE 12 Linux server.
|
||||
|
||||
![How to enter single user mode in SUSE 12 Linux][1]
|
||||
|
||||
In this short article we will walk you through steps which demonstrate how to enter single user mode in SUSE 12 Linux. Single user mode is always preferred when you are troubleshooting major issues with your system. Single user mode disables networking and no other users are logged in, you rule out many situations of multi user system and it helps you in troubleshooting fast. One of the most popular use of single user mode is to [reset forgotten root password][2].
|
||||
|
||||
### 1\. Halt boot process
|
||||
|
||||
First of all you need have console of your machine to get into single user mode. If its VM then VM console, if its physical machine then you need its iLO/serial console connected. Reboot system and halt automatic booting of kernel at grub boot menu by pressing any key.
|
||||
|
||||
![Kernel selection menu at boot in SUSE 12][3]
|
||||
|
||||
### 2\. Edit boot option of kernel
|
||||
|
||||
Once you are on above screen, press `e` on selected kernel (which is normally your preferred latest kernel) to update its boot options. You will see be below screen.
|
||||
|
||||
![grub2 edits in SUSE 12][4]
|
||||
|
||||
Now, scroll down to your booting kernel line and add `init=/bin/bash` at the end of the line as shown below.
|
||||
|
||||
![Edit to boot in single user shell][5]
|
||||
|
||||
### 3\. Boot kernel with edited entry
|
||||
|
||||
Now press `Ctrl-x` or `F10` to boot this edited kernel. Kernel will be booted in single user mode and you will be presented with hash prompt i.e. root access to server. At this point of time, your root file system is mounted in read only mode. So any changes you are doing to system wont be saved.
|
||||
|
||||
Run below command to remount root filesystem as re-writable.
|
||||
|
||||
```
|
||||
kerneltalks:/ # mount -o remount,rw /
|
||||
```
|
||||
|
||||
And you are good to go! Go ahead and do your necessary actions in single user mode. Dont forget to reboot server to boot into normal multiuser mode once you are done.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://kerneltalks.com/howto/how-to-enter-single-user-mode-in-suse-12-linux/
|
||||
|
||||
作者:[kerneltalks][a]
|
||||
选题:[lujun9972][b]
|
||||
译者:[译者ID](https://github.com/译者ID)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]: https://kerneltalks.com
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://a4.kerneltalks.com/wp-content/uploads/2018/11/How-to-enter-single-user-mode-in-SUSE-12-Linux.png
|
||||
[2]: https://kerneltalks.com/linux/recover-forgotten-root-password-rhel/
|
||||
[3]: https://a1.kerneltalks.com/wp-content/uploads/2018/11/Grub-menu-in-SUSE-12.png
|
||||
[4]: https://a3.kerneltalks.com/wp-content/uploads/2018/11/grub2-editor.png
|
||||
[5]: https://a4.kerneltalks.com/wp-content/uploads/2018/11/Edit-to-boot-in-single-user-shell.png
|
@ -1,3 +1,5 @@
|
||||
heguangzhi Translating
|
||||
|
||||
9 obscure Python libraries for data science
|
||||
======
|
||||
Go beyond pandas, scikit-learn, and matplotlib and learn some new tricks for doing data science in Python.
|
||||
|
@ -1,3 +1,5 @@
|
||||
HankChow translating
|
||||
|
||||
How To Customize Bash Prompt In Linux
|
||||
======
|
||||
![](https://www.ostechnix.com/wp-content/uploads/2017/10/BASH-720x340.jpg)
|
||||
|
@ -1,3 +1,4 @@
|
||||
Translating by Guevaraya
|
||||
How To Change GDM Login Screen Background In Ubuntu
|
||||
======
|
||||
Whenever you log in or lock and unlock your Ubuntu 18.04 LTS desktop, you will be greeted with a plain purple-colored screen. It is the default GDM (GNOME Display Manager) background since Ubuntu version 17.04. Some of you may feel boring to look at this plain background and want to make the Login screen something cool and eye-candy! If so, you’re on the right track. This brief guide describes how to change GDM Login screen background in Ubuntu 18.04 LTS desktop.
|
||||
|
@ -0,0 +1,56 @@
|
||||
GPL 合作承诺的发展历程
|
||||
======
|
||||
|
||||
GPL 合作承诺消除了开发者对许可证失效的顾虑,从而达到促进技术创新的目的。
|
||||
|
||||
![](https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/OSDC_Law_balance_open_source.png?itok=5c4JhuEY)
|
||||
|
||||
假如没有任何顾虑,技术创新和发展将会让世界发生天翻地覆的改变。[GPL 合作承诺][1]就这样应运而生,只为通过公平、一致、可预测的许可证来让科技创新无后顾之忧。
|
||||
|
||||
去年,我曾经写过一篇文章,讨论了许可证对开源软件下游用户的影响。在进行研究的时候,我就发现许可证的约束力并不强,而且很多情况下是不可预测的。因此,我在文章中提出了一个能使开源许可证具有一致性和可预测性的潜在解决方案。但我只考虑到了诸如通过法律系统立法的传统方法。
|
||||
|
||||
2017 年 11 月,RedHat、IBM、Google 和 Facebook 提出了这种我从未考虑过的非传统的解决方案:GPL 合作承诺。GPL 合作承诺规定了 GPL 公平一致执行的方式。我认为,GPL 合作承诺之所以有这么深刻的意义,有以下两个原因:一是许可证的公平性和一致性对于开源社区的发展来说至关重要,二是法律对不可预测性并不容忍。
|
||||
|
||||
### 了解 GPL
|
||||
|
||||
要了解 GPL 合作承诺,首先要了解什么是 GPL。GPL 是 <ruby>[GNU 通用许可证][2]<rt>GNU General Public License</rt></ruby>的缩写,它是一个公共版权的开源许可证,这就意味着开源软件的分发者必须向下游用户公开源代码。GPL 还禁止对下游用户作出限制,要求个人用户不得拒绝他人对开源软件的使用自由、研究自由、共享自由和改进自由。GPL 规定,只要下游用户满足了许可证的要求和条件,就可以使用该许可证。如果被许可人出现了不符合许可证的情况,则视为违规。
|
||||
|
||||
按照第二版 GPL(GPLv2)的描述,许可证会在任何违规的情况下自动终止,这就导致了部分开发者对 GPL 有所抗拒。而在第三版 GPL(GPLv3)中则引入了“[<ruby>治愈条款<rt>cure provision</rt></ruby>][3]”,这一条款规定,被许可人可以在 30 天内对违反 GPL 的行为进行改正,如果在这个缓冲期内改正完成,许可证就不会被终止。
|
||||
|
||||
这一规定消除了许可证被无故终止的顾虑,从而让软件的开发者和用户专注于开发和创新。
|
||||
|
||||
### GPL 合作承诺做了什么
|
||||
|
||||
GPL 合作承诺将 GPLv3 的治愈条款应用于使用 GPLv2 的软件上,让使用 GPLv2 许可证的开发者避免许可证无故终止的窘境,并与 GPLv3 许可证保持一致。
|
||||
|
||||
|
||||
很多软件开发者都希望正确合规地做好一件事情,但有时候却不了解具体的实施细节。因此,GPL 合作承诺的重要性就在于能够对软件开发者们做出一些引导,让他们避免因一些简单的错误导致许可证违规终止。
|
||||
|
||||
Linux 基金会技术顾问委员会在 2017 年宣布,Linux 内核项目将会[采用 GPLv3 的治愈条款][4]。在 GPL 合作承诺的推动下,很多大型科技公司和个人开发者都承诺,会将自己的开源软件和 Linux 内核贡献在 30 天缓冲期内从 GPLv2 或 LGPLv2.1 扩展到 GPLv3。
|
||||
|
||||
GPL 合作承诺的广泛采用将会对开源社区产生非常积极的影响。如果更多的公司和个人开始采用 GPL 合作承诺,就能让大量正在使用 GPLv2 或 LGPLv2.1 许可证的软件以更公平和更可预测的形式履行许可证中的条款。
|
||||
|
||||
截至 2018 年 11 月,包括 IBM、Google、亚马逊、微软、腾讯、英特尔、RedHat 在内的 40 余家行业巨头公司都已经[签署了 GPL 合作承诺][5],以期为开源社区创立公平的标准以及提供可预测的执行力。GPL 合作承诺是开源社区齐心协力引领开源未来发展方向的一个成功例子。
|
||||
|
||||
GPL 合作承诺能够让下游用户了解到开发者对他们的尊重,同时也表示了开发者使用了 GPLv2 许可证的代码是安全的。如果你想查阅更多信息,包括如何将自己的名字添加到 GPL 合作承诺中,可以访问 [GPL 合作承诺的网站][6]。
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://opensource.com/article/18/11/gpl-cooperation-commitment
|
||||
|
||||
作者:[Brooke Driver][a]
|
||||
选题:[lujun9972][b]
|
||||
译者:[HankChow](https://github.com/HankChow)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]: https://opensource.com/users/bdriver
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://gplcc.github.io/gplcc/
|
||||
[2]: https://www.gnu.org/licenses/licenses.en.html
|
||||
[3]: https://opensource.com/article/18/6/gplv3-anniversary
|
||||
[4]: https://www.kernel.org/doc/html/v4.16/process/kernel-enforcement-statement.html
|
||||
[5]: https://gplcc.github.io/gplcc/Company/Company-List.html
|
||||
[6]: http://gplcc.github.io/gplcc
|
||||
|
@ -0,0 +1,71 @@
|
||||
Emacs #4:使用org-mode自动管理邮件及同步文档
|
||||
======
|
||||
这是 [Emacs 和 org-mode 系类][4]的第四篇。
|
||||
|
||||
至今为止,你已经见识到了 org-mode 的强大和高效,如果你像我一样,你可能会想:
|
||||
|
||||
“我真的很想让它在我所有的设备上同步。”
|
||||
|
||||
或者是说:
|
||||
|
||||
“我能在 org-mode 中转发邮件吗?”
|
||||
|
||||
答案当然是肯定的,因为这就是 Emacs。
|
||||
|
||||
### 同步
|
||||
|
||||
由于 org-mode 只使用文本文件,所以使用任意工具都可以很容易地实现同步。我使用的是 git 的 git-remote-gcrypt。由于 git-remote-gcrypt 的一些限制,每台机器都倾向于推到自己的分支,并使用命令来控制。每台机子都会先合并其他所有的 branch 然后再将合并后的结果 push 到 master 上。cron 作业可以实现将机器上的 branch push 上去,而 elisp 会协调这一切--确保在同步之前保存缓冲区,在同步之后从磁盘刷新缓冲区,等等。
|
||||
|
||||
这篇文章的代码有点多,所以我将把它链接到 github 上,而不是写在这里。
|
||||
|
||||
|
||||
我有一个用来存放我所有的 org-stuff 的目录 $HOME/org,在 ~/org 目录下有个 [Makefile][2] 文件来处理同步。该文件定义了一下目标:
|
||||
* push: 添加,提交和 push 到以主机命名的 branch 上
|
||||
* fetch: 一个简单的 git fetch
|
||||
* sync: 添加,提交和 pull 远程的修改,合并并将其 push 到以主机命名的 branch 和 master 上(假设合并成功)
|
||||
|
||||
|
||||
现在,在我的用户 crontab 中有这个:
|
||||
```
|
||||
*/15 * * * * make -C $HOME/org push fetch 2>&1 | logger --tag 'orgsync'
|
||||
|
||||
```
|
||||
[accompanying elisp code][3] 定义了一个快捷键(C-c s)来调用同步。多亏了 cronjob,只要文件被保存 -- 即使我没有在另一个 boxen 上同步 -- 它们也会被 pull 进来。
|
||||
|
||||
我发现这个设置非常好用。
|
||||
|
||||
### 用 org-mode 发邮件
|
||||
|
||||
在继续下去之前,首先要问自己一下:你真的需要它吗? 我用的是带有 [mu4e][4] 的 org-mode,而且它集成的也很好;任何组织任务都可以通过 message-id 链接到电子邮件,这很理想 -- 它可以让一个人做一些事情,比如提醒他在一周内回复一条消息。
|
||||
|
||||
然而,org 不仅仅只有提醒。它还是一个知识库、创作系统等,但是并不是我所有的邮件客户端都使用 mu4e。(注意:像 MobileOrg 是存在于移动设备中)。我并没有像我想的那样经常使用它,但是它有它的用途,所以我认为我也应该在这里记录它。
|
||||
|
||||
现在我不仅想处理纯文本电子邮件。我希望能够处理附件、HTML 邮件等。这听起来很快就有问题了 -- 但是通过使用 ripmime 和 pandoc 这样的工具,情况还不错。
|
||||
|
||||
第一步就是要用某些方法将获取到的邮件放入指定的文件夹下。扩展名,特殊用户等。然后我用 [fetchmail configuration][5] 来将它 pull 下来并运行我自己的 [insorgmail][6] 脚本。
|
||||
|
||||
这个脚本就是处理所有有趣的部分了。它从 ripmime 开始处理消息,用 pandoc 将HTML 的部分转换为 org 格式。 org 的层次结构是用来尽可能最好地表示 email 的结构。使用HTML和其他工具时,email 可能会变得相当复杂,但我发现这对于我来说是可以接受的。
|
||||
|
||||
### 下一篇
|
||||
|
||||
我最后一篇关于 org-mode 的文章将讨论如何使用它来编写文档和准备幻灯片 -- 我发现自己对 org-mode 的使用非常满意,但这需要一些调整。
|
||||
|
||||
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: http://changelog.complete.org/archives/9898-emacs-4-automated-emails-to-org-mode-and-org-mode-syncing
|
||||
|
||||
作者:[John Goerzen][a]
|
||||
译者:[oneforalone](https://github.com/oneforalone)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]:http://changelog.complete.org/
|
||||
[1]:https://changelog.complete.org/archives/tag/emacs2018
|
||||
[2]:https://github.com/jgoerzen/public-snippets/blob/master/emacs/org-tools/Makefile
|
||||
[3]:https://github.com/jgoerzen/public-snippets/blob/master/emacs/org-tools/emacs-config.org
|
||||
[4]:https://www.emacswiki.org/emacs/mu4e
|
||||
[5]:https://github.com/jgoerzen/public-snippets/blob/master/emacs/org-tools/fetchmailrc.orgmail
|
||||
[6]:https://github.com/jgoerzen/public-snippets/blob/master/emacs/org-tools/insorgmail
|
@ -0,0 +1,176 @@
|
||||
Emacs #5: org-mode 之文档与 Presentations
|
||||
======
|
||||
|
||||
### 1 org-mode 的输出
|
||||
|
||||
#### 1.1 背景
|
||||
|
||||
org-mode 不仅仅只是一个议程生成程序, 它也能输出许多不同的格式: LaTeX,PDF,Beamer,iCalendar(议程),HTML,Markdown,ODT,普通文本,帮助页面(man pages)和其它更多的复杂的格式,比如说网页文件。
|
||||
|
||||
这也不只是一些事后的想法,这是 org-mode 的设计核心部分并且集成的很好。
|
||||
|
||||
一个文件可以同时是源代码,自动生成的输出,任务列表,文档和 presentation。
|
||||
|
||||
有些人将 org-mode 作为他们首选的标记格式,甚至对于 LaTeX 文档也是如此。org-mode 手册中的 [section on exporting][13] 有更详细的介绍。
|
||||
|
||||
#### 1.2 开始
|
||||
|
||||
对于任意的 org-mode 的文档,只要按下 C-c C-e键,就会弹出一个让你选择多种输出格式和选项的菜单。这些选项通常是次键选择,所以很容易设置和执行。例如:要输出一个 PDF 文档,按 C-c C-e l p,要输出 HMTL 格式的, 按 C-c C-e h h。
|
||||
|
||||
对于所有的输出选项,都有许多可用的设置;详情参见手册。事实上,使用 LaTeX 格式相当于同时使用 LaTeX 和 HTML 模式,在不同的模式中插入任意的前言和设置等。
|
||||
|
||||
#### 1.3 第三方插件
|
||||
|
||||
[ELPA][19] 中也包含了许多额外的输出格式,详情参见 [ELPA][19].
|
||||
|
||||
### 2 org-mode 的 Beamer 演示
|
||||
|
||||
#### 2.1 关于 Beamer
|
||||
|
||||
[Beamer][14] 是一个生成 presentation 的 LaTeX 环境. 它包括了一下特性:
|
||||
|
||||
* 在 presentation 中自动生成结构化的元素(例如 [the Marburg theme][1])。 在 presentation 时,这个特性可以为观众提供了视觉参考。
|
||||
|
||||
* 对组织 presentation 有很大的帮助。
|
||||
|
||||
* 主题
|
||||
|
||||
* 完全支持 LaTeX
|
||||
|
||||
#### 2.2 org-mode 中 Beamer 的优点
|
||||
|
||||
在 org-mode 中用 Beamer 有很多好处,总的来说:
|
||||
|
||||
* org-mode 很简单而且对可视化支持的很好,同时改变结构可以快速的重组你的材料。
|
||||
|
||||
* 与 org-babel 绑定在一起,实时语法高亮源码和内嵌结果。
|
||||
|
||||
* 语法通常更容易使用。
|
||||
|
||||
我已经完全用 org-mode 和 beamer 替换掉 LibreOffice/Powerpoint/GoogleDocs 的使用。事实上,当我必须使用其中一种工具时,这是相当令人沮丧的,因为它们在可视化表示结构方面远远比不上 org-mode。
|
||||
|
||||
#### 2.3 标题层次
|
||||
|
||||
org-mode 的 Beamer 会将你文档中的部分(文中定义了标题的)转换成幻灯片。当然,问题是:哪些部分?这是由 H [export setting][15](org-export-headline-levels)决定的。
|
||||
|
||||
针对不同的人,有许多不同的方法。我比较喜欢我的 presentation 这样:
|
||||
|
||||
```
|
||||
#+OPTIONS: H:2
|
||||
#+BEAMER_HEADER: \AtBeginSection{\frame{\sectionpage}}
|
||||
```
|
||||
|
||||
这将为每个主题提供了独立部分,以突出主题的改变然后使用级别 2(两个星号)的标题来设置幻灯片。许多 Beamer 主题也有第三个间接层次,所以你可以将 H 设为 3。
|
||||
|
||||
#### 2.4 主题和配置
|
||||
|
||||
你可以在 org 文件的顶部来插入几行来配置 Beamer 和 LaTeX。在本文中,例如,你可以这样定义:
|
||||
|
||||
```
|
||||
#+TITLE: Documents and presentations with org-mode
|
||||
#+AUTHOR: John Goerzen
|
||||
#+BEAMER_HEADER: \institute{The Changelog}
|
||||
#+PROPERTY: comments yes
|
||||
#+PROPERTY: header-args :exports both :eval never-export
|
||||
#+OPTIONS: H:2
|
||||
#+BEAMER_THEME: CambridgeUS
|
||||
#+BEAMER_COLOR_THEME: default
|
||||
```
|
||||
|
||||
#### 2.5 高级设置
|
||||
|
||||
我比教喜欢修改颜色、项目符号样式等。我的配置如下:
|
||||
|
||||
```
|
||||
# We can't just +BEAMER_INNER_THEME: default because that picks the theme default.
|
||||
# Override per https://tex.stackexchange.com/questions/11168/change-bullet-style-formatting-in-beamer
|
||||
#+BEAMER_INNER_THEME: default
|
||||
#+LaTeX_CLASS_OPTIONS: [aspectratio=169]
|
||||
#+BEAMER_HEADER: \definecolor{links}{HTML}{0000A0}
|
||||
#+BEAMER_HEADER: \hypersetup{colorlinks=,linkcolor=,urlcolor=links}
|
||||
#+BEAMER_HEADER: \setbeamertemplate{itemize items}[default]
|
||||
#+BEAMER_HEADER: \setbeamertemplate{enumerate items}[default]
|
||||
#+BEAMER_HEADER: \setbeamertemplate{items}[default]
|
||||
#+BEAMER_HEADER: \setbeamercolor*{local structure}{fg=darkred}
|
||||
#+BEAMER_HEADER: \setbeamercolor{section in toc}{fg=darkred}
|
||||
#+BEAMER_HEADER: \setlength{\parskip}{\smallskipamount}
|
||||
```
|
||||
|
||||
在这里, aspectratio=169 将纵横比设为 16:9, 其它部分都是标准的 LaTeX/Beamer 配置。
|
||||
|
||||
#### 2.6 缩小 (适应屏幕)
|
||||
|
||||
有时你会遇到一些非常大的代码示例,你可能更倾向与将幻灯片缩小以适应它们。
|
||||
|
||||
只要按下 C-c C-c p 将 BEAMER_opt属性设为 shrink=15\.(或者设为更大的 shrink 值)。上一张幻灯片就用到了这个。
|
||||
|
||||
#### 2.7 效果
|
||||
|
||||
这就是最终的效果:
|
||||
|
||||
[![screenshot1](https://farm1.staticflickr.com/889/26366340577_fbde8ff266_o.png)][16]
|
||||
|
||||
### 3 幻灯片之间的交互
|
||||
|
||||
#### 3.1 交互式的 Emacs 幻灯片
|
||||
|
||||
使用 [org-tree-slide package][17] 这个插件的话, 就可以在 Emacs 的右侧显示幻灯片了。 只要按下 M-x,然后输入 org-tree-slide-mode,回车,然后你就可以用 C-> 和 C-< 在幻灯片之间切换了。
|
||||
|
||||
你可能会发现 C-c C-x C-v (即 org-toggle-inline-images)有助于使系统显示内嵌的图像。
|
||||
|
||||
#### 3.2 HTML 幻灯片
|
||||
|
||||
有许多方式可以将 org-mode 的 presentation 导出为 HTML,并有不同级别的 JavaScript 集成。有关详细信息,请参见 org-mode 的 wiki 中的 [non-beamer presentations section][18]。
|
||||
|
||||
### 4 更多
|
||||
|
||||
#### 4.1 本文中的附加资源
|
||||
|
||||
* [orgmode.org beamer tutorial][2]
|
||||
|
||||
* [LaTeX wiki][3]
|
||||
|
||||
* [Generating section title slides][4]
|
||||
|
||||
* [Shrinking content to fit on slide][5]
|
||||
|
||||
* 很棒的资源: refcard-org-beamer 详情参见其 [Github repo][6] 中的 PDF 和 .org 文件。
|
||||
|
||||
* 很漂亮的主题: [Theme matrix][7]
|
||||
|
||||
#### 4.2 下一个 Emacs 系列
|
||||
|
||||
mu4e 邮件!
|
||||
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: http://changelog.complete.org/archives/9900-emacs-5-documents-and-presentations-with-org-mode
|
||||
|
||||
作者:[John Goerzen][a]
|
||||
译者:[oneforalone](https://github.com/oneforalone)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
选题:[lujun9972](https://github.com/lujun9972)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]:http://changelog.complete.org/archives/author/jgoerzen
|
||||
[1]:https://hartwork.org/beamer-theme-matrix/all/beamer-albatross-Marburg-1.png
|
||||
[2]:https://orgmode.org/worg/exporters/beamer/tutorial.html
|
||||
[3]:https://en.wikibooks.org/wiki/LaTeX/Presentations
|
||||
[4]:https://tex.stackexchange.com/questions/117658/automatically-generate-section-title-slides-in-beamer/117661
|
||||
[5]:https://tex.stackexchange.com/questions/78514/content-doesnt-fit-in-one-slide
|
||||
[6]:https://github.com/fniessen/refcard-org-beamer
|
||||
[7]:https://hartwork.org/beamer-theme-matrix/
|
||||
[8]:https://changelog.complete.org/archives/tag/emacs2018
|
||||
[9]:https://github.com/jgoerzen/public-snippets/blob/master/emacs/emacs-org-beamer/emacs-org-beamer.org
|
||||
[10]:http://changelog.complete.org/archives/9900-emacs-5-documents-and-presentations-with-org-mode
|
||||
[11]:https://github.com/jgoerzen/public-snippets/raw/master/emacs/emacs-org-beamer/emacs-org-beamer.pdf
|
||||
[12]:https://github.com/jgoerzen/public-snippets/raw/master/emacs/emacs-org-beamer/emacs-org-beamer-document.pdf
|
||||
[13]:https://orgmode.org/manual/Exporting.html#Exporting
|
||||
[14]:https://en.wikipedia.org/wiki/Beamer_(LaTeX)
|
||||
[15]:https://orgmode.org/manual/Export-settings.html#Export-settings
|
||||
[16]:https://www.flickr.com/photos/jgoerzen/26366340577/in/dateposted/
|
||||
[17]:https://orgmode.org/worg/org-tutorials/non-beamer-presentations.html#org-tree-slide
|
||||
[18]:https://orgmode.org/worg/org-tutorials/non-beamer-presentations.html
|
||||
[19]:https://www.emacswiki.org/emacs/ELPA
|
@ -1,32 +1,30 @@
|
||||
How to create LaTeX documents with Emacs
|
||||
如何使用 Emacs 创建 LaTeX 文档
|
||||
======
|
||||
![](https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/email_paper_envelope_document.png?itok=uPj_kouJ)
|
||||
|
||||
In his excellent article, [An introduction to creating documents in LaTeX][1], author [Aaron Cocker][2] introduces the [LaTeX typesetting system][3] and explains how to create a LaTeX document using [TeXstudio][4]. He also lists a few LaTeX editors that many users find helpful in creating LaTeX documents.
|
||||
一篇由 Aaron Cocker 写的很棒的文章 [An introduction to creating documents in LaTeX][1] 中,介绍了 LaTeX 排版系统 [LaTeX typesetting system][3] 并描述了如何使用 [TeXstudio][4] 来创建 LaTeX 文档。同时,他也列举了一些很多用户觉得创建 LaTeX 文档很方便的编辑器。
|
||||
|
||||
This comment on the article by [Greg Pittman][5] caught my attention: "LaTeX seems like an awful lot of typing when you first start...". This is true. LaTeX involves a lot of typing and debugging, if you missed a special character like an exclamation mark, which can discourage many users, especially beginners. In this article, I will introduce you to [GNU Emacs][6] and describe how to use it to create LaTeX documents.
|
||||
[Greg Pittman][5] 对这篇文章的评论吸引了我:“当你第一次开始使用 LaTeX 时,他似乎是个和差劲的排版。。。” 事实也确实如此。LaTeX 包含了多种排版字体和调试,如果你漏了一个特殊的字符比如说感叹号,这会阻碍很多用户,尤其是新手。在本文中,我将介绍如何使用 [GNU Emacs][6] 来创建 LaTeX 文档。
|
||||
|
||||
### Creating your first document
|
||||
|
||||
Launch Emacs by typing:
|
||||
### 创建你的第一个文档
|
||||
启动 Emacs:
|
||||
```
|
||||
emacs -q --no-splash helloworld.org
|
||||
|
||||
```
|
||||
|
||||
The `-q` flag ensures that no Emacs initializations will load. The `--no-splash-screen` flag prevents splash screens to ensure that only one window is open, with the file `helloworld.org`.
|
||||
参数 `-q` 确保 Emacs 不会加载其他的初始化配置。参数 `--no-splash-screen` 防止 emacs 打开多个窗口,确保只打开一个窗口,最后的参数 `helloworld.org` 表示你要创建的文件名为 `helloworld.org` 。
|
||||
|
||||
![Emacs startup screen][8]
|
||||
|
||||
GNU Emacs with the helloworld.org file opened in a buffer window
|
||||
GNU Emacs 打开文件名为 helloworld.org 的窗口时的样子。
|
||||
|
||||
Let's add some LaTeX headers the Emacs way: Go to **Org** in the menu bar and select **Export/Publish**.
|
||||
现在让我们用 Emacs 添加一些 LaTeX 的标题吧: 在菜单栏找到 **Org** 选项并选择 **Export/Publish**.
|
||||
|
||||
![template_flow.png][10]
|
||||
|
||||
Inserting a default template
|
||||
导入一个默认的模板:
|
||||
|
||||
在下一个窗口中,Emacs 同时提供了导入和导出一个模板。使用 #([#] Insert template)来导入一个模板。这将会是光标跳转到一个带有 **Options category:** 提示的 mini-buffer 中。第一次你可能不知道这个类型的名字,但是你可以使用 Tab 键来查看所有的补全。输入 “default” 然后按回车,之后你就能看到如下的内容被插入了:
|
||||
|
||||
In the next window, Emacs offers options to either export or insert a template. Insert the template by entering **#** ([#] Insert template). This will move a cursor to a mini-buffer, where the prompt reads **Options category:**. At this time you may not know the category names; press Tab to see possible completions. Type "default" and press Enter. The following content will be inserted:
|
||||
```
|
||||
#+TITLE: helloworld
|
||||
|
||||
@ -58,7 +56,7 @@ In the next window, Emacs offers options to either export or insert a template.
|
||||
|
||||
```
|
||||
|
||||
Change the title, date, author, and email as you wish. Mine looks like this:
|
||||
根据自己的需求修改标题,日期,作者和 email。我自己的话是下面这样的:
|
||||
```
|
||||
#+TITLE: Hello World! My first LaTeX document
|
||||
|
||||
@ -70,13 +68,14 @@ Change the title, date, author, and email as you wish. Mine looks like this:
|
||||
|
||||
```
|
||||
|
||||
We don't want to create a Table of Contents yet, so change the value of `toc` from `t` to `nil` inline, as shown below:
|
||||
我们目前还不想创建一个目录,所以要将 `toc` 的值由 `t` 改为 `nil`,具体如下:
|
||||
```
|
||||
#+OPTIONS: tags:t tasks:t tex:t timestamp:t toc:nil todo:t |:t
|
||||
|
||||
```
|
||||
|
||||
Let's add a section and paragraphs. A section starts with an asterisk (*). We'll copy the content of some paragraphs from Aaron's post (from the [Lipsum Lorem Ipsum generator][11]):
|
||||
现在让我们添加一个章节和段落吧。章节是由一个星号(*)开头。我们从 Aaron 的贴子([Lipsum Lorem Ipsum generator][11])复制一些文本过来:
|
||||
|
||||
```
|
||||
* Introduction
|
||||
|
||||
@ -107,37 +106,38 @@ Let's add a section and paragraphs. A section starts with an asterisk (*). We'll
|
||||
|
||||
![helloworld_file.png][13]
|
||||
|
||||
The helloworld.org file
|
||||
helloworld.org 文件
|
||||
|
||||
With the content in place, we'll export the content as a PDF. Select **Export/Publish** from the **Org** menu again, but this time, type **l** (export to LaTeX), followed by **o** (as PDF file and open). This not only opens PDF file for you to view, but also saves the file as `helloworld.pdf` in the same path as `helloworld.org`.
|
||||
|
||||
将内容修改好后,我们要把它导出为 PDF 格式。再次在 **Org** 的菜单选项中选择 **Export/Publish**,但是这次,要输入 **l**(export to LaTeX),紧跟着输入 **o**(as PDF file and open)。这次操作不止会打开 PDF 文件让你浏览,同时也会将文件保存为 `helloworld.pdf`,并保存在与 `helloworld.org` 的同一个目录下。
|
||||
|
||||
![org_to_pdf.png][15]
|
||||
|
||||
Exporting helloworld.org to helloworld.pdf
|
||||
将 helloworld.org 导出为 helloworld.pdf
|
||||
|
||||
![org_and_pdf_file.png][17]
|
||||
|
||||
Opening the helloworld.pdf file
|
||||
打开 helloworld.pdf 文件
|
||||
|
||||
You can also export org to PDF by pressing `Alt + x`, then typing "org-latex-export-to-pdf". Use Tab to auto-complete.
|
||||
你也可以按下 `Alt + x` 键,然后输入 “org-latex-export-to-pdf” 来将 org 文件导出为 PDF 文件。可以使用 Tab 键来自动补全命令。
|
||||
|
||||
Emacs also creates the `helloworld.tex` file to give you control over the content.
|
||||
Emacs 也会创建 `helloworld.tex` 文件来让你控制具体的内容。
|
||||
|
||||
![org_tex_pdf.png][19]
|
||||
|
||||
Emacs with LaTeX, org, and PDF files open in three different windows
|
||||
Emacs 在三个不同的窗口中分别打开 LaTeX,org 和 PDF 文档。
|
||||
|
||||
You can compile the `.tex` file to `.pdf` using the command:
|
||||
你可以使用命令来将 `.tex` 文件转换为 `.pdf` 文件:
|
||||
```
|
||||
pdflatex helloworld.tex
|
||||
|
||||
```
|
||||
|
||||
You can also export the `.org` file to HTML or as a simple text file. What I like about .org files is they can be pushed to [GitHub][20], where they are rendered just like any other markdown formats.
|
||||
你也可以将 `.org` 文件输出问HTML或是一个简单的文本格式的文件。我最喜欢 .org 文件的原因是他们可以被 push 到 [GitHub][20] 上,然后被渲染的同 markdown 的一样的格式。
|
||||
|
||||
### Creating a LaTeX Beamer presentation
|
||||
### 创建一个 LaTeX 的 Beamer presentation
|
||||
|
||||
Let's go a step further and create a LaTeX [Beamer][21] presentation using the same file with some modifications as shown below:
|
||||
现在让我们更进一步,通过少量的修改上面的文档来创建一个 LaTeX [Beamer][21]的 presentation,如下所示:
|
||||
```
|
||||
#+TITLE: LaTeX Beamer presentation
|
||||
|
||||
@ -235,20 +235,20 @@ We have added three more lines to the header:
|
||||
|
||||
```
|
||||
|
||||
To export to PDF, press `Alt + x` and type "org-beamer-export-to-pdf".
|
||||
导出为 PDF,按下 `Alt + x` 键后输入 “org-beamer-export-to-pdf”
|
||||
|
||||
![latex_beamer_presentation.png][23]
|
||||
|
||||
The Latex Beamer presentation, created using Emacs and Org mode
|
||||
用 Emacs 和 Org mode 创建的 Latex Beamer persentation
|
||||
|
||||
I hope you enjoyed creating this LaTeX and Beamer document using Emacs (note that it's faster to use keyboard shortcuts than a mouse). Emacs Org-mode offers much more than I can cover in this post; you can learn more at [orgmode.org][24].
|
||||
希望你会爱上使用 Emacs 来创建 LaTex 和 Beamer 文档(注意:使用快捷键比用鼠标更快些)。Emacs 的 Org-mode 提供了比我在这篇文章中说的更多的功能,你可以在 [orgmode.org][24] 获取更多的信息.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://opensource.com/article/18/4/how-create-latex-documents-emacs
|
||||
|
||||
作者:[Sachin Patil][a]
|
||||
译者:[译者ID](https://github.com/译者ID)
|
||||
译者:[oneforalone](https://github.com/oneforalone)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
选题:[lujun9972](https://github.com/lujun9972)
|
||||
|
@ -0,0 +1,54 @@
|
||||
如何在 SUSE 12 Linux 中进入单用户模式?
|
||||
======
|
||||
一篇了解如何在 SUSE 12 Linux 服务器中进入单用户模式的简短文章。
|
||||
|
||||
![How to enter single user mode in SUSE 12 Linux][1]
|
||||
|
||||
在这篇简短的文章中,我们将向你介绍在 SUSE 12 Linux 中进入单用户模式的步骤。在排除系统主要问题时,单用户模式始终是首选。单用户模式禁用网并且没有其他用户登录,你可以排除许多多用户系统的情况,可以帮助你快速排除故障。单用户模式最常见的一种用处是[重置忘记的 root 密码][2]。
|
||||
|
||||
### 1\. 暂停启动过程
|
||||
|
||||
首先,你需要拥有机器的控制台才能进入单用户模式。如果它是 VM 就要 VM 控制台,如果它是物理机那么你需要连接它的 iLO/串口控制台。重启系统并按任意键停止 grub 启动菜单中的内核自动启动。
|
||||
|
||||
![Kernel selection menu at boot in SUSE 12][3]
|
||||
|
||||
### 2\. 编辑内核的启动选项
|
||||
|
||||
进入上面的页面后,在所选内核(通常是你首选的最新内核)上按 “e” 更新其启动选项。你会看到下面的页面。
|
||||
|
||||
![grub2 edits in SUSE 12][4]
|
||||
|
||||
现在,向下滚动到内核引导行,并在行尾添加 `init=/bin/bash`,如下所示。
|
||||
|
||||
![Edit to boot in single user shell][5]
|
||||
|
||||
### 3\. 引导编辑后的内核
|
||||
|
||||
现在按 `Ctrl-x` 或 `F10` 来启动这个编辑过的内核。内核将以单用户模式启动,你将看到井号提示符,即有服务器的 root 访问权限。此时,根文件系统以只读模式挂载。因此,你对系统所做的任何更改都不会被保存。
|
||||
|
||||
运行以下命令以将根文件系统重新挂载为可重写入的。
|
||||
|
||||
```
|
||||
kerneltalks:/ # mount -o remount,rw /
|
||||
```
|
||||
|
||||
这就完成了!继续在单用户模式中做你必要的事情吧。完成后不要忘了重启服务器引导到普通多用户模式。
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://kerneltalks.com/howto/how-to-enter-single-user-mode-in-suse-12-linux/
|
||||
|
||||
作者:[kerneltalks][a]
|
||||
选题:[lujun9972][b]
|
||||
译者:[geekpi](https://github.com/geekpi)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]: https://kerneltalks.com
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://a4.kerneltalks.com/wp-content/uploads/2018/11/How-to-enter-single-user-mode-in-SUSE-12-Linux.png
|
||||
[2]: https://kerneltalks.com/linux/recover-forgotten-root-password-rhel/
|
||||
[3]: https://a1.kerneltalks.com/wp-content/uploads/2018/11/Grub-menu-in-SUSE-12.png
|
||||
[4]: https://a3.kerneltalks.com/wp-content/uploads/2018/11/grub2-editor.png
|
||||
[5]: https://a4.kerneltalks.com/wp-content/uploads/2018/11/Edit-to-boot-in-single-user-shell.png
|
Loading…
Reference in New Issue
Block a user