latex font size:Latex study notes-Font Tutorial免费ppt模版下载-道格办公

Latex study notes

Here is a quick start sample code written in LaTeX: ```latex\documentclass{article}\begin{document}Hello, LaTeX!\end{document}``` To compile this sample code, you can choose to use TeX Live + TexStudio or the online editor Overleaf. If you choose to use T

Quick Start

  1. Compiler: TeX Live + TexStudio, Ctex, Online: Overleaf
  2. The first sample code:
\documentclass{article} % Set the document class used by the document% Introduction area\title {my first Latex document}\author{Jclian91}\date{\today}\begin{document}% text area\maketitle hello, Latex!\end{document}
  1. Latex The command starts with \ and is case sensitive
  2. \documentclss command, the following parameters are:
  • \documentclss{article}: Article Format, commonly used technical papers, reports, explanatory documents
  • \documentclss{report}: long report, often used in reviews, long papers, simple books
  • \documentclss {book}: Book, including chapter structure and preface, body, postscript
  • \documentclss{proc}: A simple academic document template based on the article document class< /li>
  • \documentclss{slides}: Slides, using sans serif font
  • \documentclss{minimal}: extremely simple document class, used as a minimal working example for code testing
  • Chinese version, such as ctexrep, Chinese version of report; ctexbook, Chinese version of book; ctexbeamer, Chinese version of beamer, used for slide presentation
  1. Latex parameters can be divided into mandatory parameters ({}), optional parameters ([]), special optional parameters (* ).
  2. Latex source code is divided intoIntroduction and text area:
  • Introduction area: used for Global settings, or use the \usepackage command to call the macro package
  • Text area: between \begin{document} and \end{document}, there can only be one document environment
  1. Comment: single line %; multi-line \iffalse … \fi or call verbatim package, use \begin{comment}…\end{comment}
  2. \section: chapter, \subsection: subsection, \par: subsection

