Matnlarga ishlov berish LaTex text Formatting


Download 0.75 Mb.
bet3/18
Sana09.04.2023
Hajmi0.75 Mb.
#1344635
1   2   3   4   5   6   7   8   9   ...   18
Bog'liq
Matnlarga ishlov berish

{\fontsize{30pt}{36pt}\selectfont 30pt}
{\Huge Huge}
{\fontsize{15pt}{18pt}\selectfont 15pt}
{\tiny tiny}
{\fontsize{3pt}{3.6pt}\selectfont 3pt}

If you need to use a certain font size again and again, you can also define a new font size command. Following piece of code creates a new font size command called myfontsize.
\newcommand\myfontsize{\fontsize{15pt}{18pt}\selectfont}
Normal size {\myfontsize My font size}

Summary

  • Change the font size of a piece of text using these commands, from the largest to the smallest: \Huge\huge\LARGE\Large\large\normalsize\small\footnotesize\scriptsize, and \tiny.

  • Set the font size of the whole document by adding an option to the \documentclass command. (10pt11pt, and 12pt are available on most classes.)

  • Extsizes package makes more sizes from 8pt to 20pt available for the whole document.

  • Moresize package adds two more size commands: \HUGE and \ssmall.

  • With anyfontsize package, we can set the font size specifically by using \fontsize{size}{baselineskip}\selectfont command.

  1. Changing Font Family

  2. Changing Font Shape

  3. Changing Font Weight

  4. Emphasizing Text

  5. Changing Letter Case

  6. Underline and Strikethrough

  7. Old Style Numbers

Changing Font Family
This font comes with three different font families: serif, which is the default setting, sans serif, and monospaced. A serif is a small line or taper regularly added to the end of a character’s stem, like we see in fonts such as Times New Roman, Garamond, etc. A sans serif font doesn’t have any serif in its characters. Famous examples of sans serif fonts are Helvetica, Futura, etc. Lastly, a monospaced font use the same fixed-width for each of their characters. They are mostly used for source code listings, or well-aligned contents. Courier and Consolas are examples of monospaced fonts.
In LaTeX, serif font families are shortened as rm (for roman font), sans serif font families are shortened as sf, and monospaced font families are shortened as tt (for teletype font family). For instance, we can change the default font family for the whole document by using the command below with \rmdefault for serif font family, \sfdefault for sans serif font family and \ttdefault for monospaced font family:
...
\renewcommand{\familydefault}{<font family>}
...
If we need to use a certain font family only for a part of our document, we can write it in a text command. In a similar fashion to the default font family commands, \textrm is for serif font family, \textsf is for sans serif font family, and \texttt is for monospaced for family. In the following piece of code, we demonstrated the effects of the commands.
\textrm{Serif Font Family}
\textsf{Sans Serif Font Family}
\texttt{Monospaced Font Family}

Instead of commands, we can also use text switches: \rmfamily, \sffamily and \ttfamily for serif, sans serif and monospaced font families, respectively. The same result can be achieved with switches by using the next piece of code.

\rmfamily
Serif Font Family
\sffamily
Sans Serif Font Family
\ttfamily
Monospaced Font Family

Download 0.75 Mb.

Do'stlaringiz bilan baham:
1   2   3   4   5   6   7   8   9   ...   18




Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©fayllar.org 2024
ma'muriyatiga murojaat qiling