Prehlásky v LaTeXe - ako to funguje
Do LaTeXu nemôžete písať prehlášky tak ľahko, ako si rýchlo všimnete pri písaní nemeckého textu. Tento praktický tip vám ukáže, ako sú prehlásky ako také zobrazené aj po kompilácii.
V prehliadači LaTeX používajte prehlásky nepriamo
Ak do LaTeXu zadáte prehlášky nepriamo, môžete dokument ľahko upravovať v rôznych operačných systémoch. Na to nepotrebujete žiadne balíčky. V tomto texte je vždy tvorené malé písmeno „ö“. Analogicky môžete vytvárať ďalšie prehlásky. Napríklad pre veľké písmeno „Ä“ nahraďte písmeno „o“ znakom „A“.
- "Ö" vytvoríte nepriamo pomocou \ "o (spätné lomítko, úvodzovky, o).
- Ak to nefunguje, vložte predchádzajúci variant do zložených zátvoriek: {\ "o}.
- Ak ste zahrnuli balík „nemecký“ alebo balík „nemecký“, môžete tiež vytvoriť malé ö s „o (úvodzovky).
Zahrňte prehlášky do balíka inputenc do LaTeXu
Ak zadáte balík inputenc, môžete prehlášky zadať priamo v dokumente a nemusíte ich prepisovať kódom. Pretože rôzne operačné systémy používajú rôzne kódovania, potrebujete tu rôzne príkazy LaTeX, ktoré skopírujete pred \ begin {document}.
- V systéme Windows zvyčajne používate kódovanie „ansinew“. Zodpovedajúci kód je potom: \ usepackage [ansinew] {inputenc}.
- Bežne sa používa Linuxové „latin1“ kódovanie. Kód, ktorý by ste mali vložiť pred \ begin {document}, je: \ usepackage [latin1] {inputenc}.
- Kódovanie „AppleMac“ by sa malo používať na vašom počítači Mac. Potom musíte skopírovať kód \ usepackage [applemac] {inputenc} pred \ begin {document}.
- Ak príslušné kódovanie nefunguje alebo ak chcete použiť svoj LaTeX dokument na rôznych systémoch, mali by ste vyskúšať UTF-8. Toto kódovanie integrujete s kódom \ usepackage [utf8] {inputenc}. Uistite sa však, že váš dokument LaTeX je potom skutočne kódovaný v UTF-8.
Prehlásky v matematických prostrediach
Mali by ste mať tiež problémy s prehláškami v prostredí matematiky LaTeX. S jednoduchým trikom je však možné ich vylúčiť aj zo sveta.
- Príkazom \ textrm {požadovaný text} už nie sú dôvodom prehlášky v bežnom matematickom prostredí.
- Použite balíček "amsmath", vložte požadovaný text medzi zložené zátvorky príkazu \ text {požadovaný text}.
V oblasti sťahovania nájdete Texmaker, solídny editor LaTeX. V ďalšom praktickom tipe vám ukážeme, ako používať LaTeX na vytváranie rôznych typov úvodzoviek.