LaTeX/Yazıtipleri


Yazıtipi aileleri değiştir

Yüzlerce - binlerce değilse - harf tipi, ya da yazıtipi aileleri bulunmaktadır. Yaygın örnekleri Times, Courier ve Helvetica olarak söyleyebiliriz. Bu aileler genelde üç ana kategoriye ayrılırlar: serif, sans serif, ve monospaced. LaTeX komutları genellikle bunları stenografik olarak rm, sf, ve tt diye ima eder.

Normalde, LaTeX Donald Knuth tarafından TeX içinde kullanmak için yazılan harf tipleri ailesi Computer Modern'i kullanır. Kendisi birçok güçlükte ve optikal büyüklükte serif, sans serif, ve monospaced yazıtipleri içerir.

LaTeX dökümanlarının gövdeleri normalde Roman (serif) tipinde olur, ancak bu ayarlardan değiştirilebilir:

\\renewcommand{\familydefault}{<family>

<family> yerini şunlar takip eder:

  • \rmdefault
  • \sfdefault
  • \ttdefault

Yazıyı vurgulamak değiştir

Bir anlatım tarzına veya bir kelimeye vurgu yapmak istediğiniz zaman, metni italik yapabilen \emph{text} komutunu kullanın. İtalikler \textit{text} komutu ile belirlenmiş aralıklara sahip olabilir.

\I want to \emph{emphasize} a word.
Sonuç: I want to emphasize a word.

\emph komutunun dinamik olduğunu not edin: eğer zaten vurgulanmış bir kelimeyi yine vurgularsan, o kelime eski haline geri dönecektir.

\emph{In this emphasized sentence, there is an emphasized \emph{word} which looks upright.}
Sonuç: In this emphasized sentence, there is an emphasized word which looks upright.

Yazı kalın yazıların kullanımına göre ağır bir şekilde vurgulanacaktır, özellikle anahtar kelimeler için okuyucu yazıyı okur iken bulmaya çalışacaktır. Kalın yazı genelde herhangi bir yazıdan ve hatta sayfadan bile daha önce okunur ki, kendisi tutumlu bir şekilde kullanılmalıdır. Ayrıca sans-serif harf tipleri için vurgulanmamış bir yazıya daha iyi bir kontrast sağlamak için italiklerin yerinde de kullanılır. Kalın yazı \textbf{text} komutu ile yaratılabilir.

\textbf{Bold text} may be used to heavily emphasize very important words or phrases.
Sonuç: Bold text may be used to heavily emphasize very important words or phrases.

UYARI: Paragraflarınızda vurgulamayı aşırı kullanmayın. Vurgulama yazılar içindeki anahtar kelimelerde ya da diğer önemli konseptlerde kullanılmalıdır, ve kalın yazının az kullanılması tavsiye edilir.[1]

Yazıtipi tarzları değiştir

Harf tipleri genelde farklı varyantlarda ve ağırlıkta gelir, italik ve kalın gibi. Aşağıdaki liste diğer yazıtiplerini açmanız için gereken komutları gösterir.

Not: Paragraf kırılmaları komut forumlarında izinli değildir.

LaTeX komutu Eşdeğer Çıkış tarzı Notlar
\textnormal{...} {\normalfont ...} document font family Bu standart ya da normal yazıtipi.
\emph{...} {\em ...} emphasis Sıklıkla italik. emph{} komutunu italik bir yazının içinde kullanmak kullanılan yazının italikliğini kaldırır.
\textrm{...} {\rmfamily ...} roman font family
\textsf{...} {\sffamily ...} sans serif font family
\texttt{...} {\ttfamily ...} teletypefont family Bu fixed-width ya da monospace bir yazıtipi.
\textup{...} {\upshape ...} upright shape Normal harf tipi le aynı.
\textit{...} {\itshape ...} italic shape
\textsl{...} {\slshape ...} slanted shape Normal harf tipinin yamuk hali.
\textsc{...} {\scshape ...} Small Capitals
\uppercase{...} uppercase (all caps) Ayrıca \lowercase.
\textbf{...} {\bfseries ...} bold
\textmd{...} {\mdseries ...} medium weight Normal yazıtipi boyutu.
\textlf{...} {\lfseries ...} light Normal yazıtipinden daha az kalın bir yazıtipi. Tüm harf tipleri tarafından desteklenmez.

Generally, one should prefer the commands over their equivalent switches because the former automatically corrects spacing immediately following the end of the selected style.

You may have noticed the absence of underline - this is because underlining is a byproduct of the typewriter era, and is not recommended when bold and italic type is available instead.[2] However, underlining can be useful in some cases, such as to draw attention to changes during editing. Although underlining is available via the \underline{...} command, text underlined in this way will not break properly. Instead, use the \ul{...} command from the Şablon:LaTeX/Package package or \uline{...} command from the Şablon:LaTeX/Package (underline emphasis) package. By default, the latter package also overrides \emph to underline instead of italicize the text. In the likely case that this is not your intent, use the normalem option, i.e. \usepackage[normalem]{ulem}. Both packages also provide strikethrough text with \st{...} or \sout{...}, respectively.

Yazının boyutunu ayarlamak değiştir

Hazır boyutlar değiştir

Bir yazıyı büyütmek ya da küçültmek için şu komutları kullanın:

Komut Çıkış
\tiny sample text
\scriptsize sample text
\footnotesize sample text
\small sample text
\normalsize sample text
\large sample text
\Large sample text
\LARGE sample text
\huge sample text
\Huge sample text

Bu komutlar boyutu belirli bir değer ile değiştirirler. Örnek olarak {\Large some words} sadece some words kelimesinin boyutunu değiştirir, ve döküman içindeki yazıtipine etki etmez. Yazının çoğu kısmında bu çalışır.

{\Large\tableofcontents}

Bu komutlar matematik modunda kullanılamaz. Yine de, formülün boyutu \mbox komutu ile ayarlanabilir. Yeni boyut boyut komutundan sonra efekti hemen alır; eğer tüm paragraf ya da birim kesin bir boyuta ayarlanırsa, boyut komutu mutlaka boş bir çizgi veya birimi sınırlayan \end{...} komutuna sahip olur.

Standart olarak, \normalsize 10 points olmaktadır, ama bu \documentclass beyannamesi ile ile değiştirilebilir, örneğin \documentclass[12pt]{article}. Her dökümanın her boyut komutları için farklı boyutlara sahip olduğunu not edin.


Tam Nokta Boyutları
Boyut normal sınıflar (slides hariç), projektör AMS sınıfları, anı slides
[10pt] [11pt] [12pt] [10pt] [11pt] [12pt]
\tiny 5 6 6 6 7 8 13.82
\scriptsize 7 8 8 7 8 9 16.59
\footnotesize 8 9 10 8 9 10 16.59
\small 9 10 10.95 9 10 10.95 16.59
\normalsize 10 10.95 12 10 10.95 12 19.907
\large 12 12 14.4 10.95 12 14.4 23.89
\Large 14.4 14.4 17.28 12 14.4 17.28 28.66
\LARGE 17.28 17.28 20.74 14.4 17.28 20.74 34.4
\huge 20.74 20.74 24.88 17.28 20.74 24.88 41.28
\Huge 24.88 24.88 24.88 20.74 24.88 24.88 41.28

TeX içinde noktalar 1 noktanın takriben 0.35136 mm olduğu standart Amerikan nokta sistemi ile aynıdır. Normal nokta boyutu en modern bilgisayar programlarında (desktop publishing point ya da PostScript point olarak bilinen) 1 nokta takriben 0.3527 mm ile eşit iken normal Avrupa nokta boyutu (Didot point olarak da bilinir) içinde 1 nokta takriben 0.37597151 mm ile eşittir (bakınız: nokta (baskısı)).

Keyfi boyutlar değiştir

The \tiny...\Huge commands are often enough for your needs, but you may occasionally want an arbitrary font size. This is done with \fontsize{<size>}{<line space>}\selectfont. For example: Şablon:LaTeX/Usage sets the current font size to 5cm with 5.5 centimeter leading.

If you are using the latex or pdflatex engines, you may get a warning similar to the following:

LaTeX Font Warning: Font shape `OT1/cmr/m/n' in size <142.26378> not available
(Font)              size <24.88> substituted on input line 103.

This is because these older engines only support a fixed set of sizes - between 5 and 17 point. When he designed Computer Modern, Knuth created individual font files for these sizes, each with stroke widths and spacing optimized for that particular size. To avoid distorting them, scaling these fonts is disabled by default.

This issue is avoided when using lualatex or xelatex, which use Latin Modern - a vectorized version of Computer Modern - as the default font family. This still provides individual files at each of the original optical sizes, but will automatically scale the closest one when asked for an arbitrary size.

Alternatif yazıtiplerini kullanmak değiştir

When TeX was originally designed in the late 1970s, vector-based fonts didn't exist in any common format - PostScript wouldn't be released until 1982. Consequently, TeX was designed to use its own font system, METAFONT. Over time, TeX (and LaTeX) were extended to support PostScript fonts, and modern LaTeX engines also support the TrueType (TTF) and OpenType (OTF) fonts found on modern systems.

TTF ve OTF yazıtiplerini kullanmak değiştir

If you are using lualatex or xelatex, you can use TTF and OTF fonts with the Şablon:LaTeX/Package package:

Şablon:LaTeX/Usage

The [Ligatures=TeX] option allows you to use the standard TeX ligatures mentioned in the Text Formatting chapter instead of Unicode characters that are unlikely to be on your keyboard. For example, --- can be used to create em dashes (—), quotes can be typed ``like this'' instead of “like this”, and so on.

The Şablon:LaTeX/Package package is extremely configurable. See the manual[3] for details, but some basics are covered below.

Yazıtipi dosyalarını seçmek değiştir

Different weights and styles of a given typeface are usually stored as separate font files. A typical typeface might offer four files to represent its normal weight, italics, bold, and bold italics. Given a typefaces's name, Şablon:LaTeX/Package can generally deduce the names of the individual files. However, many typefaces come in more than two weights—some versions of Futura, for example, comes in light, book, medium, demi, bold, and extra bold weights. Sometimes small caps are stored as separate files as well.

We might want to hand-pick weights to achieve a certain look or better match the weights of other fonts in our document. Continuing to use Futura as an example, say we want to use the "book" weight for our default weight, "demi" for bold, and the font files are named:

  • Futura-Boo for upright book weight
  • Futura-BooObl for oblique book weight
  • FuturaSC-Boo for small caps, book weight
  • Futura-Dem for upright demi(bold)
  • Futura-DemObl for oblique demibold

Our font setup might resemble: Şablon:LaTeX/Usage

Note that instead of typing out Futura-Boo, Futura-BooObl, and so on, we can use * to insert the base name.

Yazıtipi özelliklerini kontrol etmek değiştir

The OpenType (OTF) format allows type designers to embed font features that can be turned on and off, such as:

  • Alternate versions of glyphs
  • Lining and "oldstyle" figures, each with tabular and proportional spacing[4]
  • Up to three sets of ligatures: standard, contextual, and historical
  • Superscript and subscript glyphs
  • Small caps (in the same file as the standard upper and lowercase characters)

All of these features can be turned on and off using different Şablon:LaTeX/Package options. If we wanted to set our body text in Linux Libertine with oldstyle, proportionally-spaced figures, for example, we might set up our fonts as follows: Şablon:LaTeX/Usage

Features can be turned on and off using \addfontfeatures{...}. Say you wanted to set a table in lining, tabular figures: Şablon:LaTeX/Usage

latex ve pdflatex içinde yazıtiplerinin değiştirmek değiştir

If you are not using one of the Unicode-aware engines, font selection is more complicated. (See the discussion of encoding below.) Useful resources for latex and pdflatex font configuration include:

Yazıtipi kodaçımı değiştir

Digitising human language is a complicated topic that has evolved significantly since TeX's inception.

Unicode değiştir

Today, text is usually represented in computer systems using Unicode. Briefly,

  • A Unicode text file is made of a series of code points, each of which can represent a character to be drawn, an accent or other diacritical mark to combine with an adjacent character, or some non-printing character, such as instruction to print subsequent text right-to-left.
  • One or more of these code points combines to represent a grapheme cluster or glyph, the shapes within a font that we informally call "characters".
  • Modern font formats such as TrueType and OpenType contain encoding tables which map code points to the glyphs the font file contains.

LuaLaTeX and XeLaTeX use these tools to render Unicode-encoded input files (LuaLaTeX accepts UTF-8 files, while XeLaTeX is a bit more flexible and also accepts UTF-16 and UTF-32) into PDF documents.

TeX kodaçımları değiştir

The original TeX and LaTeX, designed long before the advent of Unicode, use a very different scheme. When using latex or pdflatex, you must choose an input encoding, which the engine uses to interpret your file, and an output encoding, which the engine uses to map your inputs to glyphs. The default font encoding is OT1, the encoding of the original Computer Modern fonts. It contains only 128 characters, many from ASCII, but leaving out some others and including a number that are not in ASCII. When accented characters are required, TeX creates them by combining a normal character with an accent. While the resulting output looks correct, this approach has some caveats compared to Unicode-based approaches:

  • It prevents automatic hyphenation from working inside words containing accented characters.
  • Searches for words with accents in PDFs will fail.
  • Extracting (e.g., via copy-paste) the umlaut 'Ä' via a PDF viewer actually extracts the two characters '"A'.
  • Some Latin letters cannot be created with this approach, to say nothing about letters of non-Latin alphabets such as Greek or Cyrillic.

To overcome these shortcomings, several other 8-bit output encodings were created. Extended Cork (EC) fonts in T1 encoding contains letters and punctuation characters for most European languages that use Latin alphabets. The LH font set contains letters necessary to typeset documents in languages using Cyrillic script. Because of the large number of Cyrillic glyphs, they are arranged into four font encodings—T2A, T2B, T2C, and X2. The CB bundle contains fonts in LGR encoding for the composition of Greek text. By using these fonts you can improve/enable hyphenation in non-English documents. Another advantage of using new CM-like fonts is that they provide fonts of CM families in all weights, shapes, and optically scaled font sizes.

All this is not possible with OT1; that's why you may want to change the font encoding of your document.

Note that different fonts support different output encodings. The default Computer Modern font does not support T1, for example. You will need Computer Modern Super (Şablon:LaTeX/Package) or Latin Modern (Şablon:LaTeX/Package), which are Computer Modern-like fonts with T1 support. If you have none of these, it is quite frequent (depends on your TeX installation) that tex chooses a Type3 font such as the Type3 EC, which is a bitmap font. Bitmap fonts look rather ugly when zoomed or printed.

Şablon:Warning

The Şablon:LaTeX/Package package tells LaTeX what font encoding to use. Font encoding is set with: Şablon:LaTeX/Usage where Şablon:LaTeX/Parameter is the font encoding. It is possible to load several encodings simultaneously.

There is nothing to change in your document to use CM Super fonts (assuming they are installed), they will get loaded automatically if you use T1 encoding. For lmodern, you will need to load the package after the T1 encoding has been set:

Şablon:LaTeX/Usage

The package Şablon:LaTeX/Package (almost European) is obsolete. It provided some workarounds for hyphenation of words with special characters. These are not necessary any more with fonts like lmodern. Using the ae package leads to text encoding problems in PDF files generated via pdflatex (e.g. text extraction and searching), besides typographic issues.

PDF yazıtipleri ve özellikleri değiştir

PDF dökümanları gömülü yazıtipi dosyalarına sahiptir. Bu yazıtipleri taşınabilirdir, aynı isminden de anlaşılacağı gibi: Portable Document Format.

Çoğu PDF okuyucuları Özellikler adında gömülü yazıtiplerini ve döküman metadata'sını listeleyen niteliğine sahiptir.

Çoğu Unix Sistemi PDF metadata'sını gösteren pdfinfo niteliğine, ve gömülü yazıtiplerini listeleyen pdffonts niteliğine sahip poppler aracını kullanmaktadır.


Previous: Biçimlendirme İçerik İleri: Sayfa Yerleşimi


Kaynakça değiştir

  1. Matthew Butterick. "Bold or italic". Practical Typography. https://practicaltypography.com/bold-or-italic.html. 
  2. Matthew Butterick. "Underlining". Practical Typography. https://practicaltypography.com/underlining.html. 
  3. http://mirrors.ctan.org/macros/latex/contrib/fontspec/fontspec.pdf
  4. Matthew Butterick. "Alternate figures". Practical Typography. https://practicaltypography.com/alternate-figures.html.