Latex Study Notes

Source: Internet
Author: User

Basic usage:

  • \ Documentclass [utf8] {ctexart} utf8 can be omitted. Ctexart is an article that supports Chinese characters. If it is changed to Article, Chinese characters are not displayed.
    • \ Title {......}
    • \ Author {ooyyloo}
  • \ Begin {document}
    • \ Maketitle
    • ......
    • \ Section {text}
    • \ [A ^ 2 + B ^ 2 = C ^ 2 \]

  • \ End {document}

 

  Insert code:

  The inserted code must contain the listings macro package, and the xcolor macro package is required for code highlighting.

Add and set the listings and xcolor macro packages in the Introduction area.

\ Usepackage {listings} % insert Code \ usepackage {xcolor} % code highlight \ lstset {numbers = left, % set the row number position numberstyle = \ tiny, % set the row size keywordstyle =\color {blue}, % set the keyword color commentstyle = \ color [CMYK] {,}, % set the annotation color frame = single, % set the border format escapeinside = '', % escape character (the key on the left side of 1), used to display Chinese breaklines, % automatically fold extendedchars = false, % when the Code cross page is resolved, Chapter title, questions about non-display of headers and other Chinese characters xleftmargin = 2em, xrightmargin = 2em, aboveskip = 1em, % set margin tabsize = 4, % set the number of tab spaces showspaces = false % Do Not Display spaces}

 

You can use this when inserting code in the article:

\begin{lstlisting}[language=C]/* helloworld.c */#include <stdio.h>int main(){    printf("Hello World!\n");    return 0;}\end{lstlisting}

(Reference URL: http://blog.thebeyond.name/archives/33)

 

Latex Study Notes

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.