Modes

Mody


When LaTeX is processing your input text, it is always in one of three modes:

  1. Paragraph mode
  2. Math mode
  3. Left-to-right mode, called LR mode for short

Kdyz LaTeX zpracovava vstupni text, je to vzdy v jednom ze tri nasledujicich modu.

  1. Odstavcovy mod
  2. Matematicky mod
  3. Left-to-right mod, zkracene nazyvany LR mod

LaTeX changes mode only when it goes up or down a staircase to a different level, though not all level changes produce mode changes. Mode changes occur only when entering or leaving an environment, or when LaTeX is processing the argument of certain text-producing commands.

LaTeX meni mody jenom pri vstupu nebo opusteni prostredi, nebo kdyz zpracovava argument nejakeho prikazu, ktery sam produkuje nejaky text.

Paragraph mode is the most common; it's the one LaTeX is in when processing ordinary text. In that mode, LaTeX breaks your text into lines and breaks the lines into pages. LaTeX is in math mode when it's generating a mathematical formula. In LR mode, as in paragraph mode, LaTeX considers the output that it produces to be a string of words with spaces between them. However, unlike paragraph mode, LaTeX keeps going from left to right; it never starts a new line in LR mode. Even if you put a hundred words into an \mbox, LaTeX would keep typesetting them from left to right inside a single box, and then complain because the resulting box was too wide to fit on the line.

Nejbeznejsi mod je odstavcovy. To je ten, kdy LaTeX zpracovava obycejny text. V tomto modu zalamuje LaTeX vas text na radky a tyto na stranky. LaTeX je v matematickem modu, kdyz generuje nejaky matematicky vzorec. V LR modu, tak jako v odstavcovem, LaTeX dava na vystup posloupnost slov oddelenych mezerami. Ale narozdil od odstavcoveho modu, jakmile dojde na radku zleva do prava nezacne novy radek, ale pokracuje porad dal. Casto, kdyz date do \mbox hodne slov, LaTeX bude pokracovat v jejich sazeni zleva do prava na jeden radek, a pak si bude stezovat, ze vysledny radek je prilis dlouhy.

LaTeX is in LR mode when it starts making a box with an \mbox command. You can get it to enter a different mode inside the box - for example, you can make it enter math mode to put a formula in the box. There are also several text-producing commands and environments for making a box that put LaTeX in paragraph mode. The box make by one of these commands or environments will be called a parbox. When LaTeX is in paragraph mode while making a box, it is said to be in inner paragraph mode. Its normal paragraph mode, which it starts out in, is called outer paragraph mode.

LaTeX je v LR modu, kdyz zacne vytvaret oblast prikazem \mbox . Uvnitr oblasti muzete nastavit i jine mody - napriklad muzete zapnout matematicky mod, abyste vlozili vzorec do oblasti. Take je nekolik prikazu produkujicich text a prostredi pro vytvareni oblasti, ktere LaTeX vklada do odstavcoveho modu. Oblasti vytvorene jednim z techto prikazu nebo prostredi rikame _______ (parbox). Kdyz je LaTeX v odstavcovem modu a vytvari oblast, rikame, ze je ve vnitrnim odstavcovem modu. Normalni odstavcovy mod je v tomoto pripade nazyvan vnejsi odstavcovy mod.