banner



How To Change Color Of Text In Tikz

Colors and fonts

Colored text

Commands that control foreground and groundwork colors need

          \usepackage{color}        

later the \documentclass line just earlier \begin{certificate}.

  • \textcolor{ colorname }{ text } writes text in a colour which can be specified past name (black, white, red, green, blue or a color name y'all've defined), RGB components, or grayscale.
  • \colorbox{ colorname }{ text } writes text in a box with a colored background.
  • \fcolorbox{ framecolor }{ boxcolor }{ text } writes text in a colored frame.
  • \pagecolor{ colorname } sets the colour of the folio's background.
  • \definecolor{ colorname }{ color specification } lets you define new color names.
\definecolor{gold}{rgb}{0.85,.66,0} This is in \textcolor{carmine}{red} and this box is \colorbox{aureate}{gold}. Text color tin can exist prepare using RGB values  (\textcolor[rgb]{0,1,0}{similar so}), or \textcolor[grayness]{0.2}{shades}  \textcolor[gray]{0.5}{of} \textcolor[gray]{0.8}{gray}.        

produces

This is in crimson and this box is golden . Text color tin be set using RGB values (similar so), or shades of grey.

Special characters

\dag is created by \dag, \ddag by \ddag, § past \S, ¶ by \P, £ by \pounds, ö by \"{o}, © by \copyright. Many others are available in the math surround, including all the lower instance greek letters and about of the upper case ones. If you only want to employ a few characters you lot can subclass the symbols using $ and $ rather than \begin{math} and \terminate{math}. Yous can put a slash through any of these characters by prefacing them with \non

$\sqrt{i} $ \sqrt{i} $\sqrt[5]{x+iy} $ \sqrt[5]{ten+iy} $\ldots $ \ldots
$\cdots $ \cdots $\vdots$ \vdots $\ddots$ \ddots
$\alpha$ \blastoff $\beta$ \beta $\gamma$ \gamma
$\delta$ \delta $\omega$ \omega $\Gamma$ \Gamma
$\Theta$ \Theta $\Omega$ \Omega $\pm$ \pm
$\mp$ \mp $\times$ \times $\div$ \div
$\ast$ \ast $\star$ \star $\circ$ \circ
$\bullet$ \bullet $\cdot$ \cdot $\cap$ \cap
$\bigcap$ \bigcap $\cup$ \cup $\bigcup$ \bigcup
$\uplus$ \uplus $\biguplus$ \biguplus $\sqcap$ \sqcap
$\sqcup$ \sqcup $\bigsqcup$ \bigsqcup $\vee$ \vee
$\bigvee$ \bigvee $\wedge$ \wedge $\bigwedge$ \bigwedge
$\setminus$ \setminus $\wr$ \wr $\diamond$ \diamond
$\bigtriangleup$ \bigtriangleup $\bigtriangledown$ \bigtriangledown $\triangleleft$ \triangleleft
$\triangleright$ \triangleright $\oplus$ \oplus
$\bigoplus$ \bigoplus $\ominus$ \ominus $\otimes$ \otimes
$\bigotimes$ \bigotimes $\oslash$ \oslash $\odot$ \odot
$\bigodot$ \bigodot $\bigcirc$ \bigcirc $\amalg$ \amalg
$\leq$ \leq $\prec$ \prec $\preceq$ \preceq
$\ll$ \ll $\subset$ \subset $\subseteq$ \subseteq
$\in$ \in $\vdash$ \vdash
$\geq$ \geq $\succ$ \succ $\succeq$ \succeq
$\gg$ \gg $\supset$ \supset $\supseteq$ \supseteq
$\sqsupseteq$ \sqsupseteq $\ni$ \ni $\dashv$ \dashv
$\equiv$ \equiv $\sim$ \sim $\simeq$ \simeq
$\asymp$ \asymp $\approx$ \approx $\cong$ \cong
$\neq$ \neq $\doteq$ \doteq $\propto$ \propto
$\models$ \models $\perp$ \perp $\mid$ \mid
$\parallel$ \parallel $\bowtie$ \bowtie $\smile$ \smile
$\frown$ \frown $\leftarrow$ \leftarrow $\Leftarrow$ \Leftarrow
$\rightarrow$ \rightarrow $\Rightarrow$ \Rightarrow $\leftrightarrow$ \leftrightarrow
$\Leftrightarrow$ \Leftrightarrow $\mapsto$ \mapsto $\hookleftarrow$ \hookleftarrow
$\leftharpoonup$ \leftharpoonup $\leftharpoondown$ \leftharpoondown $\rightleftharpoons$ \rightleftharpoons
$\longleftarrow$ \longleftarrow $\Longleftarrow$ \Longleftarrow $\longrightarrow$ \longrightarrow
$\Longrightarrow$ \Longrightarrow $\longleftrightarrow$ \longleftrightarrow $\Longleftrightarrow$ \Longleftrightarrow
$\longmapsto$ \longmapsto $\hookrightarrow$ \hookrightarrow $\rightharpoonup$ \rightharpoonup
$\rightharpoondown$ \rightharpoondown $\uparrow$ \uparrow $\Uparrow$ \Uparrow
$\downarrow$ \downarrow $\Downarrow$ \Downarrow $\updownarrow$ \updownarrow
$\nearrow$ \nearrow $\searrow$ \searrow $\swarrow$ \swarrow
$\nwarrow$ \nwarrow $\aleph$ \aleph $\hbar$ \hbar
$\imath$ \imath $\jmath$ \jmath $\ell$ \ell
$\wp$ \wp $\Re$ \Re $\Im$ \Im
$\prime$ \prime $\empty$ \empty $\nabla$ \nabla
$\surd$ \surd $\top$ \top $\bot$ \bot
$\Vert$ \| $\angle$ \angle $\forall$ \forall
$\exists$ \exists $\neg$ \neg $\flat$ \apartment
$\natural$ \natural $\sharp$ \sharp $\backslash$ \backslash
$\partial$ \fractional $\infty$ \infty $\triangle$ \triangle
$\clubsuit$ \clubsuit $\diamondsuit$ \diamondsuit $\heartsuit$ \heartsuit
$\spadesuit$ \spadesuit $\sum$ \sum $\prod$ \prod
$\coprod$ \coprod $\int$ \int $\oint$ \oint

