Special characters in LaTeX

Posted by mmitdnn on Thu, 03 Feb 2022 16:05:27 +0100

Special characters in LaTeX

Blank symbol

(1) Blank lines are segmented, and multiple blank lines are equal to one.

For example, let's write two paragraphs now.

  • No blank line

  • Empty line

  • Multiple blank lines are equal to one blank line (one effect)

(2) Auto indent, never use spaces instead.

(3) Multiple spaces in English are treated as one space, and spaces in Chinese will be ignored.

  • English normal space

  • Multiple spaces in English are equal to one space

  • Chinese spaces will be ignored

(4) The spacing between Chinese characters and other characters is automatically processed by XeLaTeX.

  • Between Chinese characters and English

(5) It is forbidden to use Chinese full angle spaces.

(6) Space input

  • When you need to enter blank characters such as spaces, you can use commands like quad.

  • A quad produces a blank of 1em (equivalent to the width of M in the current font).

  • Similarly, a qquad generates 2em of white space.

  • A command or \ thinspace command produces about 1 / 6 em of white space.

  • The enspace command produces 0.5 em blanks.

  • \The backslash plus space command outputs a space.

  • Use the ~ command to generate a hard space (an indivisible space).

The effect is shown in the figure:

(7) Produces white space of the specified width

  • You can use the kern or hskip commands to generate white space of a specified width.

The width is specified by * * "width value with spaces at both ends" * * of the.

You can also use the hskip command to generate whitespace with the width specified by its parameters.

effect:

  • You can use the hphantom command to generate white space according to the width of the placeholder character generated by the specified parameter.

effect:

(8) Elastic length

Use the hfill command to generate elastic white space (used to fill the whole space).

effect:

Control character

In LaTeX, #, $,% have special meanings.

These are called LaTeX controllers.

In order to output these control characters, we need to add a backslash \ 'before these characters.

Because double backslashes generate line breaks, in text mode, backslashes are generated with the textbackslash command.

effect:

Typesetting symbol

Some special symbols in typesetting can also be generated with corresponding commands.

effect:

TeX symbol

(1) Basic symbols

effect:

(2) Provided by xltxtra macro package

"XeLaTeX" cannot be entered directly, and a compilation error will occur.

There is no command of XeLaTeX!

If we use usepackage to introduce a special macro package.

Then write in the document area:

Compile and run to get the symbol of XeLaTeX.

(3) Provided by textnames macro package

We can also produce other signs of LaTeX.

It is also necessary to introduce macro packages.

Then write in the manuscript area:

Compile and run to view the results:

(4) mflogo macro package provides

It is also necessary to introduce macro packages.

Then write in the manuscript area:

Compile and run to view the results:

Quotation marks

In LaTeX, quotation marks can be divided into single quotation marks, double quotation marks, and left and right quotation marks.

  • A single asterisk ` is an open single quotation mark. (the emphasis sign on the left of number key 1)

  • The single quote character 'indicates a closing single quote.

  • Two consecutive tick marks ` ` indicate the left double quotation mark.

  • Two consecutive single quotation mark characters' 'represent closing double quotation marks.

effect:

Hyphen

Use one, two, and three minus signs to generate three different hyphens: short, medium, and long.

effect:

Non English characters

effect:

stress mark

effect:

Finally, the code is attached for everyone to learn and use:

%Introduction area
\documentclass{article}

\usepackage{ctex} %Chinese processing macro package
\usepackage{xltxtra}
%Provides for XeTeX Improved and added XeTeX of LOGO. 
\usepackage{texnames}
%some LOGO
\usepackage{mflogo}


%Text area (manuscript area)
\begin{document}
    \section{Blank symbol}
    Each of us has its own snow and each has its own month. We are bright and round to each other. I have a butterfly. You have the wind in your arms. It should also dispel the mysterious night.
    
    Teenagers prefer the tottering sunset yellow, but they don't know what they are having at the moment is the brightest dawn in their life.

    I wish you can become better and better!
    
    I hope you can better and better ! Become better!

    % 1em (In the current font M (width of)
    a \quad b

    % 2em 
    a \qquad b

    % About 1/6 individual em
    a \, b 

    a \thinspace b

    % 0.5em
    a \enspace b

    % Space
    a \ b

    % Hard space
    a ~ b

    % 1pc=12pt=4.218mm
    a \kern 1pc b

    a \kern -1em b

    a \hskip 1em b

    a \hspace {35pt} b

    %Space occupying width
    a \hphantom {xyz} b

    %Elastic length
    a \hfill b


    \section{\LaTeX Control character}
    \# \$ \% \{ \} 

    \~{} 

    \_{}

    \^{}

    \textbackslash

    \&



    \section{Typesetting symbol}
    \S

    \P

    \dag
   
    \ddag

    \copyright

    \pounds


    \section{\TeX Symbol}
    % Basic symbols
    \TeX{}

    \LaTeX{}

    \LaTeXe{}

    %xltxtra Macro package provision
    \XeLaTeX

    %texnames Macro package provision
    \AmSTeX{}

    \AmS-\LaTeX{}

    \BibTeX{}

    \LuaTeX{}

    %mflogo Macro package provision
    \METAFONT{}

    \MF{}

    \MP{}


    \section{Quotation marks}
    ` '  `` ''

    \section{Hyphen}
    - -- ---


    \section{Non English characters}
    \oe \OE 
    
    \ae \AE 
    
    \aa \AA
    
    \o \O 
    
    \l \L 
    
    \ss \SS

    !`

    ?`


    \section{Accent (in) o (for example)}
    \`o  \'o  \^o  \''o  \~o  \=o  \.o  \u{o}  \v{o}  \H{o}
    \r{o}  \t{o}  \b{o}  \c{o}  \d{o}
    

\end{document}

Topics: Latex