Use LyX to create a LaTeX document in graphical form

Source: Internet
Author: User
Tags command line requires git clone linux

Troubleshoot LaTeX formatting challenges, previewing on selected platforms during authoring

TeX, published in 1978, is a markup language that Donald Knuth created in order to use it to format its Art of the Computer Programming series books. Tex is soon widely used in science and academia, but direct use of the Tex tag can be tricky. The LaTeX macro language, which was created by computer scientist Leslie Lamport years later, promoted the TeX tag to a structured document domain, simplifying the identification of document types and their logical components (such as sections, segments, lists, graphs, and headings).

Markup languages such as LaTeX are very popular in academia and the scientific community because they make it easy to combine documents from multiple authors into a consistent structure publication. However, their use usually requires an iterative write/tag/preview order. The preview phase of this order allows the author to validate their markup and preview the formatted document display effect. Marking and previewing LaTeX documents are usually done using a separate external application, which may interrupt the author's concentration (or may cause the work to be delayed).

The LyX document processor was born at the beginning of this century. LyX simplifies writing and editing in LaTeX because you can see the formatted document display in the process of writing, not in a separate preview phase. LyX introduces the concept of Wysiwym (WYSIWYG) to differentiate between graphically creating structured documents and graphically creating documents without a mandatory structure (WYSIWYG by the classic wysiwyg-). LyX also provides publications-specific templates for many scientific and scholarly publications. With templates, you can use any LaTeX macros and styles that your publication provides, and they also help ensure that you do not use invalid LaTeX macros during the submission of your publication.

This article will comprehensively introduce LyX. You will learn how to install, use, and customize it on the selected operating system, and how to take advantage of the LyX template.

Build LyX from source code

Like all Open-source software, LyX's source code is free to use (if you want to build it yourself to get the latest fixes and features). If you have git installed on your system, you can check out the code through the Git clone Git://git.lyx.org/lyx command.

To provide a graphics subsystem for the standalone platform used by LyX, additional packages, such as Qt4 and Qt4-devel, are required. See the Readme and INSTALL files in the Yyx source code to learn more about building LyX for your platform. Building LyX for Linux also requires standard Automake, autoconf, and GetText packages (and GNU Compiler Collection).

Install the LyX on your system

LyX is supported by Linux, Windows, Cygwin, Mac OS X, IBMOS/2, and Haiku (a BeOS-inspired operating system). Extensible installers are available for all of these operating systems. In the same way, most Linux distributions provide a lyx version of the release in a central repository, so you can install LyX without having to download an installable package that has the format of the release package separately.

After downloading the installer for your platform, you can install LyX as you would any other package. The LyX package for Windows provides a Tex/latex bundled version named MiKTeX. Linux and Mac OS X lyx Setup requires that you install a Tex/latex version of the platform separately. Some Linux platforms require you to install additional packages to access a specific LaTeX macro package, such as an AMS Tex package used by a publication from American Mathematical Society.

Create and edit documents in LyX

To start LyX, click the LyX menu item or execute the lyx command from the command line, and the first time you start LyX, it will display an introductory document (on the Linux system in/usr/share/lyx/examples/splash.lyx), which provides lyx documentation and LyX links to various parts of the home page. Each time you log on LyX, it displays a general welcome screen that contains the LyX identity and version information.

Create and edit standard LaTeX documents in LyX

To create a new LaTeX document, click File > New. Figure 1 shows the new empty document that is produced:

Figure 1. A new document in the LyX

You can enter text or add structured LaTeX commands. To add a structured LaTeX command:

Click the Format drop-down menu in the upper-left corner, which is just below the File menu.

A list of available structured units appears.

Select the LaTeX tag element that you want to insert.

The selected markup element is inserted into the document and inserted at the current cursor location. The cursor position changes to reflect any formatting associated with the insertion element.

After inserting a LaTeX element, enter the text associated with the element, and then press the return (or Enter) key to end the element's contents. Figure 2 shows a sample document that adds the standard LaTeX elements title, author, section, and some standard text:

Figure 2. Sample document being processed in LyX

See more highlights of this column: http://www.bianceng.cnhttp://www.bianceng.cn/Programming/extra/

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.