Merge pull request #5256 from FSSlc/master

[Translated] 20170222 Introduction to LaTeXila - a multi-language LaTeX editor for Linux.md
This commit is contained in:
Xingyu.Wang 2017-03-09 21:23:30 +08:00 committed by GitHub
commit 85e7fcb113
2 changed files with 120 additions and 122 deletions

View File

@ -1,122 +0,0 @@
FSSlc translating
Introduction to LaTeXila - a multi-language LaTeX editor for Linux
============================================================
### On this page
1. [Why LaTeX?][1]
2. [Starting work on a new document and setting up the structure][2]
3. [LaTeXila ease of use and mathematics][3]
4. [From .tex to .rtf][4]
5. [Conclusion][5]
LaTeXila is a multi-language LaTeX editor for Linux users who prefer the GTK+ looks. The software is simple, easy to use, adequately powerful and customizable, so if youre interested in LaTeX you should give this tool a try. In the following quick guide, I will showcase how to get started with LaTeXila and what its main features are. But first...
### Why LaTeX?
So, if I want to create a text document, why wouldnt I simply use the standard LibreOffice or Abiword tools? The answer is because LaTeX editors in general offer more powerful formatting tools than your standard text editor, while the process of writing the content remains simple and pivotal. LaTeX is a document preparation system that is actually meant to simplify the formatting procedures for the most common forms of publishing like books and scientific reports that may contain a lot of mathematical formulas, multi-lingual typesetting elements, cross-references and citations, indexes, bibliographies, etc. While all of these things can actually be done in LibreOffice, they are way easier in LaTeXila while the end result is bound to be of a higher quality if done right.
### Starting work on a new document and setting up the structure
First, we need to create a new file on LaTeXila, and this can be done by clicking on the “New File” icon located on the upper left. This will open a dialog that allows us to select a template and get started quickly.
[
![Start the LaTex Editor](https://www.howtoforge.com/images/introduction-to-latexila/pic_1.png)
][6]
Lets suppose that I will write a book so I select the book template, add the title and author in the corresponding brackets as shown in the following screenshot:
[
![Open the book template](https://www.howtoforge.com/images/introduction-to-latexila/pic_2.png)
][7]
Now let me explain a few things about the structure. I know it looks like coding, and if you are a writer and not a coder it may look strange to work like that but bear with me and Ill explain.
Between the first line and the ninth line, we have all the stuff that define some basic factors for the whole document. In the first line for example, we can define the paper format and the font size by changing the “[a4paper,11pt]” accordingly. More options can be added inside this particular square brackets space separated by commas.
Between lines two and four, we can see entries that start with “\userpackage” followed by the options in square brackets and the command in brackets. These are enhancement packages that LaTeXila has installed by default in our system and uses them by default in most templates. The particular ones concern the font encoding, character encoding, and fonts quality respectively.
Proceeding to the “\maketitle” row, here we can add a separate title page beyond the first one that will be placed on the top by default. Similarly, the row containing the “\tableofcontents” command is for the automatic creation of a table of contents for the book.
Finally, we can name the chapter as we like by adding a title in the brackets next to the “\chapter”. This first chapter will be automatically marked as chapter one. You may add your content in the following lines, and the chapter ends when the next one begins by \chapter again on a new line. This new chapter will be automatically marked as chapter two, and so on.
[
![LaTex Formatting](https://www.howtoforge.com/images/introduction-to-latexila/pic_3.png)
][8]
Chapters can also be separated into smaller chunks by using the command “\section” and then even more with the command “\subsection”. Both sections and chapters should be automatically detected by the “\tableofcontents” command which will use their title and page number. See the following screenshot to correlate the way chapters and sections work for your book.
[
![LaTex preview](https://www.howtoforge.com/images/introduction-to-latexila/pic_4.png)
][9]
If you want to get an overview of the structure, you may change the left sidebar to the “Structure” setting and ensure that all is structured as intended. From the same tool, you may control any data tables or images that are placed in each section.
[
![LaTex structure](https://www.howtoforge.com/images/introduction-to-latexila/pic_5.png)
][10]
Talking about these, some people want to include the location of tables and images into their table of contents. To do this, you may add the following lines below the “\tableofcontents”:
\listoffigures
\listoftables
The final command that signifies the end of the book is the “\end{document}” so your structure must always end with this.
### LaTeXila ease of use and mathematics
While LaTeX is a document creation system based on commands that are independent of the editor one uses, it is important to note that LaTeXila offers a set of helpful tools that will save you time and effort while writing your report or book. For example, theres an auto-completion function for LaTeX commands as that is conveniently activated every time you start typing a command.
[
![Mathematic Formulas in LaTex](https://www.howtoforge.com/images/introduction-to-latexila/pic_6.png)
][11]
Theres an integrated spell checking system based on gspell that you may set to the right language from the “Tools” menu on the top bar, and theres the top toolbar that contains buttons for almost anything that youll need. From left to right, you can add chapters and parts, add cross-references, fiddle with the character size and styling for a selected part, add bullet lists, and mathematical functions. These can be done manually, but it is always nicer to have them one click away instead.
For the creation of the mathematical formulas, you can use a combination of the toolbar options with the sidebar characters that are added with a simple click. Just select the “Symbols” in the left sidebar and youll find the relevant categories of “Relations”, “Greek symbols”, “Operators” etc. See the following screenshot as an example of what can be done:
[
![Greek Symbols and Operators](https://www.howtoforge.com/images/introduction-to-latexila/pic_7.png)
][12]
These graphical lists of symbols really make the creation of formulas and mathematical expressions a walk in the park.
### From .tex to .rtf
By default, LaTeXila saves your work in the standard “.tex” format which we can use to build a “rich text format” document that we can open with a word editor like LibreOffice. To do this, we need to install a package named “latex2rtf” which is available in all distributions. We then hop into the file destination, open a terminal there and type “latex2rtf filename” as shown:
[
![LaTEX to RTF export](https://www.howtoforge.com/images/introduction-to-latexila/pic_8.png)
][13]
Of course, LaTeXila offers its own building tools that you can access from the top toolbar or the top panel (Build), but I am giving you latex2rtf in case something goes wrong with the other system which in my case didnt work.
### Conclusion
If the above sparked your interest to go ahead and discover the power of LaTeX, then good. My intention was to present a tool that is good for newcomers in the sense that it is easy to use and write on. If only LaTeXila had a dual screen mode with a live previewer, and it would be perfect…
--------------------------------------------------------------------------------
via: https://www.howtoforge.com/tutorial/introduction-to-latexila-latex-editor/
作者:[Bill Toulas][a]
译者:[译者ID](https://github.com/译者ID)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]:https://www.howtoforge.com/tutorial/introduction-to-latexila-latex-editor/
[1]:https://www.howtoforge.com/tutorial/introduction-to-latexila-latex-editor/#why-latex
[2]:https://www.howtoforge.com/tutorial/introduction-to-latexila-latex-editor/#starting-work-on-a-new-document-and-setting-up-the-structure
[3]:https://www.howtoforge.com/tutorial/introduction-to-latexila-latex-editor/#latexila-ease-of-use-and-mathematics
[4]:https://www.howtoforge.com/tutorial/introduction-to-latexila-latex-editor/#from-tex-to-rtf
[5]:https://www.howtoforge.com/tutorial/introduction-to-latexila-latex-editor/#conclusion
[6]:https://www.howtoforge.com/images/introduction-to-latexila/big/pic_1.png
[7]:https://www.howtoforge.com/images/introduction-to-latexila/big/pic_2.png
[8]:https://www.howtoforge.com/images/introduction-to-latexila/big/pic_3.png
[9]:https://www.howtoforge.com/images/introduction-to-latexila/big/pic_4.png
[10]:https://www.howtoforge.com/images/introduction-to-latexila/big/pic_5.png
[11]:https://www.howtoforge.com/images/introduction-to-latexila/big/pic_6.png
[12]:https://www.howtoforge.com/images/introduction-to-latexila/big/pic_7.png
[13]:https://www.howtoforge.com/images/introduction-to-latexila/big/pic_8.png

View File

@ -0,0 +1,120 @@
LaTeXila 简介 - Linux 下一个多语言 LaTeX 编辑器
============================================================
### 在本文中你将看到
1. [为何选择使用 LaTeX?][1]
2. [创建新文档并设定文档的基本结构][2]
3. [LaTeXila 简单易用,公式齐全][3]
4. [将 .tex 文件转换为 .rtf 文件][4]
5. [结论][5]
LaTeXila 是一个多语言 LaTeX 编辑器,专为那些偏爱 GTK+ 外观的 Linux 用户设计。这个软件简单,但有足够强大,可定制性良好,所以如果你对 LaTeX 感兴趣,那么你就应该尝试一下这个工具。在下面的快速指南中,我将展示如何使用 LaTeXila 并介绍其主要功能。但在开始之前你可能要问:
### 为何选择使用 LaTeX?
假如我想创建一个文本文档,为什么我不使用 LibreOffice 或者 Abiword 这些常规的工具呢这个问题的答案是相比于常规的文本编辑器LaTeX 编辑器一般来说都会提供更多功能强大的格式化工具让你在写作期间专注于文档的内容。LaTeX 是一个文档准备系统,实际上这意味着它简化了大多数常见出版物的处理过程,这些出版物包括书籍或者科学报告,它们通常都包含很多数学公式,多语言排版元素,交叉引用及引文,参考文献等等需要处理的元素。尽管上面的那些元素也可以用 LibreOffice 来处理,但如果要保证最后处理过的文档是高质量的,相比于使用 LibreOffice使用 LaTeXila 则要相对简单一些。
### 在一个新文档上开始工作并设定文章结构
首先,我们需要在 LaTeXila 中创建一个新文件,这个可以通过点击位于左上角的 “新建文件” 图标来实现,接着它将打开一个对话框,让我们选择一个模板从而快速地开始写作。
[
![打开 LaTex 编辑器](https://www.howtoforge.com/images/introduction-to-latexila/pic_1.png)
][6]
在这里假设我将写一本书,所以我应该选择书籍模板,像下面的截图那样在相应的括号中添上标题和作者:
[
![打开书籍模板](https://www.howtoforge.com/images/introduction-to-latexila/pic_2.png)
][7]
现在就让我来解释一些关于文章结构的事情。我知道这看起来就像编代码,如若你是一位作家而非程序员,那么像下面那样工作或许很是奇怪,但请先容我讲完,下面我将对此进行解释。
在第一行和第九行之间,我们已经写好了书写整个文档所需的所有基本要素。例如在第一行中,我们可以通过修改“[a4paper,11pt]”来定义纸张和字体的大小,在这个方括号中,我们可以添加更多的选项,选项之间以逗号来分隔。
在第二行和第四行之间,我们可以看到一些条目,它们都以“\userpackage”打头紧接着的是用方括号包裹的选项和用括号包裹的命令。这些命令都是一些增强宏包LaTeXila 默认已经安装它们到我们的系统上了,并且在大多数模板中都将使用它们。需要特别注意的是字体编码,字符编码和字体的类型。
紧着让我们看看 "\maketitle" 这一行,这里我们可以添加一个单独的标题页,且默认情况下标题的内容将被放置在第一页的顶部。类似的,包含“\tableofcontents”的那行将会自动生成书籍的目录。
最后,我们可以自己命名章节的名称,这可以通过在“\chapter”后的括号中添加章节名称来实现。第一个章节将会被自动地标记为第一章。你可以在接下来的行中添加内容一直到下一个以 "\chapter" 开头的新行为止,这些都将是这个章节的内容。新的章节将会被自动地标记为第二章,以此类推。
[
![LaTex 的格式](https://www.howtoforge.com/images/introduction-to-latexila/pic_3.png)
][8]
章节之间还可以用命令“\section”来划分为更小的块甚至还可以使用“\subsection”来划分为更小的部分。各个小节和章都将被“\tableofcontents”自动检测到并将使用它们的标题和页码来填充目录的内容。看看下面的截图就可以看到章和小节是如何在你的书中被排版的。
[
![LaTex 预览](https://www.howtoforge.com/images/introduction-to-latexila/pic_4.png)
][9]
假如你想看看结构的大致布局,你可以将左边的工具栏更换到“结构”选项,并确保所有的内容用缩进隔开了。在工具栏中,你还可以可能控制位于各个小节中的任意数据表格和图片。
[
![LaTex 结构](https://www.howtoforge.com/images/introduction-to-latexila/pic_5.png)
][10]
讲到这里,有人或许想将表格和图片的位置也包含在目录中。要达到此目的,你需要将下面的两行添加到“\tableofcontents” 之后:
\listoffigures
\listoftables
最后标志着书籍结束的信号是“\end{document}”。所以你的布局应该总是以此为结尾。
### LaTeXila 简单易用,公式齐全
LaTeX 是一个基于命令的文档生成系统它与使用的编辑器没有多少关联。这里需要强调的是 LaTeXila 提供了一系列强大的工具,使得在你书写报告或书籍时能够节省一些时间和精力。例如对于 LaTex 命令,它提供了自动补全功能,这个功能将在你每次开始输入命令时被激活。
[
![LaTeX 中的数学公式](https://www.howtoforge.com/images/introduction-to-latexila/pic_6.png)
][11]
LaTeXila 还集成有基于 gspell 的拼写检测系统,你可以在最上面的“工具”菜单中设定合适的语言。最上面的工具栏里几乎包含了你要用到的所有按钮。从左到右,你可以完成添加章节,交叉引用,调整字符的大小,格式化被选取的部分,添加无序列表和数学函数等等。这些都可以手动地输入,但通过点击相应按钮来完成或许更加方便。
对于生成数学公式,结合侧边栏上的工具栏选项,你只需轻轻一点就可以添加相应的数学符号。点击位于左边的侧边栏中“符号”框,你就可以看到相关的符号分类,例如”关系运算符“,”希腊字母“,”算子“等等。下面的截图就是一些符号的示例:
[
![希腊字母和算子符号](https://www.howtoforge.com/images/introduction-to-latexila/pic_7.png)
][12]
这些符号的图形化列表使得公式和数学表达式的生成犹如在公园中散步那样舒适。
### 将 .tex 文件转换为 .rtf 文件
默认情况下LaTeXila 会将你的文档保存为标准的 `.tex` 文档,而我们可以使用 `.tex` 文档来生成一个”富文本“文档,这些富文本文档可以使用像 LibreOffice 那样的文本编辑器打开。要达到此目的,我们需要安装一个名为 `latex2rtf` 的工具,它在所有的 Linux 发行版本中都可以被获取到。像下面那样在文本所在的目录打开虚拟终端, 并输入 `latex2rtf 文件名称`
[
![由 LaTeX 文档生成 RTF 文档](https://www.howtoforge.com/images/introduction-to-latexila/pic_8.png)
][13]
当然 LLaTeXila 也提供了它自己的构建工具,这些工具可以在上面的工具栏或者最上面的面板(构建)中看到。但我向你推荐 latex2rtf 是以防在其他的操作系统上出现某些意想不到的问题。
### 结论
假如上面的介绍激发了你探索 LaTeX 的兴趣,那就再好不过了。我写这篇文章的目的是向新手介绍一款简单易用且适合他们写作的工具。要是 LaTeXila 还带有实时预览的双屏模式的话,它就更加完美了。。。
--------------------------------------------------------------------------------
via: https://www.howtoforge.com/tutorial/introduction-to-latexila-latex-editor/
作者:[Bill Toulas][a]
译者:[FSSlc](https://github.com/FSSlc)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]:https://www.howtoforge.com/tutorial/introduction-to-latexila-latex-editor/
[1]:https://www.howtoforge.com/tutorial/introduction-to-latexila-latex-editor/#why-latex
[2]:https://www.howtoforge.com/tutorial/introduction-to-latexila-latex-editor/#starting-work-on-a-new-document-and-setting-up-the-structure
[3]:https://www.howtoforge.com/tutorial/introduction-to-latexila-latex-editor/#latexila-ease-of-use-and-mathematics
[4]:https://www.howtoforge.com/tutorial/introduction-to-latexila-latex-editor/#from-tex-to-rtf
[5]:https://www.howtoforge.com/tutorial/introduction-to-latexila-latex-editor/#conclusion
[6]:https://www.howtoforge.com/images/introduction-to-latexila/big/pic_1.png
[7]:https://www.howtoforge.com/images/introduction-to-latexila/big/pic_2.png
[8]:https://www.howtoforge.com/images/introduction-to-latexila/big/pic_3.png
[9]:https://www.howtoforge.com/images/introduction-to-latexila/big/pic_4.png
[10]:https://www.howtoforge.com/images/introduction-to-latexila/big/pic_5.png
[11]:https://www.howtoforge.com/images/introduction-to-latexila/big/pic_6.png
[12]:https://www.howtoforge.com/images/introduction-to-latexila/big/pic_7.png
[13]:https://www.howtoforge.com/images/introduction-to-latexila/big/pic_8.png