text application

  1. English font settings include: font type, font weight, font shape, font size
  2. font type
  • Roman: \rmfamily or \textrm{…}
  • Sans serif font: \sffamily or \textsf{…}
  • Monospace font: \ttfamily or \texttt{…}
  1. Font weight
    < li data-track="28">normal weight (medium ): \mdseries or \textmd{…}
  • Bold: \cfseries or \textbf{…}
  1. font shape
  • Upright solid: \upshape or \textup{…}
  • Italian italic: \itshape or \textit{…}
  • Italic: \slshape or \textsl{…}
  • < span style="color: #3E3E3E; --tt-darkmode-color: #A3A3A3;">Small caps: \scshape or \textsc{…}
  1. font size
  • \tiny: tiny font size
  • \scriptsize: very small font size
  • \footnotesize : fairly small font size
  • \small: Small font size
  • \normalsize: Normal size font size
  • \large: large font size< /span>
  • \Large: Larger font size
  • \LARGE: very large font size
  • \huge: huge font size
  • \Huge: largest font size

  • Chinese font type:
    • 宋体: \songti
    • Heiti: \heiti
    • Imitation Song: \fangsong
    • Regular script: \kaishu
    1. Chinese bold and italic
    2. < /ol>
      • Bold: \bfseries or \textbf{…}
      • Tilt: \itshape or \textit{…}
      < ol start="8">
    3. Chinese text size and Kerning
    • Font size: \zihao{(Font size: generally numbers)}
    • Word spacing: \ziju{(Chinese character width Multiple of: any floating point value)}
    1. Blank symbol:
    • \quad: an em-length space Spacing, em is a relative length unit, which is equivalent to the font size of the text in the current object
    • \\qquad: two em
    • \,: one-sixth em
    • \thinspace: one-sixth of an em
    • \enspace: half an em
    • < li data-track="64">\kern specify the width (1pc or 3em)
    • \hspace{Specify width, such as 12pt}
    • \hphantom{abc}: generate the space spacing of the character width
    • \hfill: elastic fill
    1. Special symbols must be preceded by \, such as $, &, % , {, }, _, etc.; \\^{} displays ^; \~{} displays ~; \textbackslash displays \, \\ means newline; use \dots or \ldots for ellipsis
    2. Underline: \ Underline or \uline in the ulem macro package (automatic line break); emphasis: \emph, turn the text into italics for emphasis

    style application

    1. Paragraph style: paragraph, line spacing, indent
    • Segmentation: empty line or \par (segment), \ is a manual line break, not a segment, the segment will be automatically indented, and the branch will not be automatically indented
    • Linespacing: \linespread{<factor>}; Blocking in the introduction area will take effect on the entire page; paragraphs will take effect, add { before the paragraph, add } after \par; \selectfont, if there is no scope limit, It will take effect for all following paragraphs
    • Indentation: left indent: \setlength{\leftskip}, right indent: \setlength{\rightskip}, first line indent: \setlength{ \parindent}{<length>}; paragraph indent: \indent, no indent: \noindent
    1. Chapter Style
    • Article: \part{<title>}
    • Chapter: \chapter{< title>}
    • Section: \section{<title>}
    • Subsection: \subsection{<title>}< /span>
    • Subsubsection: \subsubsection{<title>}
    • Paragraph: \paragraph{<title>}
    • sub Paragraph: \subparagraph{<title>}

  • numbering style
    • There are three main parameters for setting the numbering style of articles, chapters, sections, and subsections, namely numbering and name 、number.
    • There are 7 title format parameters
    • There are 8 spacing and indentation setting parameters< /li>
    1. Page settings and column effects
    • < span style="letter-spacing: 1.5px;">Use the geometry macro package to set the page margin, such as\usepackage [left=0.25in,right=2.25in,top=0.5in,bottom=1in]{geometry}
    • Use \twocolumn to achieve a simple column effect, \twocolumn: double column, \ onecolumn: single-column, when switching between single-column and double-column typesetting, a new page will always start. If you need to implement single-column and multi-column mixed typesetting on the same page, you need to call the multicol macro package
    1. Header and Footer< /span>
    • Modify the header and footer style: \pagestyle{page-style}, where the parameter of page-style is: empty (the header and footer are empty), plain (the page number is inserted in the header, and the footer is empty), headings (the header is the chapter title and page number, and the footer is empty), myheadings (the page header is the page number and the content manually formulated by the \markboth and \markright commands, and the footer is empty).
    • Modify the header and footer style: \pagenumbering{<style>}, <style>The default is arabic (Arabic numerals), which can be modified to roman (lowercase Roman numerals ) and Roman (capital Roman numerals).
    • Modify the content in the header and footer:
    \markright{<right-mark>}\markboth{<left-mark>}{<right-mark>}

    You can also use the fancyhdr macro package to modify the content in the header and footer .

    Example Code:

    \usepackage{fancyhdr}\pagestyle{fancy}\fancyfoot[C]{\cfseries\thepage}\fancyhead[R]{\cfseries\leftmark}\renewcommand{\headrulewidth}{0.4pt}\renewcommand {\footrulewidth}{0.1pt}

    Set the middle of the footer to the bold page number; the right side of the header to the bold chapter name, and then draw a horizontal line with a width of 0.4pt in the header Line; draw a horizontal line with a width of 0.1pt in the footer.

    Lists and tables

    1. List
      • Unordered list (when nesting, the first layer of black dots, the second layer -, the third layer *, the fourth layer ·)
      < pre>\beign{itemize} \item ... \item ... ...\end{itemize}
      • < span style="letter-spacing: 1.5px;">Ordered list (when nesting, the first layer of Arabic Numbers, the second layer of lowercase English letters, the third layer of lowercase Roman letters, the fourth layer of uppercase English letters)
      \beign{enumerate} \item ... \item ... ...\end{enumerate}
      • Description list
      < code>\beign{description} \item ... \item ... \end{description}

      The enumitem macro package is used to set the spacing of list items. The list style can be set by code, such as $\ast$ means *.

      1. table-tabulation environment

      Two tabulation environments, array and tabular.

      • array:
      \begin{array}{table position}{column style} \end{array}
      • tabular
      \begin{tabular}{table position}{column style} \end{tabular}\begin{tabular* }{total width of table}{table position}{column style} \end{tabular*}
      1. Table-Settings
      • & separate cells, \\newline, \hline draws a horizontal line between rows
      • Column settings: l (letter l) means left alignment, c Means center alignment, r means right alignment, | means adding a vertical line between lists or columns, p{column width} sets the width of the column, and the text is aligned.
       \begin{tabular}{|l|c|c|c|r|} \hline Name& Chinese& Mathematics& English& Remarks\\ \hline Zhou Ping& 97 & 96 & 95 & Excellent\\ \hline Li Hong& 86 & 89 & 91 & Excellent\\ \hline Zhang Liang& 78 & 75 & 68 & Pass\\ \hline Li Rui& 53 & 59 & 64 & Fail\\ \hline Zhang Ke& 85 & 73 & 68 & Medium\\ \hline \end{tabular}
      • Horizontal cell merge: \multicolumn{< n>}{<column-spec>}{<item>}
      • Vertical cell merge: use multirow macro package, \multirow{<n>}{<width> ;}{<item>}
      • Border thickness: call booktabs macro package, \toprule[<number>], \midrule[<number>], \bottomrule[< number>] Draw horizontal lines of different thickness on the top, middle and bottom of the table
      • Colored table: Call the colortbl macro package to modify the data, text, row, column, and cell in the table Set the color of the foreground, background and border
      \rowcolor[color system]{color name}[left extension][right extension ]\columncolor[color system]{color name}[left extension][right extension]\cellcolor[color system]{color name}[left extension][right extension]
      < p data-track="124">color system There are two kinds of rgb and gray. If it is gray, the color name is numerical; if it is rgb, the color name is red, yellow, etc.

      • Header with slash: diagbox macro package

      Image Apply

      Call the graphicx macro package first.

      1. Load image format: EPS, PDF, PNG, BMP, JPEG.
      2. The folder where the image is loaded: \graphicspath{{myimages/}}, myimages is a file The folder name should be placed in the same location as the Latex program source file, and two curly braces should be added outside the folder name.
      3. Load graphics: \includegraphics{<options>}{<filename>}
      4. Graphic and text mixing: wrapfig macro package, picinpar macro package
      5. Image watermark: eso-pic macro package

      Mathematical formula (core function)

      1. < span style="background-color: #F8F8F8; --tt-darkmode-bgcolor: #191919;">Inline formula: …$, Interline formula: equation environment (the number will be automatically generated, this number can be used\ label command and \ref command to generate cross-references), displaymath environment (not numbered), or surround formulas with '\[formula\]' (not numbered)
      2. In mathematical formula mode: spaces are ignored, to change the spacing, use \quad or \qquad; blank lines or paragraphs are not allowed
      3. Superscript: ^, Subscript: _, Inequality: \ne, \neq, \not=, Ellipsis: \cdots(center ),\dots(down) ,
      4. Greek letters: \ + English name, such as \alpha, \beta, call amssymb or amsmath macro package
      5. fraction: \frac{ Numerator}{denominator}, the fraction will be compressed in the line, if you need to display the normal size fraction in the line, use dfrac{numerator}{denominator}; root formula: \sqrt{…} square root, nth root \sqrt[n ]{…}
      6. Operator: Multiply \times, divide \div, dot multiplication: \cdot, plus and minus sign: \pm or \mp, …
      7. relational symbol: no Equal to, greater than or equal to: \ge, less than or equal to: \le, approximately equal to: \approx, equal to: \equiv, …
      8. Mathematical functions: \sin, \cos, \tan, \log, \lim, \min, \sup, …
      9. Derivation and integral: \sum (accumulation), \prd (multiplication), \int (integration), \iint (double integral), '(derivative ), ...
      10. accent and arrow: vector arrow\vec{r}, left arrow\ leftarrow, right arrow\rightarrow, vector arrow\overrightarrow, …
      11. delimiter: | Equivalent to \vert, [equivalent to \lbrack, up arrow: uparrow, …
      12. Matrix: matrix environment
      13. Multi-line formula: gather environment, equal sign alignment: align Environment, line length formula: multline environment
      14. Theorem: \newtheorem{<theorem environment> ;}{<title>}[<section-level>] or \newtheorem{<theorem environment>}[<counter>]{<title>}, <counter> parameters cannot be combined with <section- Level> parameters are used together. A proof symbol is automatically added at the end of the proof environment.

      References

      1. Use thebibliography environment, each reference starts with the \bibitem command
      2. The emergence of BibTeX frees users from the trouble of handwriting reference entries. BibTeX has a .bib extension, and its content is several reference entries. Each reference The grammar format of a document entry is as follows:
      @<type>{ <citation>, <key1>={<value1>}, <key2> ;={<value2>}, ...}

      Where, is the document Category, is the document label used by the \cite command. After <citation>, it is each field in the entry, organized in the form of <key>={<value>}

      1. Cite references in BibTeX: first use \bibliographystyle{<bst in the introduction area The -name>} command sets the reference style, for example, bst-name can be ieeetr, acm, etc.; finally, at the position where references need to be listed, quote the \bibliography command instead of thebibliography environment. The command syntax is as follows:
      \bibliography{<bib-name>}

      where bib-name is the file name in the BibTeX database.

      1. Citing reference techniques:
      < ul>
    2. Use TexStudio software to insert the search bibliography
    3. Use "Baidu Academic" to cite references
    4. slideshow

      1. documentclass is beamer, Chinese version For ctexbeamer; creating a slideshow requires a frame environment
      2. Slideshow style: call the \usetheme command, For example, \uestheme{AnnArbor} calls the AnnArbor style slideshow
      3. slide content: A slide is one frame; the home page generally displays the title, author, date, etc.; you can use \section, \subsection, etc.; use the \tableofcontents command to generate a table of contents after the slide is divided into sections
      4. Dynamic presentation: \pause, \onslide, \only commands

      Custom command

      1. Custom command:
      \newcommand{\<name>}[<num>]{<definition>}< /code>

      \<name> is the name of the command to be customized, used to set the custom For a new command, the maximum number of required parameters is 9, and the default value is 0, which is the specific definition of the new command. Here's an example:

       \newcommand{\mynew}{I am a custom new command! } \newcommand{\mynewpp}[2]{#1 Favorite programming language is: #2} \mynew \par \mynewpp{Zhang Liang}{Java} \par \mynewpp{Li Hong}{Python} 

      The output result is:

      I am customizing a new command! Zhang Liang's favorite programming language is: Java Li Hong's favorite programming language is: Python 
      1. Renew Command
      \renewcommand{\<name>}[<num>]{<definition>} 

      Modify the existing command, redefining the command modifies the operation of the original command, but Still applies to the environment of the original command.

      1. Customize and redefine the environment
      \newenvironment{<name>}[<num>]{<before>|<after>}

      < span style="letter-spacing: 1.5px;"><name> is the name of the custom environment, <num> is the number of parameters of the new custom environment, <before> is defined before the environment, a required parameter , <after> is defined after the environment, a mandatory parameter.

      Sample code

      1. Sample PDF document

      article example Code:

      \documentclass{ctexart} % Set the document class used by the document% Set the page margin\usepackage[left=1in,right=1in,top=1in,bottom=1in]{geometry}% Set the header page foot \usepackage{fancyhdr}\pagestyle{fancy}\fancyfoot[C]{\cfseries\thepage}\fancyhead[R]{\cfseries\leftmark}\renewcommand{\headrulewidth}{0.4pt}\renewcommand{\footrulewidth}{ 0.1pt}% Introduction area\title{Secondary School Mathematics Formula Handbook}\author{Zhang Kejia}\date{\today}\begin{document}% Text Area\maketitle \newpage \tableofcontents \section{Secondary School Algebraic Formula} \subsection{Ratio Formula} \subsection{Fraction Formula} \subsection{Factorization Formula} \subsection{Formula for the Solution of a System of Equations} \subsection{Determinant Formula} \subsection{Exponent Formula} \subsection{Logarithmic Formula} \newpage \ section{Secondary geometry formula} \subsection{Triangle area formula} \subsection{Quadrilateral area formula} \subsection{Regular polygon area formula} \subsection{Circle formula} \subsection{Cylindrical formula} \subsection{Conic formula} \newpage \section {Plane trigonometric formula} \subsection{Relationship between radians and degrees} \subsection{Definition formula of trigonometric function} \subsection{Trigonometric function formula}\end{document}
      1. Example Slideshow

      Slideshow sample code:

      \documentclass{ctexbeamer} % Set the document class used by the document% Introduction area \usetheme{Goettingen}\usecolortheme{beaver}\title{Exploration of the Pythagorean Theorem}\subtitle{Proof and simplicity of the Pythagorean Theorem Application}\author{Li Hongli, Zhang Kejia}\institute{Qingdao Middle School Classroom}\date{\today}\begin{document}% text area\begin{frame} \maketitle\end{frame}\section{directory} \begin{ frame} \frametitle{Category} \tableofcontents \end{frame} \section{A brief history of the Pythagorean theorem} \subsection{A brief history of the Pythagorean theorem in China} \begin{frame} \end{frame} \subsection{tick A Brief History of the Pythagorean Theorem in Foreign Countries} \begin{frame} \end{frame} \section{Definition of the Pythagorean Theorem} \begin{frame} \end{frame} \section{Proof of the Pythagorean Theorem} \begin{frame } \end{frame} \section{Pythagorean number} \begin{frame} \end{frame} \section{Significance of Pythagorean Theorem} \begin{frame} \end{frame}\end{document}
      1. Reference Sample Code
      2. < /ol>

        Reference sample code:

        \documentclass{ctexart} % set the document class used by the document \begin{document}% text area \begin{thebibliography}{99} \bibitem{myart1} Liu Guojun, Chen Shaoye. Library Catalog[M] . Beijing: Higher Education Press, 1957. \bibitem{myart2} Li Xiaobo, Wang Zheng. Library Catalog[M]. Beijing: Railway Press, 2015. \bibitem{myart3} Zhou Feng, Zhou Junqing. Library Catalog[M] ]. \emph{Beijing: Electronic Industry Press}, 2018. \bibitem{myart4} Gill, R.Mastring English Literatur[M], London: Macmillan, 1985.\end{thebibliography}\end{document}

        BibTex code:

        @book{mybook1, title={Visual Bisc}, authoe={Jack}, year={2005}, month={6}, publisher={Electronics Industry Press}, address={Beijing} }

        References

        1. Learn LaTeX in 30 minutes, https://www.overleaf.com/learn/latex/Learn_LaTeX_in_30_minutes
        2. Zhou Feng, Introduction and Practical Application of LaTeX[B]
        3. Beamer style reference website, Mechanical Industry Press https://mpetroff.net/files/beamer-theme-matrix/

    Articles are uploaded by users and are for non-commercial browsing only. Posted by: Lomu, please indicate the source: https://www.daogebangong.com/en/articles/detail/Latex%20study%20notes.html

    Like (810)
    Reward 支付宝扫一扫 支付宝扫一扫
    single-end

    Related Suggestion