[Latex layout] latex paper Layout & lt; 3 & gt;

Source: Internet
Author: User

A picture is worth a thousand words ). The importance of graphs in this paper is self-evident. This article mainly describes how to create and insert graphs.

1. Insert images into two categories: Bitmap and vector graph. Bitmap: That is, a dot matrix graph uses a small pixel block to form a grid to represent an image. Each pixel has its own specific position and color value. The number of pixels in an image remains the same. When you zoom in or out, only the pixel size is changed. As a result, the image is distorted when it is scaled in or out. Bitmap can also be divided into lossless compression and lossy compression. In this example, Tiff, PNG, and GIF are lossless and jpg are lossy. Vector graph: A graph composed of line segments and curves defined by mathematical formulas. These line segments and curves are called vectors. The vector graph has nothing to do with the resolution, so the image will not be distorted during scaling. Because an image is saved in a mathematical formula, the size of the vector image is smaller than that of the watermark image. However, computer monitors can only display images in a grid. Therefore, bitmap and vector map display images in pixels. Advantage and disadvantage Ratio: A Bitmap occupies a large amount of storage space, and the display speed of a vector image is slower than that of a bitmap, because it has a vector computing process.
To insert an image into the thesis, add \ usepackage {graphicx} to the introduction area (before the \ begin {document} command) to import the illustration macro package. The following is the most frequently used illustration command template:
\ Vspace {-0.8 cm} % is used to adjust the interval between \ begin {figure} [H] %. h in brackets will keep your graph at the position you insert, otherwise, it is inserted at the top of the page by default. Note: you must add \ usepackage {float} \ begin {Center} % in the introduction area. Here, the picture is center aligned \ your degraphics [scale = 0.8] {pic12.eps} % scale to scale the image., this is reduced to 0.8 times the original one. The name \ setlength \ abovecaptionskip {-1 cm} % of the image file to be inserted is in braces to adjust the distance before and after the title, so that you can set it as needed. \ Setlength \ belowcaptionskip {-1 cm} \ caption {cognitive ring \ label {pic12 }%here is the title of the image, and pic12 is the label of the image, when referencing this image, \ end {Center} \ end {figure} \ vspace {-0.8 cm} % must be used to adjust the interval

The following is an example:The source file is as follows:
\ Documentclass [a4paper, 12pt] {book} % using the book type (this type is generally used in the middle paper), A4 paper, with a font of 12 lbs, mo thinks 10 lbs \ usepackage {ctexcap} % alias uses the Chinese title macro package (the title is Chinese) \ usepackage {graphicx }%\ usepackage {ctex} % used a Chinese Macro package (the title is in English) and ctexcap cannot be the same. When \ usepackage {float} % is used, the image is suspended, instead of using \ usepackage {comment} % at the top of the page by default to use the macro package \ begin {document} required by the staring environment, mitola considers Software Defined Radio (SDR) cognitive Radio is an ideal platform for realizing Cognitive Radio. Cognitive Radio is an intelligent extension of SDR. Dr. mitola believes that Cognitive Radio is an intelligent wireless communication system that can perceive the surrounding communication environment, learn the changes in the surrounding environment, and adapt to internal communication planning to adapt to changes in the external environment, improves communication stability and spectrum utilization. To achieve good interaction between Cognitive Radio and the external environment, Dr. Joseph mitola III proposed the concept of cognitive ring, as shown in \ ref {pic12, \ vspace {-0.1 cm} % is used to adjust the interval between \ begin {figure} [H] %. h in brackets will keep your graph at the position you insert, otherwise, it is inserted at the top of the page by default. Note: you must add \ usepackage {float} \ begin {Center} % in the introduction area. Here, the picture is center aligned \ your degraphics [scale = 0.8] {pic12.eps} % scale to scale the image., this is reduced to 0.8 times the original one. The name \ setlength \ abovecaptionskip {-0.2 cm }%of the image file to be inserted is in braces to adjust the distance before and after the title, so that you can set it as needed. \ Setlength \ belowcaptionskip {-4 cm} \ caption {cognitive ring \ label {pic12 }%here is the title of the image, and pic12 is the label of the image, when referencing this image, \ end {Center} \ end {figure} \ vspace {-0.8 cm} % must be used to adjust the interval between the image and the following in Figure \ ref {pic12, external incentives enter the Cognitive Radio System in the form of interference and are allocated to the cognitive ring for response. The Cognitive Radio System cyclically goes through five states: observation, positioning, planning, decision, and operation. Each State involves artificial intelligence learning. \ End {document}

The result is as follows:


Note:In the preceding example, the image file pic21.eps is in the same folder as the source file. However, you may need to insert a large number of images into a thesis. Therefore, it is necessary to create a folder to place images separately. In my thesis, I used the figs folder to save the simulation map generated by MATLAB, and used the pics folder to save the schematic diagram and flowchart drawn by visio. At this time, because the image is not in the same folder as the source file, an error occurs when inserting the image. We can write \ graphicspath {pics/}, {figs /}}( Note:: Here, the pics and figs folders are in the same folder as the source files. Otherwise, you need to write absolute paths) to specify the folder for storing images.
As shown in the preceding example, There is a colon in the title, which is not what we expectIn the introduction area, we can add \ usepackage {caption} And \ captionsetup {labelsep = space} to specify the format of the image title:

2. The above section mainly describes how to insert existing images into latex and how to make good-looking images. 1. Schematic diagram and flowchart drawn by VisioIt is good to use Microsoft's Visio to draw the principle diagram and flowchart, because it can be inserted into word and PPT. Detailed steps are as follows:1) Draw the image you need in Visio. 2) create a Word file, copy and paste the image in Visio to word, and save it as a PDF file. 3) Open the generated PDF file with Adobe Acrobat Pro, click the "document" menu, select "Crop page", and select "delete white margin.
4) Save the obtained file as an EPS file. Note:: If the image is a bitmap directly, the image will be distorted after being enlarged. You need to use Adobe Acrobat Pro to change the PDF file, so it is better to use the software, I think it is much better than Adobe Reader. Most of the generated PDF pages are blank, so we need to crop them. For simplicity, we can select the "delete margin" mentioned above ", of course, you can also manually adjust the distance between the upper and lower sides. Insert formulas or letters in Visio: click "insert button" and select "object". There are various types including mathtype.
2. Simulation diagram obtained by MATLABBecause all my complete settings are simulated using Matlab, we will only talk about how to use MATLAB to generate the vector graph EPS file we need. Most people directly use software to simulate graphs. Of course, this saves a lot of trouble, but as mentioned earlier, the resulting images are bitmap, which will be distorted when the image is enlarged. Some people will be surprised to find out that the "Save As EPS file" option in MATLAB is available. However, when your image contains Chinese characters, garbled characters will appear! The simulation example is as follows:

If you save the image as a PDF file or an EPS file, the following figure is displayed:


As shown in the preceding figure, although a vector graph is obtained, Chinese characters are garbled and the image is not clear. The solution is as follows:1. If Chinese characters are garbled, you can use the print button in the upper-left corner of the simulation image to print it in pdf format. Then, follow the previous steps to obtain the EPS file. 2. The generated image is not clear. You can add the following section at the end of the simulation statement:
% The following operations are performed for beautiful pictures % set (get (GCA, 'xlabel'), 'fontsize', 16, 'fontweight ', 'bold'); % set (get (GCA, 'ylabel'), 'fontsize', 16, 'fontweight ', 'bold'); % set (get (GCA, 'title'), 'fontsize', 16, 'fontweight ', 'bold'); Set (GCA, 'fontsize', 16, 'fontweight ', 'bold '); % set the size of the coordinate axis Number (GCA, 'linewidth', 1.5); % coordinate line rough 1.5 LB set (GCA, 'box', 'on '); % controls the box around the ploadareaset (get (GCA, 'Children '), 'linewidth', 2); % set the line width of a 1 lb set (GCF, 'color ', 'W ')
The following figure shows the improved simulation:


It seems that the lines are thicker than the limit, but after printing it, it is considered very beautiful. The printed PDF or EPS images are as follows:


By comparison, we can see who is better and who is worse. We assume that the image is larger than the image size and can be scaled. We will show you how to scale down the image in the previous section. Because it is a vector image, scaling will not be distorted! However, after the paper is printed, it cannot be seen whether it is a vector image, but it can be clearly identified through the PDF electronic version.




[Latex layout] latex paper Layout & lt; 3 & gt;

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.