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, A generated PDF file ================================================= ========================================================== ==================
Howto: texlive2011, lyx 2.0.2 environment configuration in Ubuntu 11.10 by: designlab

Table of contentssection 1: partition preface Section 2: Prepare preparation section 3: Prepare to install Tex live and test section 4: Prepare to install and configure lyxsection 5: begin to use Section 6: appendix subsection 6.1: forbidden font subsection 6.2: Configure references for unsuccessful Installation

1. Preface Tex is a very common 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 for the installation. Write the correct information 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:
  1. First, Uninstall all the packages related to Tex, texlive, and latex in the system. You can use the new package manager;
  2. Download a texlive2011.iso file from ctex.org (Click here );
  3. For Dummies to install it, use a graphical installation. Terminal: sudo apt-Get install Perl-TK;
  4. 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)
  5. Run the installation program./install-Tl-Gui = perltk. A graphical installation interface is displayed;
  6. 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;
  7. Install Tex live;

3. The required package and tools will be installed automatically when Tex live is installed and the test installer is installed in tranquility without any intervention. Test: to test whether the installation is successful, run several commands to check whether the installation is successful.
  1. 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;
  2. 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.
  3. Preview result: xdvi sample2e. DVI. You can see an English document;
  4. Create a PDF file: pdflatex sample2e. Tex;
  5. Preview PDF: xpdf sample2e.pdf. If you are prompted that no xpdf is available, install it from the source;
  6. 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. installing and configuring lyxlyx is a visual editing environment. This article is completed in lyx. Process:
  1. Download the lyx source file package (click it). Note that it is the source code version;
  2. Install two packages on which lyx depends: sudo apt-Get install zlib1g-dev qt4-designer (note that zilib1g contains number 1 );
  3. Unzip: Tar xzvf lyx-2.0.2.tar.gz;
  4. Configure and compile:./configure & make;
  5. Install: sudo make install;
Configuration process:
  1. Start lyx, terminal: lyx;
  2. In the menu bar, "tool configure again" initializes the lyx environment;
  3. Create a new document and set "document renewal Preferences ";
  4. 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,;
  5. 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;
  6. On the tab "pdf properties", select "use hyperref", and set "generate link" to select "hyperlink without borders and hyperlink color display ";
  7. On the "output" tab, the default output format is "pdf (xetex )";
  8. 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. You may want to create a new 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. In the appendix, an incorrect installation solution is provided. 6.1 courier font command: xetex opentype-info.tex prompts "invalid fontanme 'Latin Modern Roman... '" error solution:
  1. Copy the texlive-fontconfig.conf file to/etc/fonts/CONF. d/09-texlive.conf.
  2. Run FC-Cache-FSV.
6.2 failed installation and configuration by using Ubuntu Source: run the following command: APT-Get install textlive-base-bin latex-CJK-Chinese; apt-Get install lyx; it should be said that it is normal in the English environment. After setting, it can also output Chinese characters (if the missing verification number, treated authentication 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 decided to give up and uninstall it.


References

[1] http://blog.csdn.net/ustc_dylan/article/details/6877467

[2] http://blog.csdn.net/lostaway/article/details/6177486

[3] lyx Chinese installation documentation: http://www.tug.org/texlive/doc/texlive-zh-cn/

Document generated by elyxer 1.2.3 () on 2012-02-22t11: 46: 08.560447


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.