Font Sizes

These are the available sizes.

tiny scriptsize footnotesize small normalsize
large Large Big huge Huge

If, for instance, you lot want to use the smallest size, do

{\tiny ... }        

If Huge isn't big enough for you, you tin can scale a postscript font up using the commands in the graphicx parcel. \resizebox{!}{5cm}{BIG} produces

\resizebox{!}{5cm}{BIG}

Font Types

Independent of size, these font types are at your disposal :- \textrm (roman), textit (italic), \textsc (Small CAPS), \emph (emphasis, but note that if you employ emph within emphasized text, y'all will get roman text), \textsl (slanting), \texttt (teletype), \textbf (boldface), \textsf (sans serif). As long as there'south no disharmonize, these commands can be combined so that, for instance, this is assuming sans serif tin can be produced by \textsf{\textbf{this is bold sans serif}}.

Postscript Fonts

It is easy to write a document that has postscript fonts. We have package support for helvetica (helvetic), utopia, times, optima, newcentury (newcentu), palatino and courier. To apply palatino, for instance, all y'all demand to exercise is add together

\usepackage{palatino}        

to your file. The pifont package has special commands for using the Zapf Dingbats font. \dingfill{40} completes the line with the specified symbol and \dingline{36} draws a whole line of symbols.

It's a expert thought to apply a font that's installed in the printer you intend to use.

Font attributes

The commands above should requite y'all sufficient control over fonts. If you don't want to know more at the moment then turn to section 4

Every text font in L A TEX has 5 attributes:

encoding
This specifies the guild that characters appear in the font. The well-nigh common values for the font encoding is OT1.
family
The proper name for a collection of fonts, usually grouped under a common name by the font foundry. For example, `Adobe Times' and Knuth'southward `Figurer Mod Roman' are font families. In that location are far too many font families to list them all, simply some common ones are:
Internal fontname Fontname In ljmr1?
cmr Figurer Mod Roman No
cmss Computer Modernistic Sans No
cmtt Reckoner Modern Typewriter No
cmm Computer Modern Math Italic No
cmsy Computer Modern Math Symbols No
cmex Reckoner Modern Math Extensions No
ptm Adobe Times Yep
phv Adobe Helvetica Yes
pcr Adobe Courier Yes
pun Univers No
ppl Palatino Yes
pagk AvantGarde-Book Yes
pagd AvantGarde-Demi Yeah
pbk Bookman Aye
put Utopia No
popular Optima No
pnc New Century Schoolbook Yeah
pzd ZapfDingbats Yes
rpad Garamond No
series
How heavy or expanded a font is. For example, `medium weight', `narrow' and `bold extended' are all series. The about common values for the font series are:

chiliad Medium
b Assuming
bx Assuming extended
sb Semi-bold
c Condensed
shape
The form of the letters within a font family unit. For example, `italic', `oblique' and `upright' are all font shapes. The most mutual values for the font shape are:

n Normal (that is `upright' or `roman')
it Italic
sl Slanted (or `oblique')
sc Caps and small caps
size
The blueprint size of the font, for example `10pt'.

These v parameters specify every L A TDue eastX font, for case:

Font
OT1 cmr m n 10pt Computer Modern Roman 10pt
OT1 cmss thousand sl 12pt Calculator Modern Sans Oblique 12pt
OML cmm m it 10pt Computer Modern Math Italic 10pt
T1 ptm b information technology 18pt Adobe Times Bold Italic 18pt

Selection commands

In that location are commands to fix attributes one at a time:

Command Attribute Value in article grade, 10pt
\textrm{..} or \rmfamily family unit cmr
\textsf{..} or \sffamily family cmss
\texttt{..} or \ttfamily family cmtt
\textmd{..} or \mdseries serial chiliad
\textbf{..} or \bfseries series bx
\textup{..} or \upshape shape n
\textit{..} or \itshape shape it
\textsl{..} or \slshape shape sl
\textsc{..} or \scshape shape sc
\tiny size 5pt
\scriptsize size 7pt
\footnotesize size 8pt
\small size 9pt
\normalsize size 10pt
\large size 12pt
\Big size 14.4pt
\LARGE size 17.28pt
\huge size twenty.74pt
\Huge size 24.88pt

The depression-level commands used to modify font attributes are equally follows.

\fontencoding{ encoding }
\fontfamily{ family unit }
\fontseries{ series }
\fontshape{ shape }
\fontsize{ size }{ baselineskip }

Each of these commands sets ane of the font attributes; \fontsize too sets \baselineskip. The actual font in use is non altered by these commands, merely the current attributes are used to make up one's mind which font to use after the next \selectfont command.

\selectfont selects a text font, based on the current values of the font attributes. In that location must be a \selectfont command immediately after any settings of the font parameters by (some of) the five \font<parameter> commands, before whatsoever post-obit text. For example, it is legal to say:

          \fontfamily{ptm}\fontseries{b}\selectfont Some text.        

to select bold Times Roman, but it is not legal to say:

          \fontfamily{ptm} Some \fontseries{b}\selectfont text.        

\usefont{ encoding }{ family }{ series }{ shape }

is short paw for the equivalent \font... commands followed by\selectfont.

Source: http://www-h.eng.cam.ac.uk/help/tpl/textprocessing/latex_advanced/colorandfonts.html

Posted by: holderbray1962.blogspot.com

0 Response to "How To Change Color Of Text In Tikz"

Post a Comment

Iklan Atas Artikel

Iklan Tengah Artikel 1

Iklan Tengah Artikel 2

Iklan Bawah Artikel