Linux typographical tool-TeX visual tool LyX guide to installation and configuration of Chinese editing Environment

Source: Internet
Author: User
Tags install perl

TeX can be said to be an international typographical standard, especially papers and books. The formula is much better than the MS Office series, and the format is exceptionally beautiful. However, due to its complicated commands, non-visual editing makes the entry threshold high, so a macro package such as LaTeX is available, but it is more complicated for people familiar with the MS Series, is there a visual editing tool? The answer is yes. Today, LyX is a WYSIWYG tool.
How can I install and use the configuration? The following is an Html document generated using LyX.
========================================================== ========================================================== ==========
 
HowTo: Texlive2011 and LyX 2.0.2 environment configuration in Ubuntu 11.10
Author: DesignLab
 
Table of Contents
Section 1: Preface
Section 2: Prepare
Section 3: Installing TeX Live and Testing
Section 4: installing and configuring LyX
Section 5: getting started
Section 6: Appendix
Subsection 6.1: fonts
Subsection 6.2: the installation configuration of the supervisor fails.
References
 
1. Preface
TeX is a widely used and popular typographical program in the world, especially for papers and books. We usually get used to the formatting of the Mircosoft Office (MSO) suite. For general document processing, MSO does meet the needs and is intuitive (WYSIWYG ). However, for international journals that require strict requirements, the results are basically based on TeX. The PDF documents generated by the documents are especially exquisite and the expressions of mathematical formulas are more comfortable.
However, TeX uses commands to control the document format. The design idea is what you see and think. For those who are not programmers, the threshold is too high, so LaTeX appears, some Basic Format Commands of TeX are packed on the basis of TeX, so that users can make good documentation through several simple statements, we only need to write the format document in a text program and compile it to output the required files. Unfortunately, the general requirement for document typographical commands is greatly reduced, but for some complex formulas, remember the complicated format control commands, and because they are not WYSIWYG design ideas, they do not see intuitive text output, making document editing a little complex, it is not easy for beginners to get started.
Therefore, LyX is a visual LaTeX environment. Based on LaTeX design, LyX basically meets what you see is what you get, which is very easy for beginners to master. For most people, it is unrealistic to learn a lot of commands for typography, and it is a waste of energy. It is not wise to spend too much time on document formatting. Fortunately, LyX is an open source software and thanks to these obscure contributors.
2. Prepare
Here, I wrote the correct one first. The appendix contains an unsuccessful installation process.
My installation environment is Ubuntu11.10, and the update source is the official source.
Note: Do not use apt-get
This is a silly installation:
First, Uninstall all the packages related to TeX, TeXLive, and LaTeX in the system. You can use the new package manager;
Download a Texlive2011.iso file from Ctex.org (Click here );
For Dummies to install it, use a graphical installation. Terminal: sudo apt-get install perl-tk;
Mount the image, Linux is very simple, create a mount point: mkdir/media/image mount: mount-o loop/home/B2C/texlive2011-version.iso/media/image/(version is the version number, there may be differences. Here we refer to version as the Representative)
Run the installation program./install-tl-gui = perltk. A graphical installation interface is displayed;
Create a symbolic link pointing to the system directory. Modify the alias from "no" to "yes", that is, the alias creates a symbolic link in the standard position;
Install Tex Live;
 
3. Install TeX Live and Test
The installer automatically installs the required packages and tools without any intervention.
Test:
To test whether the installation is successful, run several commands to check whether the installation is successful.
Terminal: tex -- version later the system returns the TeX version number normally. If the prompt "no command is found" is displayed, you may need to configure the environment variables. For more information, see Appendix environment variable settings;
Latex sample2e. the message "Output written on sample2e. dvi (3 pages ,.....) ", the first installation prompt sample2e. log cannot be written. It was initially thought to be sample2e. dvi does not find this file. It is found that logs cannot be written and may be related to permissions. It is normal after restart.
Preview result: xdvi sample2e. dvi. You can see an English document;
Create a PDF file: pdflatex sample2e. tex;
Preview PDF: xpdf sample2e.pdf. If you are prompted that no xpdf is available, install it from the source;
Test xetex: xetex opentype-info.tex. If you receive information like "Invalid fontanme 'Latin Modern Roman... '", You need to configure XeTeX, see the appendix;
After all the preceding commands are successfully tested, perform the following steps.
4. install and configure LyX
LyX is a visual editing environment. This article is completed in LyX.
Process:
Download the LyX Source file package (click it). Note that it is the Source Code version;
Install two packages on which LyX depends: sudo apt-get install zlib1g-dev qt4-designer (note that zilib1g contains number 1 );
Unzip: tar xzvf lyx-2.0.2.tar.gz;
Configure and compile:./configure & make;
Install: sudo make install;
Configuration process:
Start LyX, terminal: lyx;
In the menu bar, "tool configure again" initializes the LyX environment;
Create a new document and set "document renewal Preferences ";
Set "font", select "use non-TeX font", and select a Chinese font from the drop-down menu. You can select the Wenquan font family. Of course, you can attach a third-party font, such as a simhei font,;
The "language" tab is configured with "simplified Chinese", and the encoding must be set to "Unicode (XeTeX) (utf8)". This option cannot be modified during this installation;
On the tab "PDF properties", select "use hyperref", and set "generate link" to select "hyperlink without borders and hyperlink color display ";
On the "output" tab, the default output format is "PDF (XeTeX )";
This step is very important. I didn't set it, and the generated document always exceeded the page margin. Later I found that all the lines in the document were not automatically wrapped. I found this method for a long time, add the following command \ XeTeXlinebreaklocale "zh" \ XeTeXlinebreakskip = 0pt plus 1pt in the "document" Introduction "to automatically wrap the line.
After the settings, the configuration is successful. If a prompt is displayed that the font cannot be found, reconfigure the settings according to the configuration process and remove the commands in the LaTaX introduction area.
5. Getting Started
Create a document, enter a few Chinese characters, and press Ctrl + R to view the output. Of course, other specific functions will be available for you.
6. Appendix
An incorrect installation solution is attached here.
6.1 Tib font
Command: The xetex opentype-info.tex prompts "Invalid fontanme 'Latin Modern Roman... '" error solution:
Copy the texlive-fontconfig.conf file to/etc/fonts/conf. d/09-texlive.conf.
Run fc-cache-fsv.
6.2 failed installation and configuration
This is the installation process using the Ubuntu Source:
Run the following command: apt-get install textlive-base-bin latex-cjk-chinese; apt-get install lyx;
It should be said that the English environment is normal, and the Chinese language can also be output after the settings (if the missing number, treated errors as missing zero error is reported, set the default language to "English" when selecting "document scripting language"). In fact, it is still set to XeTeX format, which truly achieves the purpose of outputting a Chinese PDF, however, I continue to configure the Ctex package, but the system prompts that ctexart cannot be found. cls file. I have downloaded its macro package from the Ctex website. After the configuration, it still has no effect. I just gave up and uninstalled it.
 
References
[1] http://www.bkjia.com/ OS /201202/120526.html
[2] http://www.bkjia.com/ OS /201202/120527.html
[3] LyX Chinese installation documentation: http://www.tug.org/texlive/doc/texlive-zh-cn/


Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.