Matnlarga ishlov berish LaTex text Formatting


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

Emphasizing Text
Different font shapes and weights are mainly used to emphasize pieces of text. In LaTeX, there is an easy and dynamic command to add emphasis to a word or a phrase: \emph. Basically, it italicizes text when the main text is in upright form. If the main text at the moment is in italics, the command reverts the emphasized part back to the upright form. Here is an example:
...
Upright text, \emph{emphasised \emph{text} within emphasized text}.
...


Changing Letter Case
LaTeX provides the option to change the letter case of a piece of text to lower or upper case: \lowercase and \uppercase are the commands for the job. However, these commands can come up short in some cases. For instance, if there is a variable involved in the scope of a case changing command, it doesn’t change the case of the variables’ content.
\def\txt{text}
\uppercase{\txt}
This piece of code should produce an uppercase word: ‘TEXT’, but it produces ‘text’ instead. Also, these commands don’t work well with letters from other Latin alphabets, such as \ae which prints the letter æ. These problems can be fixed by using \MakeLowercase and \MakeUppercase commands instead. However, it doesn’t take care of all problems. For example, when used for a tabular environment, it changes the case of tabular in \begin{tabular} and \end{tabular} commands and prevents the table from being constructed.
We can use textcase package  to avoid these problems. It creates three new commands: \MakeTextUppercase and \MakeTextLowercase for changing the letter cases, and \NoCaseChange to protect the letter casing when necessary, which helps include LaTeX commands in the scope of case changing commands. This package also works well in math mode, and can handle the arguments of \cite, \label, and \ref commands, which are useful referencing tools.
\usepackage{textcase}
\begin{document}
\def\txt{upper}
\MakeTextUppercase{\txt}
\MakeTextLowercase{LOWER}
\end{document}


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