Как разместить материал: различия между версиями
Sonys (обсуждение | вклад) м |
Sonys (обсуждение | вклад) м |
||
Строка 67: | Строка 67: | ||
Строчные буквы эпсилон, тета, каппа, фи, пи, ро и сигма представлены в двух разных версиях. Строчные буквы эпсилон, тета, каппа, фи, пи, ро и сигма представлены в двух разных версиях. Альтернативная (''variant'' сокр. ''var'') версия, создается добавлением "var" перед названием буквы: | Строчные буквы эпсилон, тета, каппа, фи, пи, ро и сигма представлены в двух разных версиях. Строчные буквы эпсилон, тета, каппа, фи, пи, ро и сигма представлены в двух разных версиях. Альтернативная (''variant'' сокр. ''var'') версия, создается добавлением "var" перед названием буквы: | ||
− | \alpha, \Alpha, \beta, \Beta, \gamma, \Gamma, \pi, \Pi, \phi, \varphi, \mu, \Phi, \varPhi | + | <code>\alpha, \Alpha, \beta, \Beta, \gamma, \Gamma, \pi, \Pi, \phi, \varphi, \mu, \Phi, \varPhi</code> |
<math>\alpha, \Alpha, \beta, \Beta, \gamma, \Gamma, \pi, \Pi, \phi, \varphi, \mu, \Phi, \varPhi</math> | <math>\alpha, \Alpha, \beta, \Beta, \gamma, \Gamma, \pi, \Pi, \phi, \varphi, \mu, \Phi, \varPhi</math> | ||
Строка 76: | Строка 76: | ||
Оператор - это функция, которая записывается с помощью слова: например, тригонометрические функции (sin, cos, tan), логарифмы и экспоненты (log, exp), пределы (lim), а также след и определитель (tr, det). В LaTeX многие из них определены как команды: | Оператор - это функция, которая записывается с помощью слова: например, тригонометрические функции (sin, cos, tan), логарифмы и экспоненты (log, exp), пределы (lim), а также след и определитель (tr, det). В LaTeX многие из них определены как команды: | ||
− | + | <code>\cos (2\theta) = \cos^2 \theta - \sin^2 \theta</code> | |
<math>\cos (2\theta) = \cos^2 \theta - \sin^2 \theta \,</math> | <math>\cos (2\theta) = \cos^2 \theta - \sin^2 \theta \,</math> | ||
Строка 83: | Строка 83: | ||
Для некоторых операторов, таких как [[w:Предел (математика)|Предел]], нижний индекс помещается под оператором: | Для некоторых операторов, таких как [[w:Предел (математика)|Предел]], нижний индекс помещается под оператором: | ||
− | + | <code>\lim\limits_{x \to \infty} \exp(-x) = 0</code> | |
<math>\lim_{x \to \infty} \exp(-x) = 0</math> | <math>\lim_{x \to \infty} \exp(-x) = 0</math> | ||
Строка 89: | Строка 89: | ||
Для оператора [[w:Сравнение по модулю | Сравнения по модулю ]] существует две команды: \bmod и \pmod: | Для оператора [[w:Сравнение по модулю | Сравнения по модулю ]] существует две команды: \bmod и \pmod: | ||
− | + | <code> a \bmod b </code> | |
+ | <math> a \, \bmod \, b \,</math> | ||
− | < | + | <code> x \equiv a \pmod{b}</code> |
− | + | <math> x \equiv a \pmod b\,</math> | |
− | |||
− | |||
− | |||
− | |||
− | <math> | ||
− | |||
− | \,</math> | ||
− | |||
− | |||
==== Степени и индексы ==== | ==== Степени и индексы ==== | ||
Степени и индексы эквивалентны верхним и нижним индексам в обычном текстовом режиме. Символ каретки (<code>^</code>; [[w:Циркумфлекс|так же известный как циркумфлекс]]) используется чтобы что-то поднять, а нижнее подчёркивание (<code>_</code>) для опускания. Если необходимо повысить или понизить выражение, содержащее больше одного символа, его необходимо сгруппировать с помощью фигурных скобок (<code>{</code> и <code>}</code>). | Степени и индексы эквивалентны верхним и нижним индексам в обычном текстовом режиме. Символ каретки (<code>^</code>; [[w:Циркумфлекс|так же известный как циркумфлекс]]) используется чтобы что-то поднять, а нижнее подчёркивание (<code>_</code>) для опускания. Если необходимо повысить или понизить выражение, содержащее больше одного символа, его необходимо сгруппировать с помощью фигурных скобок (<code>{</code> и <code>}</code>). | ||
− | + | <code> k_{n+1} = n^2 + k_n^2 - k_{n-1}</code> | |
− | + | <math>k_{n+1} = n^2 + k_n^2 - k_{n-1} \,</math> | |
− | |||
− | |||
− | k_{n+1} = n^2 + k_n^2 - k_{n-1} | ||
− | |||
Для степеней, состоящих из более чем одной цифры, заключите степень в {}. | Для степеней, состоящих из более чем одной цифры, заключите степень в {}. | ||
− | + | <code> n^{22} </code> | |
− | + | <math> n^{22} \,</math> | |
− | |||
− | n^{22} | ||
− | |||
Подчёркивание (<code>_</code>) может использоваться с вертикальной чертой (<math> | </math>) при использовании выражения в качестве нижнего индекса (''это предложение требует уточнения''): | Подчёркивание (<code>_</code>) может использоваться с вертикальной чертой (<math> | </math>) при использовании выражения в качестве нижнего индекса (''это предложение требует уточнения''): | ||
− | + | <code> f(n) = n^5 + 4n^2 + 2 {{!}}_{n=17}</code> | |
− | |||
− | + | <math> f(n) = n^5 + 4n^2 + 2 |_{n=17} \,</math> | |
− | |||
− | |||
==== Дроби и биномы ==== | ==== Дроби и биномы ==== | ||
− | Дроби создаются с помощью команды | + | Дроби создаются с помощью команды <code>\frac{numerator}{denominator}<!----><code>. Так же и [[w:Биномиальный коэффициент|Биномиальный коэффициент]] можно записать используя команду <code>\binom</code>: |
− | |||
− | + | <code>\frac{n!}{k!(n-k)!} = \binom{n}{k}</code> | |
− | |||
<math> | <math> | ||
\frac{n!}{k!(n-k)!} = \binom{n}{k} | \frac{n!}{k!(n-k)!} = \binom{n}{k} | ||
</math> | </math> | ||
− | + | ||
Дроби можно помещать одну внутри другой: | Дроби можно помещать одну внутри другой: | ||
− | {{ | + | <code> \frac{\frac{1}{x}+\frac{1}{y}<!---->}{y-z}</code> |
− | + | <math>\frac{\frac{1}{x}+\frac{1}{y}}{y-z}</math> | |
− | |||
− | |||
− | <math> | ||
− | \frac{\frac{1}{x}+\frac{1}{y}}{y-z} | ||
− | </math> | ||
− | |||
Так же обратите внимание, что при встраивании дробей в строку текста или записи одной дроби внутри другой, <math>\tfrac{a}{b}</math>, их отображаемый размер должен быть заметно меньше, чем в выключенной формуле. Команды {{LaTeX/LaTeX|code=\tfrac}} и {{LaTeX/LaTeX|code=\dfrac}} позволяют использовать стиль записи соотвествующий использованию {{LaTeX/LaTeX|code=\textstyle}} и {{LaTeX/LaTeX|code=\displaystyle}}. Точно так же работают команды {{LaTeX/LaTeX|code=\tbinom}} и {{LaTeX/LaTeX|code=\dbinom}}, записывающие биноминальный коэффициент. | Так же обратите внимание, что при встраивании дробей в строку текста или записи одной дроби внутри другой, <math>\tfrac{a}{b}</math>, их отображаемый размер должен быть заметно меньше, чем в выключенной формуле. Команды {{LaTeX/LaTeX|code=\tfrac}} и {{LaTeX/LaTeX|code=\dfrac}} позволяют использовать стиль записи соотвествующий использованию {{LaTeX/LaTeX|code=\textstyle}} и {{LaTeX/LaTeX|code=\displaystyle}}. Точно так же работают команды {{LaTeX/LaTeX|code=\tbinom}} и {{LaTeX/LaTeX|code=\dbinom}}, записывающие биноминальный коэффициент. |
Версия 10:28, 22 декабря 2020
Начало работы
Для начала работы и возможности чтения всех статей WiKi необходимо зарегистрироваться и подтвердить email. Для этого надо нажать на меню пользователя "Аноним" в верхнем правом углу, выбрать "Создать учётную запись" и следовать инструкциям.
Если Вы хотите самостоятельно размещать и редактировать статьи и страницы Wiki необходимо получить права "Редактор" на проекте, для этого после регистрации и входа надо перейти по ссылке "Получить права редактора для %Ваше Имя%" расположенной в правой части под заголовком статьи и отправить запрос. После рассмотрения Вам или установят права редактора или сообщат причину отказа. Если данная ссылка не отображается проверьте вошли ли Вы под своим аккаунтом. Если-же у вас видна ссылка "Править" то права редактора уже выданы.
Для разового размещения материала можно обратиться к действующим редакторам их список можно посмотреть по ссылке: Список пользователей и выбрать группу Редакторы.
Для помощи в регистрации и получении прав можно обратиться на почту проекта info@irribase.ru.
Информация по оформлению и возможностям редактирования
Редактирование в визуальном редакторе
1. Открытие Визуального редактора
Чтобы отредактировать страницу при помощи Визуального редактора, нажмите вкладку «Править» вверху страницы. Открытие страницы для редактирования может занять несколько секунд или даже дольше, если страница очень длинная. Нажатие на вкладку «Править код» откроет классический редактор викитекста.
Вы также можете открыть Визуальный редактор, нажав «Править» в заголовке любого раздела.
2. Начало работы: панель инструментов Визуального редактора
Когда вы начинаете редактирование с помощью Визуального редактора, вверху страницы появляется его панель инструментов. Она содержит несколько знакомых иконок:
- Отменить и Вернуть изменения, которые вы сделали.
- Выпадающее меню Абзац: позволяет вам изменять форматирование абзаца. Чтобы изменить стиль абзаца, поместите курсор в абзац и выберите пункт в этом меню (вам не придется выделять какой-либо текст). Заголовки разделов формируются пунктом "Заголовок", подразделов - "Подзаголовок 1", "Подзаголовок 2", и так далее. Обычное форматирование текста — «Абзац».
- Форматирование: Нажатие на "A" откроет меню.
- Пункт "Полужирный" (B) делает выделенный текст жирным.
- Пункт "Курсив" (I) преобразовывает выделенный текст в курсив.
- Пункт «Надстрочный индекс» (x2) делает выбранный текст меньше и несколько выше, чем окружающий текст.
- Пункт «Подстрочный индекс» (x2) делает выбранный текст меньше и несколько ниже, чем окружающий текст.
- Пункт «Зачёркнутый» (
S) добавляет сплошную полосу через выделенный текст (зачеркивает выделенный текст). - Элемент «Программный код» (набор фигурных скобок:
{}
) изменяет шрифт выделенного текста на моноширинный шрифт, который отличает его от окружающего (пропорционально разнесенного) текста. - Элемент «Подчёркнутый» (U) добавляет сплошную линию под выделенным текстом.
- Последний пункт (), называется "Удалить", удаляет всё форматирование из выделенного текста, в том числе и ссылки. Если вы предварительно не выделили никакой текст, то когда вы вводите «A» для открытия меню и последующий выбор одной из команд форматирования применит его к тексту, который вы начнёте вводить сразу после этого, вне зависимости от того, где находился курсор.
- Образование цепи с: Значок цепи - это сцепить с. Нажатие на него (обычно после выбора некоторого текста) открывает диалоговое окно ссылки.
- *Временно не доступно*
Источники меню:Меню «Источники» используется для добавления цитат (также их называют «сносками» или «примечаниями»). У все вики-проектов есть возможность базового форматирования цитат и возможность ссылать на эти цитаты с помощью меню. Также меню предоставляет пользователям быстрый доступ к локальный шаблонам для цитат (если они включены).(Инструкции по добавлению местных шаблонов цитирования в меню Источники на определенную вики, доступны на странице VisualEditor/Citation tool.)кнопка Источник: Если в вашей вики активен сервис citoid, то вы увидите кнопку Источник вместо меню Источники. Служба citoid постарается заполнить шаблоны цитат автоматически. - Списки и отступы: Первые два пункта позволяют форматировать текст как "Маркированный список" или "Нумерованный список". Последние два пункта позволяют уменьшить или увеличить уровень отступа у элементов списка.
- Вставить: Меню «Вставить» в некоторых проектах может отличаться. Ниже представлен список всех опций, которые могут там появиться.
- Значок «Изображения и медиафайлы» (рисунок гор) открывает медиа-диалог.
- Значок «Шаблон» (фрагмент головоломки) позволяет вам редактировать шаблоны.
- Элемент «Таблица» позволяет вставлять таблицы.
- Пункт "Комментарий" (облачко текста) позволяет вставить комментарий, который не видим для читателей; этот комментарий можно увидеть только в режиме редактирования и затем обозначаются восклицательным знаком.
- Иконка «Иероглифы» (символ анкха — ☥) позволяет вставлять иероглифы (смотрите ниже).
- Элемент «Блок кода» позволяет вставлять блоки с кодом.
- Элемент «Нотная запись» позволяет вставлять ноты.
- Иконка «Галерея» (набор фотографий) позволяет поместить на страницу галерею изображений.
- Иконка «Математическая формула» (Σ) открывает диалог вставки формул.
- Элемент «График» позволяет вставлять графики.
- Элемент «Ваша подпись» позволяет вставлять свою подпись. Она может быть серой (неактивной) если вы редактируете страницу (пространство имен), например статью, в которой не нужно вставлять подпись.
- Иконка «Список примечаний» (три книги) открывает диалог, в котором можно определить, в каком месте примечания будут показываться читателю. Обычно для каждой страницы это делается только один раз.
- Вставка специальных символов: иконка «Специальный символ» в меню «Вставить» позволяет вызвать окно со специальными символами. При щелчке на отдельный символ вы помещяете его в текст. Сюда входят некоторые стандартные символы, надстрочные знаки и математические символы. (Этот список может быть изменён локально. Смотрите инструкции на VisualEditor/Специальные символы.)
- Кнопка Редактировать заметки отображает любые заметки для страницы.
Когда закончите редактировать, нажмите синюю кнопку "Сохранить изменения" на панели инструментов. Если вы еще не сделали изменений, кнопка будет отключена (серого цвета). Чтобы отменить все изменения, просто закройте окно браузера, или перейдите на вкладку «Читать» над панелью команд редактора.
Более полное руководство можно найти по ссылке: https://www.mediawiki.org/wiki/Help:VisualEditor/User_guide/ru
Набор формул LaTeX
Математические символы
В математике существует достаточно много различных символов! Ниже приведены те, к которым можно получить доступ прямо с клавиатуры:
+ - = ! / ( ) [ ] < > | ' : *
Помимо тех, что перечислены выше, для ввода некоторых символов могут потребоваться отдельные команды. Это требуется, например, для ввода греческих букв, символов множества и отношений, стрелок, бинарных операторов, и т.д.
Для примера:
\forall x \in X, \quad \exists y \leq \epsilon
[math]\displaystyle{ \forall x \in X, \quad \exists y \leq \epsilon \, }[/math]
Греческие буквы
Греческие буквы довольно часто используются в математике, но их достаточно просто набирать в математическом режиме. Вам просто нужно ввести название буквы после обратной косой черты: если первая буква названия строчная, вы получите строчную греческую букву, если первая буква названия заглавная (только первая буква), тогда вы получите прописную букву. Обратите внимание, что некоторые заглавные греческие буквы выглядят как латинские, поэтому они не предоставляются LaTeX (например, заглавные буквы Alpha и Beta это просто латинские "A" и "B" соответственно). Строчные буквы эпсилон, тета, каппа, фи, пи, ро и сигма представлены в двух разных версиях. Строчные буквы эпсилон, тета, каппа, фи, пи, ро и сигма представлены в двух разных версиях. Альтернативная (variant сокр. var) версия, создается добавлением "var" перед названием буквы:
\alpha, \Alpha, \beta, \Beta, \gamma, \Gamma, \pi, \Pi, \phi, \varphi, \mu, \Phi, \varPhi
[math]\displaystyle{ \alpha, \Alpha, \beta, \Beta, \gamma, \Gamma, \pi, \Pi, \phi, \varphi, \mu, \Phi, \varPhi }[/math]
Прокрутите вниз до #List of mathematical symbols чтобы увидеть полный список греческих символов.
Математические операторы
Оператор - это функция, которая записывается с помощью слова: например, тригонометрические функции (sin, cos, tan), логарифмы и экспоненты (log, exp), пределы (lim), а также след и определитель (tr, det). В LaTeX многие из них определены как команды:
\cos (2\theta) = \cos^2 \theta - \sin^2 \theta
[math]\displaystyle{ \cos (2\theta) = \cos^2 \theta - \sin^2 \theta \, }[/math]
Для некоторых операторов, таких как Предел, нижний индекс помещается под оператором:
\lim\limits_{x \to \infty} \exp(-x) = 0
[math]\displaystyle{ \lim_{x \to \infty} \exp(-x) = 0 }[/math]
Для оператора Сравнения по модулю существует две команды: \bmod и \pmod:
a \bmod b
[math]\displaystyle{ a \, \bmod \, b \, }[/math]
x \equiv a \pmod{b}
[math]\displaystyle{ x \equiv a \pmod b\, }[/math]
Степени и индексы
Степени и индексы эквивалентны верхним и нижним индексам в обычном текстовом режиме. Символ каретки (^
; так же известный как циркумфлекс) используется чтобы что-то поднять, а нижнее подчёркивание (_
) для опускания. Если необходимо повысить или понизить выражение, содержащее больше одного символа, его необходимо сгруппировать с помощью фигурных скобок ({
и }
).
k_{n+1} = n^2 + k_n^2 - k_{n-1}
[math]\displaystyle{ k_{n+1} = n^2 + k_n^2 - k_{n-1} \, }[/math]
Для степеней, состоящих из более чем одной цифры, заключите степень в {}.
n^{22}
[math]\displaystyle{ n^{22} \, }[/math]
Подчёркивание (_
) может использоваться с вертикальной чертой ([math]\displaystyle{ | }[/math]) при использовании выражения в качестве нижнего индекса (это предложение требует уточнения):
f(n) = n^5 + 4n^2 + 2 |_{n=17}
[math]\displaystyle{ f(n) = n^5 + 4n^2 + 2 |_{n=17} \, }[/math]
Дроби и биномы
Дроби создаются с помощью команды \frac{numerator}{denominator}
. Так же и Биномиальный коэффициент можно записать используя команду
\binom
:
\frac{n!}{k!(n-k)!} = \binom{n}{k}
[math]\displaystyle{
\frac{n!}{k!(n-k)!} = \binom{n}{k}
}[/math]
Дроби можно помещать одну внутри другой:
\frac{\frac{1}{x}+\frac{1}{y}}{y-z}
[math]\displaystyle{ \frac{\frac{1}{x}+\frac{1}{y}}{y-z} }[/math]
Так же обратите внимание, что при встраивании дробей в строку текста или записи одной дроби внутри другой, [math]\displaystyle{ \tfrac{a}{b} }[/math], их отображаемый размер должен быть заметно меньше, чем в выключенной формуле. Команды Шаблон:LaTeX/LaTeX и Шаблон:LaTeX/LaTeX позволяют использовать стиль записи соотвествующий использованию Шаблон:LaTeX/LaTeX и Шаблон:LaTeX/LaTeX. Точно так же работают команды Шаблон:LaTeX/LaTeX и Шаблон:LaTeX/LaTeX, записывающие биноминальный коэффициент.
Для относительно простых дробей, особенно внутри текста, может быть более эстетично использовать Степени и индексы:
Шаблон:LaTeX/Example
Данная запись может показаться немного "растянутой" (занимающей много места), сжатую версию можно определить, вставив некоторое отрицательное пространство. Шаблон:LaTeX/Example
Если вам необходимо часто использовать подобную запись дробей в своём документе, рекомендуем использовать пакет xfrac.
Данный пакет поддерживает команду Шаблон:LaTeX/LaTeX для создания наклонных дробей.
Использование:
Шаблон:LaTeX/Example
Если в качестве показателя степени используются дроби, необходимо использовать фигурные скобки вокруг команды Шаблон:LaTeX/LaTeX:
$x^\frac{1}{2}$ % no error
$x^\sfrac{1}{2}$ % error
$x^{\sfrac{1}{2}}$ % no error
В некоторых случаях добавление только данного пакета может привести к ошибкам о том, что определённые формы шрифтов недоступны. Тогда необходимо так же добавить пакеты lmodern и fix-cm.
В качестве альтернативы, пакет Шаблон:LaTeX/Package предоставляет команду Шаблон:LaTeX/LaTeX использование которой аналогично использованию Шаблон:LaTeX/LaTeX.
Непрерывные дроби
Непрерывные дроби следует записывать с помощью команды Шаблон:LaTeX/LaTeX:
Шаблон:LaTeX/Example
Умножение двух чисел
Чтобы сделать умножение визуально похожим на дробь, можно использовать вложенный массив, например, умножение чисел, написанных одно под другим..
Шаблон:LaTeX/Example
Корни
Команда Шаблон:LaTeX/LaTeX создаёт символ квадратного корня, окружающий математическое выражение. Он принимает необязательный аргумент в квадратных скобках ([
и ]
) для изменения показателя (степени) корня:
Шаблон:LaTeX/Example
Шаблон:LaTeX/Example
Some people prefer writing the square root "closing" it over its content. This method arguably makes it more clear what is in the scope of the root sign. This habit is not normally used while writing with the computer, but if you still want to change the output of the square root, LaTeX gives you this possibility. Just add the following code in the preamble of your document:
Шаблон:LaTeX/Example
This TeX code first renames the Шаблон:LaTeX/LaTeX command as Шаблон:LaTeX/LaTeX, then redefines Шаблон:LaTeX/LaTeX in terms of the old one, adding something more. The new square root can be seen in the picture on the left, compared to the old one on the right. Unfortunately this code won't work if you want to use multiple roots: if you try to write [math]\displaystyle{ \sqrt[b]{a} }[/math] as Шаблон:LaTeX/LaTeX after you used the code above, you'll just get a wrong output. In other words, you can redefine the square root this way only if you are not going to use multiple roots in the whole document.
An alternative piece of TeX code that does allow multiple roots is
Шаблон:LaTeX/Example
However this requires the Шаблон:LaTeX/LaTeX package
Sums and integrals
The Шаблон:LaTeX/LaTeX and Шаблон:LaTeX/LaTeX commands insert the sum and integral symbols respectively, with limits specified using the caret (^
) and underscore (_
). The typical notation for sums is:
Шаблон:LaTeX/Example
or
Шаблон:LaTeX/Example
The limits for the integrals follow the same notation. It's also important to represent the integration variables with an upright d, which in math mode is obtained through the \mathrm{} command, and with a small space separating it from the integrand, which is attained with the \, command.
Шаблон:LaTeX/Example
There are many other "big" commands which operate in a similar manner:
\sum
[math]\displaystyle{ \sum \, }[/math]
\prod
[math]\displaystyle{ \prod }[/math]
\coprod
[math]\displaystyle{ \coprod }[/math]
\bigoplus
[math]\displaystyle{ \bigoplus }[/math]
\bigotimes
[math]\displaystyle{ \bigotimes }[/math]
\bigodot
[math]\displaystyle{ \bigodot }[/math]
\bigcup
[math]\displaystyle{ \bigcup }[/math]
\bigcap
[math]\displaystyle{ \bigcap }[/math]
\biguplus
[math]\displaystyle{ \biguplus }[/math]
\bigsqcup
[math]\displaystyle{ \bigsqcup }[/math]
\bigvee
[math]\displaystyle{ \bigvee }[/math]
\bigwedge
[math]\displaystyle{ \bigwedge }[/math]
\int
[math]\displaystyle{ \int }[/math]
\oint
[math]\displaystyle{ \oint }[/math]
\iint
<ref name="amsmath"/>
[math]\displaystyle{ \iint }[/math]
\iiint
<ref name="amsmath"/>
[math]\displaystyle{ \iiint }[/math]
\iiiint
<ref name="amsmath"/>
[math]\displaystyle{ \iiiint }[/math]
\idotsint
<ref name="amsmath"/>
[math]\displaystyle{ \int \! \cdots \! \int }[/math]
For more integral symbols, including those not included by default in the Computer Modern font, try the Шаблон:LaTeX/Package package.
The Шаблон:LaTeX/LaTeX command<ref name="amsmath"/> allows the use of Шаблон:LaTeX/LaTeX to write the limits over multiple lines:
Шаблон:LaTeX/Example
If you want the limits of an integral to be specified above and below the symbol (like the sum), use the Шаблон:LaTeX/LaTeX command:
Шаблон:LaTeX/Example
However if you want this to apply to ALL integrals, it is preferable to specify the Шаблон:LaTeX/Parameter option when loading the Шаблон:LaTeX/Package package:
Шаблон:LaTeX/Usage
Subscripts and superscripts in other contexts as well as other parameters to Шаблон:LaTeX/Package package related to them are described in Advanced Mathematics chapter.
For bigger integrals, you may use personal declarations, or the Шаблон:LaTeX/Package package <ref name=LM> http://hdl.handle.net/2268/6219</ref>.
Brackets, braces and delimiters
How to use braces in multi line equations is described in the Advanced Mathematics chapter.
The use of delimiters such as brackets soon becomes important when dealing with anything but the most trivial equations. Without them, formulas can become ambiguous. Also, special types of mathematical structures, such as matrices, typically rely on delimiters to enclose them.
There are a variety of delimiters available for use in LaTeX:
Шаблон:LaTeX/Example
where Шаблон:LaTeX/LaTeX and Шаблон:LaTeX/LaTeX may be used in place of [ and ].
Automatic sizing
Very often mathematical features will differ in size, in which case the delimiters surrounding the expression should vary accordingly. This can be done automatically using the Шаблон:LaTeX/LaTeX, Шаблон:LaTeX/LaTeX, and Шаблон:LaTeX/LaTeX commands. Any of the previous delimiters may be used in combination with these:
Шаблон:LaTeX/Example
Шаблон:LaTeX/Example
Curly braces are defined differently by using Шаблон:LaTeX/LaTeX and Шаблон:LaTeX/LaTeX,
If a delimiter on only one side of an expression is required, then an invisible delimiter on the other side may be denoted using a period (.
).
Шаблон:LaTeX/Example
Manual sizing
In certain cases, the sizing produced by the Шаблон:LaTeX/LaTeX and Шаблон:LaTeX/LaTeX commands may not be desirable, or you may simply want finer control over the delimiter sizes. In this case, the Шаблон:LaTeX/LaTeX, Шаблон:LaTeX/LaTeX, Шаблон:LaTeX/LaTeX and Шаблон:LaTeX/LaTeX modifier commands may be used:
Шаблон:LaTeX/Example
These commands are primarily useful when dealing with nested delimiters. For example, when typesetting
Шаблон:LaTeX/Example
we notice that the Шаблон:LaTeX/LaTeX and Шаблон:LaTeX/LaTeX commands produce the same size delimiters as those nested within it. This can be difficult to read. To fix this, we write
Шаблон:LaTeX/Example
Manual sizing can also be useful when an equation is too large, trails off the end of the page, and must be separated into two lines using an align command. Although the commands Шаблон:LaTeX/LaTeX and Шаблон:LaTeX/LaTeX can be used to balance the delimiters on each line, this may lead to wrong delimiter sizes. Furthermore, manual sizing can be used to avoid overly large delimiters if an Шаблон:LaTeX/LaTeX or a similar command appears between the delimiters.
Matrices and arrays
A basic matrix may be created using the Шаблон:LaTeX/Environment environment<ref name="amsmath">requires the Шаблон:LaTeX/Package package</ref>: in common with other table-like structures, entries are specified by row, with columns separated using an ampersand (Шаблон:LaTeX/LaTeX) and a new rows separated with a double backslash (Шаблон:LaTeX/LaTeX)
Шаблон:LaTeX/Example
To specify alignment of columns in the table, use starred version<ref name="mathtools">requires the Шаблон:LaTeX/Package package</ref>:
Шаблон:LaTeX/Example
The alignment by default is Шаблон:LaTeX/Parameter but it can be any column type valid in Шаблон:LaTeX/Environment environment.
However matrices are usually enclosed in delimiters of some kind, and while it is possible to use the \left
and \right
commands, there are various other predefined environments which automatically include delimiters:
Environment name
Surrounding delimiter
Notes
Шаблон:LaTeX/Environment<ref name="amsmath"/>
[math]\displaystyle{ ( \, ) }[/math]
centers columns by default
Шаблон:LaTeX/Environment<ref name="mathtools"/>
[math]\displaystyle{ ( \, ) }[/math]
allows to specify alignment of columns in optional parameter
Шаблон:LaTeX/Environment<ref name="amsmath"/>
[math]\displaystyle{ [ \, ] }[/math]
centers columns by default
Шаблон:LaTeX/Environment<ref name="mathtools"/>
[math]\displaystyle{ [ \, ] }[/math]
allows to specify alignment of columns in optional parameter
Шаблон:LaTeX/Environment<ref name="amsmath"/>
[math]\displaystyle{ \{ \, \} }[/math]
centers columns by default
Шаблон:LaTeX/Environment<ref name="mathtools"/>
[math]\displaystyle{ \{ \, \} }[/math]
allows to specify alignment of columns in optional parameter
Шаблон:LaTeX/Environment<ref name="amsmath"/>
[math]\displaystyle{ | \, | }[/math]
centers columns by default
Шаблон:LaTeX/Environment<ref name="mathtools"/>
[math]\displaystyle{ | \, | }[/math]
allows to specify alignment of columns in optional parameter
Шаблон:LaTeX/Environment<ref name="amsmath"/>
[math]\displaystyle{ \| \, \| }[/math]
centers columns by default
Шаблон:LaTeX/Environment<ref name="mathtools"/>
[math]\displaystyle{ \| \, \| }[/math]
allows to specify alignment of columns in optional parameter
When writing down arbitrary sized matrices, it is common to use horizontal, vertical and diagonal triplets of dots (known as ellipses) to fill in certain columns and rows. These can be specified using the Шаблон:LaTeX/LaTeX, Шаблон:LaTeX/LaTeX and Шаблон:LaTeX/LaTeX respectively:
Шаблон:LaTeX/Example
In some cases you may want to have finer control of the alignment within each column, or want to insert lines between columns or rows. This can be achieved using the Шаблон:LaTeX/Environment environment, which is essentially a math-mode version of the [[../Tables#The tabular environment|tabular
environment]], which requires that the columns be pre-specified:
Шаблон:LaTeX/Example
You may see that the AMS matrix class of environments doesn't leave enough space when used together with fractions resulting in output similar to this:
[math]\displaystyle{
M = \begin{bmatrix}
\frac{5}{6} & \frac{1}{6} & 0\\
\frac{5}{6} & 0 & \frac{1}{6}\\
0 & \frac{5}{6} & \frac{1}{6}
\end{bmatrix}
}[/math]
To counteract this problem, add additional leading space with the optional parameter to the Шаблон:LaTeX/LaTeX command:
If you need "border" or "indexes" on your matrix, plain TeX provides the macro Шаблон:LaTeX/LaTeX
Шаблон:LaTeX/Example
Matrices in running text
To insert a small matrix, and not increase leading in the line containing it, use Шаблон:LaTeX/Environment environment:
Adding text to equations
The math environment differs from the text environment in the representation of text. Here is an example of trying to represent text within the math environment:
Шаблон:LaTeX/Example
There are two noticeable problems: there are no spaces between words or numbers, and the letters are italicized and more spaced out than normal. Both issues are simply artifacts of the maths mode, in that it treats it as a mathematical expression: spaces are ignored (LaTeX spaces mathematics according to its own rules), and each character is a separate element (so are not positioned as closely as normal text).
There are a number of ways that text can be added properly. The typical way is to wrap the text with the Шаблон:LaTeX/LaTeX command <ref name="amsmath"/> (a similar command is Шаблон:LaTeX/LaTeX, though this causes problems with subscripts, and has a less descriptive name). Let's see what happens when the above equation code is adapted:
Шаблон:LaTeX/Example
The text looks better. However, there are no gaps between the numbers and the words. Unfortunately, you are required to explicitly add these. There are many ways to add spaces between maths elements, but for the sake of simplicity we may simply insert space characters into the Шаблон:LaTeX/LaTeX commands.
Шаблон:LaTeX/Example
Formatted text
Using the Шаблон:LaTeX/LaTeX is fine and gets the basic result. Yet, there is an alternative that offers a little more flexibility. You may recall the introduction of font formatting commands, such as Шаблон:LaTeX/LaTeX, Шаблон:LaTeX/LaTeX, Шаблон:LaTeX/LaTeX, etc. These commands format the argument accordingly, e.g., Шаблон:LaTeX/LaTeX gives bold text. These commands are equally valid within a maths environment to include text. The added benefit here is that you can have better control over the font formatting, rather than the standard text achieved with Шаблон:LaTeX/LaTeX.
Formatting mathematics symbols
We can now format text; what about formatting mathematical expressions? There are a set of formatting commands very similar to the font formatting ones just used, except that they are specifically aimed at text in math mode (requires Шаблон:LaTeX/Package)
LaTeX command
Sample
Description
Common use
Шаблон:LaTeX/LaTeX
(or simply omit any command)
[math]\displaystyle{ ABCDEF~abcdef~123456\, }[/math]
The default math font
Most mathematical notation
Шаблон:LaTeX/LaTeX
[math]\displaystyle{ \mathrm{ABCDEF~abcdef~123456}\, }[/math]
This is the default or normal font, unitalicised
Units of measurement, one word functions
Шаблон:LaTeX/LaTeX
[math]\displaystyle{ \mathit{ABCDEF~abcdef~123456}\, }[/math]
Italicised font
Multi-letter function or variable names. Compared to \mathnormal
, words are spaced more naturally and numbers are italicized as well.
Шаблон:LaTeX/LaTeX
[math]\displaystyle{ \mathbf{ABCDEF~abcdef~123456}\, }[/math]
Bold font
Vectors
Шаблон:LaTeX/LaTeX
[math]\displaystyle{ \mathsf{ABCDEF~abcdef~123456}\, }[/math]
Sans-serif
Categories
Шаблон:LaTeX/LaTeX
[math]\displaystyle{ \mathtt{ABCDEF~abcdef~123456}\, }[/math]
Monospace (fixed-width) font
Шаблон:LaTeX/LaTeX
[math]\displaystyle{ \mathfrak{ABCDEF~abcdef~123456}\, }[/math]
Fraktur
Almost canonical font for Lie algebras, ideals in ring theory
Шаблон:LaTeX/LaTeX
[math]\displaystyle{ \mathcal{ABCDEF}\, }[/math]
Calligraphy (uppercase only)
Often used for sheaves/schemes and categories, used to denote cryptological concepts like an alphabet of definition ([math]\displaystyle{ \mathcal{A} }[/math]), message space ([math]\displaystyle{ \mathcal{M} }[/math]), ciphertext space ([math]\displaystyle{ \mathcal{C} }[/math]) and key space ([math]\displaystyle{ \mathcal{K} }[/math]); Kleene's [math]\displaystyle{ \mathcal{O} }[/math]; naming convention in description logic; Laplace transform ([math]\displaystyle{ \mathcal{L} }[/math]) and Fourier transform ([math]\displaystyle{ \mathcal{F} }[/math])
Шаблон:LaTeX/LaTeX
(requires the Шаблон:LaTeX/Package or Шаблон:LaTeX/Package package)
[math]\displaystyle{ \mathbb{ABCDEF}\, }[/math]
Blackboard bold (uppercase only)
Used to denote special sets (e.g. real numbers)
Шаблон:LaTeX/LaTeX
(requires the Шаблон:LaTeX/Package package)
Файл:Mathscr (A-F).png
Script (uppercase only)
An alternative font for categories and sheaves.
These formatting commands can be wrapped around the entire equation, and not just on the textual elements: they only format letters, numbers, and uppercase Greek, and other math commands are unaffected.
To bold lowercase Greek or other symbols use the Шаблон:LaTeX/LaTeX command<ref name="amsmath"/>; this will only work if there exists a bold version of the symbol in the current font. As a last resort there is the Шаблон:LaTeX/LaTeX command<ref name="amsmath"/> (poor man's bold): this prints multiple versions of the character slightly offset against each other.
Шаблон:LaTeX/Example
To change the size of the fonts in math mode, see [[../Advanced Mathematics#Changing font size|Changing font size]].
Accents
So what to do when you run out of symbols and fonts? Well, the next step is to use accents:
a'
or a^{\prime}
[math]\displaystyle{ a'\, }[/math]
a''
[math]\displaystyle{ a''\, }[/math]
\hat{a}
[math]\displaystyle{ \hat{a} \, }[/math]
\bar{a}
[math]\displaystyle{ \bar{a} \, }[/math]
\grave{a}
[math]\displaystyle{ \grave{a} \, }[/math]
\acute{a}
[math]\displaystyle{ \acute{a} \, }[/math]
\dot{a}
[math]\displaystyle{ \dot{a} \, }[/math]
\ddot{a}
[math]\displaystyle{ \ddot{a} \, }[/math]
\not{a}
[math]\displaystyle{ \not{a} \, }[/math]
\mathring{a}
\overrightarrow{AB}
[math]\displaystyle{ \overrightarrow{AB} \, }[/math]
\overleftarrow{AB}
[math]\displaystyle{ \overleftarrow{AB} \, }[/math]
a'''
[math]\displaystyle{ a'''\, }[/math]
a''''
[math]\displaystyle{ a''''\, }[/math]
\overline{aaa}
[math]\displaystyle{ \overline{aaa} \, }[/math]
\check{a}
[math]\displaystyle{ \check{a} \, }[/math]
\breve{a}
[math]\displaystyle{ \breve{a} \, }[/math]
\vec{a}
[math]\displaystyle{ \vec{a} \, }[/math]
\dddot{a}
<ref name="amsmath"/>
\ddddot{a}
<ref name="amsmath"/>
\widehat{AAA}
[math]\displaystyle{ \widehat{AAA} \, }[/math]
\widetilde{AAA}
[math]\displaystyle{ \widetilde{AAA} }[/math]
\stackrel\frown{AAA}
[math]\displaystyle{ \stackrel\frown{AAA} }[/math]
\tilde{a}
[math]\displaystyle{ \tilde{a} \, }[/math]
\underline{a}
[math]\displaystyle{ \underline{a} \, }[/math]
Color
The package Шаблон:LaTeX/Package, described in [[../Colors#Adding_the_color_package|Colors]], allows us to add color to our equations. For example,
Шаблон:LaTeX/Example
The only problem is that this disrupts the default Шаблон:LaTeX formatting around the Шаблон:LaTeX/LaTeX operator. To fix this, we enclose it in a Шаблон:LaTeX/LaTeX environment, since Шаблон:LaTeX/LaTeX is a binary operator. This process is described here.
Plus and minus signs
LaTeX deals with the + and − signs in two possible ways. The most common is as a binary operator. When two maths elements appear on either side of the sign, it is assumed to be a binary operator, and as such, allocates some space to either side of the sign. The alternative way is a sign designation. This is when you state whether a mathematical quantity is either positive or negative. This is common for the latter, as in math, such elements are assumed to be positive unless a − is prefixed to it. In this instance, you want the sign to appear close to the appropriate element to show their association. If you put a + or a − with nothing before it but you want it to be handled like a binary operator you can add an invisible character before the operator using Шаблон:LaTeX/LaTeX. This can be useful if you are writing multiple-line formulas, and a new line could start with a − or +, for example, then you can fix some strange alignments adding the invisible character where necessary.
A plus-minus sign is written as:
Шаблон:LaTeX/Example
Similarly, there exists also a minus-plus sign:
Шаблон:LaTeX/Example
Controlling horizontal spacing
LaTeX is obviously pretty good at typesetting maths—it was one of the chief aims of the core TeX system that LaTeX extends. However, it can't always be relied upon to accurately interpret formulas in the way you did. It has to make certain assumptions when there are ambiguous expressions. The result tends to be slightly incorrect horizontal spacing. In these events, the output is still satisfactory, yet any perfectionists will no doubt wish to fine-tune their formulas to ensure spacing is correct. These are generally very subtle adjustments.
There are other occasions where LaTeX has done its job correctly, but you just want to add some space, maybe to add a comment of some kind. For example, in the following equation, it is preferable to ensure there is a decent amount of space between the maths and the text.
This code produces errors with Miktex 2.9 and does not yield the results seen on the right.
Use \mathrm instead of just \text.
(Note that this particular example can be expressed in more elegant code by the Шаблон:LaTeX/Environment construct provided by the Шаблон:LaTeX/Package package described in Advanced Mathematics chapter.)
LaTeX has defined two commands that can be used anywhere in documents (not just maths) to insert some horizontal space. They are Шаблон:LaTeX/LaTeX and Шаблон:LaTeX/LaTeX
A Шаблон:LaTeX/LaTeX is a space equal to the current font size. So, if you are using an 11pt font, then the space provided by Шаблон:LaTeX/LaTeX will also be 11pt (horizontally, of course.) The Шаблон:LaTeX/LaTeX gives twice that amount. As you can see from the code from the above example, Шаблон:LaTeX/LaTeXs were used to add some separation between the maths and the text.
OK, so back to the fine tuning as mentioned at the beginning of the document. A good example would be displaying the simple equation for the indefinite integral of y with respect to x:
[math]\displaystyle{ \int y\, \mathrm{d}x }[/math]
If you were to try this, you may write:
However, this doesn't give the correct result. LaTeX doesn't respect the white-space left in the code to signify that the y and the dx are independent entities. Instead, it lumps them altogether. A Шаблон:LaTeX/LaTeX would clearly be overkill in this situation—what is needed are some small spaces to be utilized in this type of instance, and that's what LaTeX provides:
Command
Description
Size
Шаблон:LaTeX/LaTeX
small space
3/18 of a quad
Шаблон:LaTeX/LaTeX
medium space
4/18 of a quad
Шаблон:LaTeX/LaTeX
large space
5/18 of a quad
Шаблон:LaTeX/LaTeX
negative space
-3/18 of a quad
NB you can use more than one command in a sequence to achieve a greater space if necessary.
So, to rectify the current problem:
Шаблон:LaTeX/Example
Шаблон:LaTeX/Example
Шаблон:LaTeX/Example
The negative space may seem like an odd thing to use, however, it wouldn't be there if it didn't have some use! Take the following example:
The matrix-like expression for representing binomial coefficients is too padded. There is too much space between the brackets and the actual contents within. This can easily be corrected by adding a few negative spaces after the left bracket and before the right bracket.
In any case, adding some spaces manually should be avoided whenever possible: it makes the source code more complex and it's against the basic principles of a What You See is What You Mean approach. The best thing to do is to define some commands using all the spaces you want and then, when you use your command, you don't have to add any other space. Later, if you change your mind about the length of the horizontal space, you can easily change it modifying only the command you defined before. Let us use an example: you want the d of a dx in an integral to be in roman font and a small space away from the rest. If you want to type an integral like Шаблон:LaTeX/LaTeX, you can define a command like this:
Шаблон:LaTeX/Usage
in the preamble of your document. We have chosen Шаблон:LaTeX/LaTeX just because it reminds the "d" it replaces and it is fast to type. Doing so, the code for your integral becomes Шаблон:LaTeX/LaTeX. Now, whenever you write an integral, you just have to use the Шаблон:LaTeX/LaTeX instead of the "d", and all your integrals will have the same style. If you change your mind, you just have to change the definition in the preamble, and all your integrals will be changed accordingly.
Manually Specifying Formula Style
To manually display a fragment of a formula using text style, surround the fragment with curly braces and prefix the fragment with Шаблон:LaTeX/LaTeX. The braces are required because the Шаблон:LaTeX/LaTeX macro changes the state of the renderer, rendering all subsequent mathematics in text style. The braces limit this change of state to just the fragment enclosed within. For example, to use text style for just the summation symbol in a sum, one would enter
Шаблон:LaTeX/Usage
The same thing as a command would look like this:
Шаблон:LaTeX/Usage
Note the extra braces. Just one set around the expression won't be enough. That would cause all math after Шаблон:LaTeX/LaTeX to be displayed using text style.
To display part of a formula using display style, do the same thing, but use Шаблон:LaTeX/LaTeX instead.
Advanced Mathematics: AMS Math package
The AMS (American Mathematical Society) mathematics package is a powerful package that creates a higher layer of abstraction over mathematical LaTeX language; if you use it it will make your life easier. Some commands Шаблон:LaTeX/Package introduces will make other plain LaTeX commands obsolete: in order to keep consistency in the final output you'd better use Шаблон:LaTeX/Package commands whenever possible. If you do so, you will get an elegant output without worrying about alignment and other details, keeping your source code readable. If you want to use it, you have to add this in the preamble:
Шаблон:LaTeX/Usage
Introducing dots in formulas
Шаблон:LaTeX/Package defines also the Шаблон:LaTeX/LaTeX command, that is a generalization of the existing Шаблон:LaTeX/LaTeX. You can use Шаблон:LaTeX/LaTeX in both text and math mode and LaTeX will replace it with three dots "…" but it will decide according to the context whether to put it on the bottom (like Шаблон:LaTeX/LaTeX) or centered (like Шаблон:LaTeX/LaTeX).
Dots
LaTeX gives you several commands to insert dots (ellipses) in your formulae. This can be particularly useful if you have to type big matrices omitting elements. First of all, here are the main dots-related commands LaTeX provides:
Code
Output
Comment
Шаблон:LaTeX/LaTeX
[math]\displaystyle{ \dots }[/math]
generic dots (ellipsis), to be used in text (outside formulae as well). It automatically manages whitespaces before and after itself according to the context, it's a higher level command.
Шаблон:LaTeX/LaTeX
[math]\displaystyle{ \ldots }[/math]
the output is similar to the previous one, but there is no automatic whitespace management; it works at a lower level.
Шаблон:LaTeX/LaTeX
[math]\displaystyle{ \cdots }[/math]
These dots are centered relative to the height of a letter. There is also the binary multiplication operator, \cdot
, mentioned below.
Шаблон:LaTeX/LaTeX
[math]\displaystyle{ \vdots }[/math]
vertical dots
Шаблон:LaTeX/LaTeX
[math]\displaystyle{ \ddots }[/math]
diagonal dots
Шаблон:LaTeX/LaTeX
inverse diagonal dots (requires the Шаблон:LaTeX/Package package)
Шаблон:LaTeX/LaTeX
[math]\displaystyle{ \ldots \ldots }[/math]
to be used in matrices, it creates a row of dots spanning n columns.
Instead of using Шаблон:LaTeX/LaTeX and Шаблон:LaTeX/LaTeX, you should use the semantically oriented commands. It makes it possible to adapt your document to different conventions on the fly, in case (for example) you have to submit it to a publisher who insists on following house tradition in this respect. The default treatment for the various kinds follows American Mathematical Society conventions.
Code
Output
Comment
Шаблон:LaTeX/LaTeX
Файл:LaTeX Dotsc.png
for "dots with commas"
Шаблон:LaTeX/LaTeX
Файл:LaTeX Dotsb.png
for "dots with binary operators/relations"
Шаблон:LaTeX/LaTeX
Файл:LaTeX Dotsm.png
for "multiplication dots"
Шаблон:LaTeX/LaTeX
Файл:LaTeX Dotsi.png
for "dots with integrals"
Шаблон:LaTeX/LaTeX
Файл:LaTeX Dotso.png
for "other dots" (none of the above)
Write an equation with the align environment
How to write an equation with the align environment with the Шаблон:LaTeX/Package package is described in Advanced Mathematics.
List of mathematical symbols
All the pre-defined mathematical symbols from the \TeX\ package are listed below. More symbols are available from extra packages.
Relation Symbols
Symbol
Script
Symbol
Script
Symbol
Script
Symbol
Script
Symbol
Script
[math]\displaystyle{ \lt \, }[/math]
<
[math]\displaystyle{ \gt \, }[/math]
>
[math]\displaystyle{ =\, }[/math]
=
[math]\displaystyle{ \parallel\, }[/math]
\parallel
[math]\displaystyle{ \nparallel\, }[/math]
\nparallel
[math]\displaystyle{ \leq\, }[/math]
\leq
[math]\displaystyle{ \geq\, }[/math]
\geq
[math]\displaystyle{ \doteq\, }[/math]
\doteq
[math]\displaystyle{ \asymp\, }[/math]
\asymp
[math]\displaystyle{ \bowtie\, }[/math]
\bowtie
[math]\displaystyle{ \ll\, }[/math]
\ll
[math]\displaystyle{ \gg\, }[/math]
\gg
[math]\displaystyle{ \equiv\, }[/math]
\equiv
[math]\displaystyle{ \vdash\, }[/math]
\vdash
[math]\displaystyle{ \dashv\, }[/math]
\dashv
[math]\displaystyle{ \subset\, }[/math]
\subset
[math]\displaystyle{ \supset\, }[/math]
\supset
[math]\displaystyle{ \approx\, }[/math]
\approx
[math]\displaystyle{ \in\, }[/math]
\in
[math]\displaystyle{ \ni\, }[/math]
\ni
[math]\displaystyle{ \subseteq\, }[/math]
\subseteq
[math]\displaystyle{ \supseteq\, }[/math]
\supseteq
[math]\displaystyle{ \cong\, }[/math]
\cong
[math]\displaystyle{ \smile\, }[/math]
\smile
[math]\displaystyle{ \frown\, }[/math]
\frown
[math]\displaystyle{ \nsubseteq\, }[/math]
\nsubseteq
[math]\displaystyle{ \nsupseteq\, }[/math]
\nsupseteq
[math]\displaystyle{ \simeq\, }[/math]
\simeq
[math]\displaystyle{ \models\, }[/math]
\models
[math]\displaystyle{ \notin\, }[/math]
\notin
[math]\displaystyle{ \sqsubset\, }[/math]
\sqsubset
[math]\displaystyle{ \sqsupset\, }[/math]
\sqsupset
[math]\displaystyle{ \sim\, }[/math]
\sim
[math]\displaystyle{ \perp\, }[/math]
\perp
[math]\displaystyle{ \mid\, }[/math]
\mid
[math]\displaystyle{ \sqsubseteq\, }[/math]
\sqsubseteq
[math]\displaystyle{ \sqsupseteq\, }[/math]
\sqsupseteq
[math]\displaystyle{ \propto\, }[/math]
\propto
[math]\displaystyle{ \prec\, }[/math]
\prec
[math]\displaystyle{ \succ\, }[/math]
\succ
[math]\displaystyle{ \preceq\, }[/math]
\preceq
[math]\displaystyle{ \succeq\, }[/math]
\succeq
[math]\displaystyle{ \neq\, }[/math]
\neq
[math]\displaystyle{ \sphericalangle\, }[/math]
\sphericalangle
[math]\displaystyle{ \measuredangle\, }[/math]
\measuredangle
[math]\displaystyle{ \therefore\, }[/math]
\therefore
[math]\displaystyle{ \because\, }[/math]
\because
Binary Operations
Symbol
Script
Symbol
Script
Symbol
Script
Symbol
Script
[math]\displaystyle{ \pm\, }[/math]
\pm
[math]\displaystyle{ \cap\, }[/math]
\cap
[math]\displaystyle{ \diamond\, }[/math]
\diamond
[math]\displaystyle{ \oplus\, }[/math]
\oplus
[math]\displaystyle{ \mp\, }[/math]
\mp
[math]\displaystyle{ \cup\, }[/math]
\cup
[math]\displaystyle{ \bigtriangleup\, }[/math]
\bigtriangleup
[math]\displaystyle{ \ominus\, }[/math]
\ominus
[math]\displaystyle{ \times\, }[/math]
\times
[math]\displaystyle{ \uplus\, }[/math]
\uplus
[math]\displaystyle{ \bigtriangledown\, }[/math]
\bigtriangledown
[math]\displaystyle{ \otimes\, }[/math]
\otimes
[math]\displaystyle{ \div\, }[/math]
\div
[math]\displaystyle{ \sqcap\, }[/math]
\sqcap
[math]\displaystyle{ \triangleleft\, }[/math]
\triangleleft
[math]\displaystyle{ \oslash\, }[/math]
\oslash
[math]\displaystyle{ \ast\, }[/math]
\ast
[math]\displaystyle{ \sqcup\, }[/math]
\sqcup
[math]\displaystyle{ \triangleright\, }[/math]
\triangleright
[math]\displaystyle{ \odot\, }[/math]
\odot
[math]\displaystyle{ \star\, }[/math]
\star
[math]\displaystyle{ \vee\, }[/math]
\vee
[math]\displaystyle{ \bigcirc\, }[/math]
\bigcirc
[math]\displaystyle{ \circ\, }[/math]
\circ
[math]\displaystyle{ \dagger\, }[/math]
\dagger
[math]\displaystyle{ \wedge\, }[/math]
\wedge
[math]\displaystyle{ \bullet\, }[/math]
\bullet
[math]\displaystyle{ \setminus\, }[/math]
\setminus
[math]\displaystyle{ \ddagger\, }[/math]
\ddagger
[math]\displaystyle{ \cdot\, }[/math]
\cdot
[math]\displaystyle{ \wr\, }[/math]
\wr
[math]\displaystyle{ \amalg\, }[/math]
\amalg
Set and/or Logic Notation
Symbol
Script
Symbol
Script
[math]\displaystyle{ \exists\, }[/math]
\exists
[math]\displaystyle{ \rightarrow\, }[/math]
\rightarrow
or \to
[math]\displaystyle{ \nexists\, }[/math]
\nexists
[math]\displaystyle{ \leftarrow\, }[/math]
\leftarrow
or \gets
[math]\displaystyle{ \forall\, }[/math]
\forall
[math]\displaystyle{ \mapsto\, }[/math]
\mapsto
[math]\displaystyle{ \neg\, }[/math]
\neg
[math]\displaystyle{ \implies\, }[/math]
\implies
[math]\displaystyle{ \subset\, }[/math]
\subset
⟸
\impliedby
[math]\displaystyle{ \supset\, }[/math]
\supset
[math]\displaystyle{ \Rightarrow\, }[/math]
\Rightarrow
or \implies
[math]\displaystyle{ \in }[/math]
\in
[math]\displaystyle{ \leftrightarrow\, }[/math]
\leftrightarrow
[math]\displaystyle{ \notin\, }[/math]
\notin
[math]\displaystyle{ \iff\, }[/math]
\iff
[math]\displaystyle{ \ni\, }[/math]
\ni
[math]\displaystyle{ \Leftrightarrow\, }[/math]
\Leftrightarrow
(preferred for equivalence (iff))
[math]\displaystyle{ \land\, }[/math]
\land
[math]\displaystyle{ \top\, }[/math]
\top
[math]\displaystyle{ \lor\, }[/math]
\lor
[math]\displaystyle{ \bot\, }[/math]
\bot
[math]\displaystyle{ \angle\, }[/math]
\angle
[math]\displaystyle{ \emptyset\, }[/math] and [math]\displaystyle{ \varnothing\, }[/math]
\emptyset
and \varnothing
Шаблон:Ref
[math]\displaystyle{ \rightleftharpoons\, }[/math]
\rightleftharpoons
Delimiters
Symbol
Script
Symbol
Script
Symbol
Script
Symbol
Script
[math]\displaystyle{ |\, }[/math]
|
or \mid
(difference in spacing)
[math]\displaystyle{ \|\, }[/math]
\|
[math]\displaystyle{ /\, }[/math]
/
[math]\displaystyle{ \backslash\, }[/math]
\backslash
[math]\displaystyle{ \{\, }[/math]
\{
[math]\displaystyle{ \}\, }[/math]
\}
[math]\displaystyle{ \langle\, }[/math]
\langle
[math]\displaystyle{ \rangle\, }[/math]
\rangle
[math]\displaystyle{ \uparrow\, }[/math]
\uparrow
[math]\displaystyle{ \Uparrow\, }[/math]
\Uparrow
[math]\displaystyle{ \lceil\, }[/math]
\lceil
[math]\displaystyle{ \rceil\, }[/math]
\rceil
[math]\displaystyle{ \downarrow\, }[/math]
\downarrow
[math]\displaystyle{ \Downarrow\, }[/math]
\Downarrow
[math]\displaystyle{ \lfloor\, }[/math]
\lfloor
[math]\displaystyle{ \rfloor\, }[/math]
\rfloor
Note: To use the Greek Letters in LaTeX that have the same appearance in the Latin alphabet, just use Latin: e.g., A instead of Alpha, B instead of Beta, etc.
Greek Letters
Symbol
Script
Symbol
Script
[math]\displaystyle{ \Alpha\, }[/math] and [math]\displaystyle{ \alpha\, }[/math]
A
and \alpha
[math]\displaystyle{ \Nu\, }[/math] and [math]\displaystyle{ \nu\, }[/math]
N
and \nu
[math]\displaystyle{ \Beta\, }[/math] and [math]\displaystyle{ \beta\, }[/math]
B
and \beta
[math]\displaystyle{ \Xi\, }[/math] and [math]\displaystyle{ \xi\, }[/math]
\Xi
and \xi
[math]\displaystyle{ \Gamma\, }[/math] and [math]\displaystyle{ \gamma\, }[/math]
\Gamma
and \gamma
[math]\displaystyle{ \Omicron\, }[/math] and [math]\displaystyle{ \omicron\, }[/math]
O
and o
[math]\displaystyle{ \Delta\, }[/math] and [math]\displaystyle{ \delta\, }[/math]
\Delta
and \delta
[math]\displaystyle{ \Pi\, }[/math], [math]\displaystyle{ \pi\, }[/math] and [math]\displaystyle{ \varpi }[/math]
\Pi
, \pi
and \varpi
[math]\displaystyle{ \Epsilon\, }[/math], [math]\displaystyle{ \epsilon\, }[/math] and [math]\displaystyle{ \varepsilon\, }[/math]
E
, \epsilon
and \varepsilon
[math]\displaystyle{ \Rho\, }[/math], [math]\displaystyle{ \rho\, }[/math] and [math]\displaystyle{ \varrho\, }[/math]
P
, \rho
and \varrho
[math]\displaystyle{ \Zeta\, }[/math] and [math]\displaystyle{ \zeta\, }[/math]
Z
and \zeta
[math]\displaystyle{ \Sigma\, }[/math], [math]\displaystyle{ \sigma\, }[/math] and [math]\displaystyle{ \varsigma\, }[/math]
\Sigma
, \sigma
and \varsigma
[math]\displaystyle{ \Eta\, }[/math] and [math]\displaystyle{ \eta\, }[/math]
H
and \eta
[math]\displaystyle{ \Tau\, }[/math] and [math]\displaystyle{ \tau\, }[/math]
T
and \tau
[math]\displaystyle{ \Theta\, }[/math], [math]\displaystyle{ \theta\, }[/math] and [math]\displaystyle{ \vartheta\, }[/math]
\Theta
, \theta
and \vartheta
[math]\displaystyle{ \Upsilon\, }[/math] and [math]\displaystyle{ \upsilon\, }[/math]
\Upsilon
and \upsilon
[math]\displaystyle{ \Iota\, }[/math] and [math]\displaystyle{ \iota\, }[/math]
I
and \iota
[math]\displaystyle{ \Phi\, }[/math], [math]\displaystyle{ \phi\, }[/math], and [math]\displaystyle{ \varphi\, }[/math]
\Phi
, \phi
and \varphi
[math]\displaystyle{ \Kappa\, }[/math], [math]\displaystyle{ \kappa\, }[/math] and [math]\displaystyle{ \varkappa\, }[/math]
K
, \kappa
and \varkappa
[math]\displaystyle{ \Chi\, }[/math] and [math]\displaystyle{ \chi\, }[/math]
X
and \chi
[math]\displaystyle{ \Lambda\, }[/math] and [math]\displaystyle{ \lambda\, }[/math]
\Lambda
and \lambda
[math]\displaystyle{ \Psi\, }[/math] and [math]\displaystyle{ \psi\, }[/math]
\Psi
and \psi
[math]\displaystyle{ \Mu\, }[/math] and [math]\displaystyle{ \mu\, }[/math]
M
and \mu
[math]\displaystyle{ \Omega\, }[/math] and [math]\displaystyle{ \omega\, }[/math]
\Omega
and \omega
Other symbols
Symbol
Script
Symbol
Script
Symbol
Script
Symbol
Script
Symbol
Script
[math]\displaystyle{ \partial\, }[/math]
\partial
[math]\displaystyle{ \imath\, }[/math]
\imath
[math]\displaystyle{ \Re\, }[/math]
\Re
[math]\displaystyle{ \nabla\, }[/math]
\nabla
[math]\displaystyle{ \aleph\, }[/math]
\aleph
[math]\displaystyle{ \eth\, }[/math]
\eth
[math]\displaystyle{ \jmath\, }[/math]
\jmath
[math]\displaystyle{ \Im\, }[/math]
\Im
[math]\displaystyle{ \Box\, }[/math]
\Box
[math]\displaystyle{ \beth\, }[/math]
\beth
[math]\displaystyle{ \hbar\, }[/math]
\hbar
[math]\displaystyle{ \ell\, }[/math]
\ell
[math]\displaystyle{ \wp\, }[/math]
\wp
[math]\displaystyle{ \infty\, }[/math]
\infty
[math]\displaystyle{ \gimel\, }[/math]
\gimel
Шаблон:NoteNot predefined in LATEX 2. Use one of the packages latexsym, amsfonts, amssymb, txfonts, pxfonts, or wasysym
Trigonometric Functions
Symbol
Script
Symbol
Script
Symbol
Script
Symbol
Script
[math]\displaystyle{ \sin\, }[/math]
\sin
[math]\displaystyle{ \arcsin\, }[/math]
\arcsin
[math]\displaystyle{ \sinh\, }[/math]
\sinh
[math]\displaystyle{ \sec\, }[/math]
\sec
[math]\displaystyle{ \cos\, }[/math]
\cos
[math]\displaystyle{ \arccos\, }[/math]
\arccos
[math]\displaystyle{ \cosh\, }[/math]
\cosh
[math]\displaystyle{ \csc\, }[/math]
\csc
[math]\displaystyle{ \tan\, }[/math]
\tan
[math]\displaystyle{ \arctan\, }[/math]
\arctan
[math]\displaystyle{ \tanh\, }[/math]
\tanh
[math]\displaystyle{ \cot\, }[/math]
\cot
[math]\displaystyle{ \arccot\, }[/math]
\arccot
[math]\displaystyle{ \coth\, }[/math]
\coth
If LaTeX does not include a command for the mathematical operator you want to use, for example \cis
(cosine plus i times sine), add to your preamble:
\DeclareMathOperator\cis{cis}
You can then use \cis
in the document just like \cos
or any other mathematical operator.
Summary
As you begin to see, typesetting math can be tricky at times. However, because LaTeX provides so much control, you can get professional quality mathematics typesetting with relatively little effort (once you've had a bit of practice, of course!). It would be possible to keep going and going with math topics because it seems potentially limitless. However, with this tutorial, you should be able to get along sufficiently.
Notes
<references/>
Further reading
- meta:Help:Displaying a formula: Wikimedia uses a subset of LaTeX commands.
External links
- detexify: applet for looking up LaTeX symbols by drawing them
- amsmath documentation
- LaTeX - The Student Room
- The Comprehensive LaTeX Symbol List
- MathLex - LaTeX math translator and equation builder
Математическое окружение
Системе LaTeX необходимо сообщить, когда текст, который вы вводите, является математической формулой. Это необходимо из-за того, что LaTeX набирает математическую нотацию иначе, чем обычный текст. Поэтому для данной цели объявлены специальные окружения. Их можно разделить на две категории в зависимости от того, как они представлены:
- text - текст формулы отображается прямо в строке, внутри текста, где он объявлен. Например, я могу написать формулу [math]\displaystyle{ a + a = 2a }[/math] прямо в этом предложении.
- displayed - для отображения формулы в отдельной строке.
Поскольку математические формулы требуют особых окружений, естественно, есть их соответствующие названия, которые вы можете использовать стандартным способом. Однако, в отличие от большинства других окружений, есть удобные сокращения для объявления ваших формул. Следующая таблица объединяет информацию о них:
Тип
Встроенная (в текст) формула
Выключенная (на отдельной строке) формула
Выключенная формула с автонумерацией
Окружение
Шаблон:LaTeX/LaTeX
Шаблон:LaTeX/LaTeX
Шаблон:LaTeX/LaTeX
Сокращение LaTeX
Шаблон:LaTeX/LaTeX
Шаблон:LaTeX/LaTeX
Сокращение TeX
Шаблон:LaTeX/LaTeX
Шаблон:LaTeX/LaTeX
Комментарий
Шаблон:LaTeX/LaTeX (версия со звездочкой) убирает нумерацию, но требует использования amsmath
Внимание: Следует избегать использования Шаблон:LaTeX/LaTeX , так как это может вызывать проблемы, особнно с макросами AMS-LaTeX. Кроме того, в случае возникновения проблем сообщения об ошибках могут оказаться бесполезными.
Окружения Шаблон:LaTeX/LaTeX и Шаблон:LaTeX/LaTeX являются функционально эквивалентными.
Если вы набираете текст в обычном режиме, говорят, что вы находитесь в текстовом режиме, но когда вы печатаете в одной из этих математических сред, вы, как говорят, находитесь в математическом режиме, который имеет некоторые отличия от текстового режима:
- Большинство пробелов и разрывов строк не имеют никакого значения, поскольку все пробелы либо получены логически из математических выражений, либо должны быть указаны с помощью специальных команд, таких как Шаблон:LaTeX/LaTeX
- Пустые строки не допускаются. Только один абзац на формулу.
- Каждая буква считается именем переменной и будет набрана как таковая. Если вы хотите набрать обычный текст в формуле (обычный вертикальный шрифт и нормальный интервал), вам необходимо ввести текст с помощью специальных команд.
Вставка "выключенных" математических формул внутри блоков текста
Чтобы некоторые операторы, такие как Шаблон:LaTeX/LaTeX или Шаблон:LaTeX/LaTeX , правильно отображались в некоторых математических окружениях (имеется ввидуШаблон:LaTeX/LaTeX), может быть удобно написать класс Шаблон:LaTeX/LaTeX внутри окружения. Это может увеличить длину строки, но приведет к более правильному отображению показателей и индексов для некоторых математических операторов. Например, Шаблон:LaTeX/LaTeX напечатает маленькую Σ аШаблон:LaTeX/LaTeX напечатает большую [math]\displaystyle{ \displaystyle \sum }[/math], как в уравнениях (Работает только при включенном пакете AMSMATH). Можно принудительно настроить такое поведение для всех математических сред, объявив Шаблон:LaTeX/LaTeX в самом начале (т.е. до Шаблон:LaTeX/LaTeX).
Математические символы
В математике существует достаточно много различных символов! Ниже приведены те, к которым можно получить доступ прямо с клавиатуры:
+ - = ! / ( ) [ ] < > | ' : *
Помимо тех, что перечислены выше, для ввода некоторых символов могут потребоваться отдельные команды. Это требуется, например, для ввода греческих букв, символов множества и отношений, стреклок, бинарных операторов, и т.д.
Для примера:
\forall x \in X, \quad \exists y \leq \epsilon
[math]\displaystyle{ \forall x \in X, \quad \exists y \leq \epsilon \, }[/math]
К счастью, есть инструмент, который может значительно упростить поиск команды для определенного символа. Найдите "Detexify" в разделе external links ниже. Другой вариант - посмотреть "Полный список символов LaTeX" в разделе external links ниже.
Греческие буквы
Греческие буквы довольно часто используются в математике, но их достаточно просто набирать в математическом режиме. Вам просто нужно ввести название буквы после обратной косой черты: если первая буква названия строчная, вы получите строчную греческую букву, если первая буква названия заглавная (только первая буква), тогда вы получите прописную букву. Обратите внимание, что некоторые заглавные греческие буквы выглядят как латинские, поэтому они не предоставляются LaTeX (например, заглавные буквы Alpha и Beta это просто латинские "A" и "B" соответственно).
Строчные буквы эпсилон, тета, каппа, фи, пи, ро и сигма представлены в двух разных версиях. Строчные буквы эпсилон, тета, каппа, фи, пи, ро и сигма представлены в двух разных версиях. Альтернативная (variant сокр. var) версия, создается добавлением "var" перед названием буквы:
Прокрутите вниз до #List of mathematical symbols чтобы увидеть полный список греческих символов.
Математические операторы
Оператор - это функция, которая записывается с помощью слова: например, тригонометрические функции (sin, cos, tan), логарифмы и экспоненты (log, exp), пределы (lim), а также след и определитель (tr, det). В LaTeX многие из них определены как команды:
Шаблон:LaTeX/Example
Для некоторых операторов, таких как Предел, нижний индекс помещается под оператором:
Шаблон:LaTeX/Example
Для оператора Сравнения по модулю существует две команды: Шаблон:LaTeX/LaTeX и Шаблон:LaTeX/LaTeX:
Шаблон:LaTeX/Example
Шаблон:LaTeX/Example
Чтобы использовать операторы, которые не определены заранее, например argmax, см. [[../Высшая математика#Определяемые операторы|определяемые операторы]]
Степени и индексы
Степени и индексы эквивалентны верхним и нижним индексам в обычном текстовом режиме. Символ каретки (^
; так же известный как циркумфлекс) используется чтобы что-то поднять, а нижнее подчёркивание (_
) для опускания. Если необходимо повысить или понизить выражение, содержащее больше одного символа, его необходимо сгруппировать с помощью фигурных скобок ({
и }
).
Шаблон:LaTeX/Example
Для степеней, состоящих из более чем одной цифры, заключите степень в {}.
Шаблон:LaTeX/Example
Подчёркивание (_
) может использоваться с вертикальной чертой ([math]\displaystyle{ | }[/math]) при использовании выражения в качестве нижнего индекса (это предложение требует уточнения):
Дроби и биномы
Дроби создаются с помощью команды Шаблон:LaTeX/LaTeX. Так же и Биномиальный коэффициент можно записать используя команду Шаблон:LaTeX/LaTeX:
Шаблон:LaTeX/Example
Дроби можно помещать одну внутри другой:
Шаблон:LaTeX/Example
Так же обратите внимание, что при встраивании дробей в строку текста или записи одной дроби внутри другой, [math]\displaystyle{ \tfrac{a}{b} }[/math], их отображаемый размер должен быть заметно меньше, чем в выключенной формуле. Команды Шаблон:LaTeX/LaTeX и Шаблон:LaTeX/LaTeX позволяют использовать стиль записи соотвествующий использованию Шаблон:LaTeX/LaTeX и Шаблон:LaTeX/LaTeX. Точно так же работают команды Шаблон:LaTeX/LaTeX и Шаблон:LaTeX/LaTeX, записывающие биноминальный коэффициент.
Для относительно простых дробей, особенно внутри текста, может быть более эстетично использовать Степени и индексы:
Шаблон:LaTeX/Example
Данная запись может показаться немного "растянутой" (занимающей много места), сжатую версию можно определить, вставив некоторое отрицательное пространство. Шаблон:LaTeX/Example
Если вам необходимо часто использовать подобную запись дробей в своём документе, рекомендуем использовать пакет xfrac.
Данный пакет поддерживает команду Шаблон:LaTeX/LaTeX для создания наклонных дробей.
Использование:
Шаблон:LaTeX/Example
Если в качестве показателя степени используются дроби, необходимо использовать фигурные скобки вокруг команды Шаблон:LaTeX/LaTeX:
$x^\frac{1}{2}$ % no error
$x^\sfrac{1}{2}$ % error
$x^{\sfrac{1}{2}}$ % no error
В некоторых случаях добавление только данного пакета может привести к ошибкам о том, что определённые формы шрифтов недоступны. Тогда необходимо так же добавить пакеты lmodern и fix-cm.
В качестве альтернативы, пакет Шаблон:LaTeX/Package предоставляет команду Шаблон:LaTeX/LaTeX использование которой аналогично использованию Шаблон:LaTeX/LaTeX.
Непрерывные дроби
Непрерывные дроби следует записывать с помощью команды Шаблон:LaTeX/LaTeX:
Шаблон:LaTeX/Example
Умножение двух чисел
Чтобы сделать умножение визуально похожим на дробь, можно использовать вложенный массив, например, умножение чисел, написанных одно под другим..
Шаблон:LaTeX/Example
Корни
Команда Шаблон:LaTeX/LaTeX создаёт символ квадратного корня, окружающий математическое выражение. Он принимает необязательный аргумент в квадратных скобках ([
и ]
) для изменения показателя (степени) корня:
Шаблон:LaTeX/Example
Шаблон:LaTeX/Example
Some people prefer writing the square root "closing" it over its content. This method arguably makes it more clear what is in the scope of the root sign. This habit is not normally used while writing with the computer, but if you still want to change the output of the square root, LaTeX gives you this possibility. Just add the following code in the preamble of your document:
Шаблон:LaTeX/Example
This TeX code first renames the Шаблон:LaTeX/LaTeX command as Шаблон:LaTeX/LaTeX, then redefines Шаблон:LaTeX/LaTeX in terms of the old one, adding something more. The new square root can be seen in the picture on the left, compared to the old one on the right. Unfortunately this code won't work if you want to use multiple roots: if you try to write [math]\displaystyle{ \sqrt[b]{a} }[/math] as Шаблон:LaTeX/LaTeX after you used the code above, you'll just get a wrong output. In other words, you can redefine the square root this way only if you are not going to use multiple roots in the whole document.
An alternative piece of TeX code that does allow multiple roots is
Шаблон:LaTeX/Example
However this requires the Шаблон:LaTeX/LaTeX package
Sums and integrals
The Шаблон:LaTeX/LaTeX and Шаблон:LaTeX/LaTeX commands insert the sum and integral symbols respectively, with limits specified using the caret (^
) and underscore (_
). The typical notation for sums is:
Шаблон:LaTeX/Example
or
Шаблон:LaTeX/Example
The limits for the integrals follow the same notation. It's also important to represent the integration variables with an upright d, which in math mode is obtained through the \mathrm{} command, and with a small space separating it from the integrand, which is attained with the \, command.
Шаблон:LaTeX/Example
There are many other "big" commands which operate in a similar manner:
\sum
[math]\displaystyle{ \sum \, }[/math]
\prod
[math]\displaystyle{ \prod }[/math]
\coprod
[math]\displaystyle{ \coprod }[/math]
\bigoplus
[math]\displaystyle{ \bigoplus }[/math]
\bigotimes
[math]\displaystyle{ \bigotimes }[/math]
\bigodot
[math]\displaystyle{ \bigodot }[/math]
\bigcup
[math]\displaystyle{ \bigcup }[/math]
\bigcap
[math]\displaystyle{ \bigcap }[/math]
\biguplus
[math]\displaystyle{ \biguplus }[/math]
\bigsqcup
[math]\displaystyle{ \bigsqcup }[/math]
\bigvee
[math]\displaystyle{ \bigvee }[/math]
\bigwedge
[math]\displaystyle{ \bigwedge }[/math]
\int
[math]\displaystyle{ \int }[/math]
\oint
[math]\displaystyle{ \oint }[/math]
\iint
<ref name="amsmath"/>
[math]\displaystyle{ \iint }[/math]
\iiint
<ref name="amsmath"/>
[math]\displaystyle{ \iiint }[/math]
\iiiint
<ref name="amsmath"/>
[math]\displaystyle{ \iiiint }[/math]
\idotsint
<ref name="amsmath"/>
[math]\displaystyle{ \int \! \cdots \! \int }[/math]
For more integral symbols, including those not included by default in the Computer Modern font, try the Шаблон:LaTeX/Package package.
The Шаблон:LaTeX/LaTeX command<ref name="amsmath"/> allows the use of Шаблон:LaTeX/LaTeX to write the limits over multiple lines:
Шаблон:LaTeX/Example
If you want the limits of an integral to be specified above and below the symbol (like the sum), use the Шаблон:LaTeX/LaTeX command:
Шаблон:LaTeX/Example
However if you want this to apply to ALL integrals, it is preferable to specify the Шаблон:LaTeX/Parameter option when loading the Шаблон:LaTeX/Package package:
Шаблон:LaTeX/Usage
Subscripts and superscripts in other contexts as well as other parameters to Шаблон:LaTeX/Package package related to them are described in Advanced Mathematics chapter.
For bigger integrals, you may use personal declarations, or the Шаблон:LaTeX/Package package <ref name=LM> http://hdl.handle.net/2268/6219</ref>.
Brackets, braces and delimiters
How to use braces in multi line equations is described in the Advanced Mathematics chapter.
The use of delimiters such as brackets soon becomes important when dealing with anything but the most trivial equations. Without them, formulas can become ambiguous. Also, special types of mathematical structures, such as matrices, typically rely on delimiters to enclose them.
There are a variety of delimiters available for use in LaTeX:
Шаблон:LaTeX/Example
where Шаблон:LaTeX/LaTeX and Шаблон:LaTeX/LaTeX may be used in place of [ and ].
Automatic sizing
Very often mathematical features will differ in size, in which case the delimiters surrounding the expression should vary accordingly. This can be done automatically using the Шаблон:LaTeX/LaTeX, Шаблон:LaTeX/LaTeX, and Шаблон:LaTeX/LaTeX commands. Any of the previous delimiters may be used in combination with these:
Шаблон:LaTeX/Example
Шаблон:LaTeX/Example
Curly braces are defined differently by using Шаблон:LaTeX/LaTeX and Шаблон:LaTeX/LaTeX,
If a delimiter on only one side of an expression is required, then an invisible delimiter on the other side may be denoted using a period (.
).
Шаблон:LaTeX/Example
Manual sizing
In certain cases, the sizing produced by the Шаблон:LaTeX/LaTeX and Шаблон:LaTeX/LaTeX commands may not be desirable, or you may simply want finer control over the delimiter sizes. In this case, the Шаблон:LaTeX/LaTeX, Шаблон:LaTeX/LaTeX, Шаблон:LaTeX/LaTeX and Шаблон:LaTeX/LaTeX modifier commands may be used:
Шаблон:LaTeX/Example
These commands are primarily useful when dealing with nested delimiters. For example, when typesetting
Шаблон:LaTeX/Example
we notice that the Шаблон:LaTeX/LaTeX and Шаблон:LaTeX/LaTeX commands produce the same size delimiters as those nested within it. This can be difficult to read. To fix this, we write
Шаблон:LaTeX/Example
Manual sizing can also be useful when an equation is too large, trails off the end of the page, and must be separated into two lines using an align command. Although the commands Шаблон:LaTeX/LaTeX and Шаблон:LaTeX/LaTeX can be used to balance the delimiters on each line, this may lead to wrong delimiter sizes. Furthermore, manual sizing can be used to avoid overly large delimiters if an Шаблон:LaTeX/LaTeX or a similar command appears between the delimiters.
Matrices and arrays
A basic matrix may be created using the Шаблон:LaTeX/Environment environment<ref name="amsmath">requires the Шаблон:LaTeX/Package package</ref>: in common with other table-like structures, entries are specified by row, with columns separated using an ampersand (Шаблон:LaTeX/LaTeX) and a new rows separated with a double backslash (Шаблон:LaTeX/LaTeX)
Шаблон:LaTeX/Example
To specify alignment of columns in the table, use starred version<ref name="mathtools">requires the Шаблон:LaTeX/Package package</ref>:
Шаблон:LaTeX/Example
The alignment by default is Шаблон:LaTeX/Parameter but it can be any column type valid in Шаблон:LaTeX/Environment environment.
However matrices are usually enclosed in delimiters of some kind, and while it is possible to use the \left
and \right
commands, there are various other predefined environments which automatically include delimiters:
Environment name
Surrounding delimiter
Notes
Шаблон:LaTeX/Environment<ref name="amsmath"/>
[math]\displaystyle{ ( \, ) }[/math]
centers columns by default
Шаблон:LaTeX/Environment<ref name="mathtools"/>
[math]\displaystyle{ ( \, ) }[/math]
allows to specify alignment of columns in optional parameter
Шаблон:LaTeX/Environment<ref name="amsmath"/>
[math]\displaystyle{ [ \, ] }[/math]
centers columns by default
Шаблон:LaTeX/Environment<ref name="mathtools"/>
[math]\displaystyle{ [ \, ] }[/math]
allows to specify alignment of columns in optional parameter
Шаблон:LaTeX/Environment<ref name="amsmath"/>
[math]\displaystyle{ \{ \, \} }[/math]
centers columns by default
Шаблон:LaTeX/Environment<ref name="mathtools"/>
[math]\displaystyle{ \{ \, \} }[/math]
allows to specify alignment of columns in optional parameter
Шаблон:LaTeX/Environment<ref name="amsmath"/>
[math]\displaystyle{ | \, | }[/math]
centers columns by default
Шаблон:LaTeX/Environment<ref name="mathtools"/>
[math]\displaystyle{ | \, | }[/math]
allows to specify alignment of columns in optional parameter
Шаблон:LaTeX/Environment<ref name="amsmath"/>
[math]\displaystyle{ \| \, \| }[/math]
centers columns by default
Шаблон:LaTeX/Environment<ref name="mathtools"/>
[math]\displaystyle{ \| \, \| }[/math]
allows to specify alignment of columns in optional parameter
When writing down arbitrary sized matrices, it is common to use horizontal, vertical and diagonal triplets of dots (known as ellipses) to fill in certain columns and rows. These can be specified using the Шаблон:LaTeX/LaTeX, Шаблон:LaTeX/LaTeX and Шаблон:LaTeX/LaTeX respectively:
Шаблон:LaTeX/Example
In some cases you may want to have finer control of the alignment within each column, or want to insert lines between columns or rows. This can be achieved using the Шаблон:LaTeX/Environment environment, which is essentially a math-mode version of the [[../Tables#The tabular environment|tabular
environment]], which requires that the columns be pre-specified:
Шаблон:LaTeX/Example
You may see that the AMS matrix class of environments doesn't leave enough space when used together with fractions resulting in output similar to this:
[math]\displaystyle{
M = \begin{bmatrix}
\frac{5}{6} & \frac{1}{6} & 0\\
\frac{5}{6} & 0 & \frac{1}{6}\\
0 & \frac{5}{6} & \frac{1}{6}
\end{bmatrix}
}[/math]
To counteract this problem, add additional leading space with the optional parameter to the Шаблон:LaTeX/LaTeX command:
If you need "border" or "indexes" on your matrix, plain TeX provides the macro Шаблон:LaTeX/LaTeX
Шаблон:LaTeX/Example
Matrices in running text
To insert a small matrix, and not increase leading in the line containing it, use Шаблон:LaTeX/Environment environment:
Adding text to equations
The math environment differs from the text environment in the representation of text. Here is an example of trying to represent text within the math environment:
Шаблон:LaTeX/Example
There are two noticeable problems: there are no spaces between words or numbers, and the letters are italicized and more spaced out than normal. Both issues are simply artifacts of the maths mode, in that it treats it as a mathematical expression: spaces are ignored (LaTeX spaces mathematics according to its own rules), and each character is a separate element (so are not positioned as closely as normal text).
There are a number of ways that text can be added properly. The typical way is to wrap the text with the Шаблон:LaTeX/LaTeX command <ref name="amsmath"/> (a similar command is Шаблон:LaTeX/LaTeX, though this causes problems with subscripts, and has a less descriptive name). Let's see what happens when the above equation code is adapted:
Шаблон:LaTeX/Example
The text looks better. However, there are no gaps between the numbers and the words. Unfortunately, you are required to explicitly add these. There are many ways to add spaces between maths elements, but for the sake of simplicity we may simply insert space characters into the Шаблон:LaTeX/LaTeX commands.
Шаблон:LaTeX/Example
Formatted text
Using the Шаблон:LaTeX/LaTeX is fine and gets the basic result. Yet, there is an alternative that offers a little more flexibility. You may recall the introduction of font formatting commands, such as Шаблон:LaTeX/LaTeX, Шаблон:LaTeX/LaTeX, Шаблон:LaTeX/LaTeX, etc. These commands format the argument accordingly, e.g., Шаблон:LaTeX/LaTeX gives bold text. These commands are equally valid within a maths environment to include text. The added benefit here is that you can have better control over the font formatting, rather than the standard text achieved with Шаблон:LaTeX/LaTeX.
Formatting mathematics symbols
We can now format text; what about formatting mathematical expressions? There are a set of formatting commands very similar to the font formatting ones just used, except that they are specifically aimed at text in math mode (requires Шаблон:LaTeX/Package)
LaTeX command
Sample
Description
Common use
Шаблон:LaTeX/LaTeX
(or simply omit any command)
[math]\displaystyle{ ABCDEF~abcdef~123456\, }[/math]
The default math font
Most mathematical notation
Шаблон:LaTeX/LaTeX
[math]\displaystyle{ \mathrm{ABCDEF~abcdef~123456}\, }[/math]
This is the default or normal font, unitalicised
Units of measurement, one word functions
Шаблон:LaTeX/LaTeX
[math]\displaystyle{ \mathit{ABCDEF~abcdef~123456}\, }[/math]
Italicised font
Multi-letter function or variable names. Compared to \mathnormal
, words are spaced more naturally and numbers are italicized as well.
Шаблон:LaTeX/LaTeX
[math]\displaystyle{ \mathbf{ABCDEF~abcdef~123456}\, }[/math]
Bold font
Vectors
Шаблон:LaTeX/LaTeX
[math]\displaystyle{ \mathsf{ABCDEF~abcdef~123456}\, }[/math]
Sans-serif
Categories
Шаблон:LaTeX/LaTeX
[math]\displaystyle{ \mathtt{ABCDEF~abcdef~123456}\, }[/math]
Monospace (fixed-width) font
Шаблон:LaTeX/LaTeX
[math]\displaystyle{ \mathfrak{ABCDEF~abcdef~123456}\, }[/math]
Fraktur
Almost canonical font for Lie algebras, ideals in ring theory
Шаблон:LaTeX/LaTeX
[math]\displaystyle{ \mathcal{ABCDEF}\, }[/math]
Calligraphy (uppercase only)
Often used for sheaves/schemes and categories, used to denote cryptological concepts like an alphabet of definition ([math]\displaystyle{ \mathcal{A} }[/math]), message space ([math]\displaystyle{ \mathcal{M} }[/math]), ciphertext space ([math]\displaystyle{ \mathcal{C} }[/math]) and key space ([math]\displaystyle{ \mathcal{K} }[/math]); Kleene's [math]\displaystyle{ \mathcal{O} }[/math]; naming convention in description logic; Laplace transform ([math]\displaystyle{ \mathcal{L} }[/math]) and Fourier transform ([math]\displaystyle{ \mathcal{F} }[/math])
Шаблон:LaTeX/LaTeX
(requires the Шаблон:LaTeX/Package or Шаблон:LaTeX/Package package)
[math]\displaystyle{ \mathbb{ABCDEF}\, }[/math]
Blackboard bold (uppercase only)
Used to denote special sets (e.g. real numbers)
Шаблон:LaTeX/LaTeX
(requires the Шаблон:LaTeX/Package package)
Файл:Mathscr (A-F).png
Script (uppercase only)
An alternative font for categories and sheaves.
These formatting commands can be wrapped around the entire equation, and not just on the textual elements: they only format letters, numbers, and uppercase Greek, and other math commands are unaffected.
To bold lowercase Greek or other symbols use the Шаблон:LaTeX/LaTeX command<ref name="amsmath"/>; this will only work if there exists a bold version of the symbol in the current font. As a last resort there is the Шаблон:LaTeX/LaTeX command<ref name="amsmath"/> (poor man's bold): this prints multiple versions of the character slightly offset against each other.
Шаблон:LaTeX/Example
To change the size of the fonts in math mode, see [[../Advanced Mathematics#Changing font size|Changing font size]].
Accents
So what to do when you run out of symbols and fonts? Well, the next step is to use accents:
a'
or a^{\prime}
[math]\displaystyle{ a'\, }[/math]
a''
[math]\displaystyle{ a''\, }[/math]
\hat{a}
[math]\displaystyle{ \hat{a} \, }[/math]
\bar{a}
[math]\displaystyle{ \bar{a} \, }[/math]
\grave{a}
[math]\displaystyle{ \grave{a} \, }[/math]
\acute{a}
[math]\displaystyle{ \acute{a} \, }[/math]
\dot{a}
[math]\displaystyle{ \dot{a} \, }[/math]
\ddot{a}
[math]\displaystyle{ \ddot{a} \, }[/math]
\not{a}
[math]\displaystyle{ \not{a} \, }[/math]
\mathring{a}
\overrightarrow{AB}
[math]\displaystyle{ \overrightarrow{AB} \, }[/math]
\overleftarrow{AB}
[math]\displaystyle{ \overleftarrow{AB} \, }[/math]
a'''
[math]\displaystyle{ a'''\, }[/math]
a''''
[math]\displaystyle{ a''''\, }[/math]
\overline{aaa}
[math]\displaystyle{ \overline{aaa} \, }[/math]
\check{a}
[math]\displaystyle{ \check{a} \, }[/math]
\breve{a}
[math]\displaystyle{ \breve{a} \, }[/math]
\vec{a}
[math]\displaystyle{ \vec{a} \, }[/math]
\dddot{a}
<ref name="amsmath"/>
\ddddot{a}
<ref name="amsmath"/>
\widehat{AAA}
[math]\displaystyle{ \widehat{AAA} \, }[/math]
\widetilde{AAA}
[math]\displaystyle{ \widetilde{AAA} }[/math]
\stackrel\frown{AAA}
[math]\displaystyle{ \stackrel\frown{AAA} }[/math]
\tilde{a}
[math]\displaystyle{ \tilde{a} \, }[/math]
\underline{a}
[math]\displaystyle{ \underline{a} \, }[/math]
Color
The package Шаблон:LaTeX/Package, described in [[../Colors#Adding_the_color_package|Colors]], allows us to add color to our equations. For example,
Шаблон:LaTeX/Example
The only problem is that this disrupts the default Шаблон:LaTeX formatting around the Шаблон:LaTeX/LaTeX operator. To fix this, we enclose it in a Шаблон:LaTeX/LaTeX environment, since Шаблон:LaTeX/LaTeX is a binary operator. This process is described here.
Plus and minus signs
LaTeX deals with the + and − signs in two possible ways. The most common is as a binary operator. When two maths elements appear on either side of the sign, it is assumed to be a binary operator, and as such, allocates some space to either side of the sign. The alternative way is a sign designation. This is when you state whether a mathematical quantity is either positive or negative. This is common for the latter, as in math, such elements are assumed to be positive unless a − is prefixed to it. In this instance, you want the sign to appear close to the appropriate element to show their association. If you put a + or a − with nothing before it but you want it to be handled like a binary operator you can add an invisible character before the operator using Шаблон:LaTeX/LaTeX. This can be useful if you are writing multiple-line formulas, and a new line could start with a − or +, for example, then you can fix some strange alignments adding the invisible character where necessary.
A plus-minus sign is written as:
Шаблон:LaTeX/Example
Similarly, there exists also a minus-plus sign:
Шаблон:LaTeX/Example
Controlling horizontal spacing
LaTeX is obviously pretty good at typesetting maths—it was one of the chief aims of the core TeX system that LaTeX extends. However, it can't always be relied upon to accurately interpret formulas in the way you did. It has to make certain assumptions when there are ambiguous expressions. The result tends to be slightly incorrect horizontal spacing. In these events, the output is still satisfactory, yet any perfectionists will no doubt wish to fine-tune their formulas to ensure spacing is correct. These are generally very subtle adjustments.
There are other occasions where LaTeX has done its job correctly, but you just want to add some space, maybe to add a comment of some kind. For example, in the following equation, it is preferable to ensure there is a decent amount of space between the maths and the text.
This code produces errors with Miktex 2.9 and does not yield the results seen on the right.
Use \mathrm instead of just \text.
(Note that this particular example can be expressed in more elegant code by the Шаблон:LaTeX/Environment construct provided by the Шаблон:LaTeX/Package package described in Advanced Mathematics chapter.)
LaTeX has defined two commands that can be used anywhere in documents (not just maths) to insert some horizontal space. They are Шаблон:LaTeX/LaTeX and Шаблон:LaTeX/LaTeX
A Шаблон:LaTeX/LaTeX is a space equal to the current font size. So, if you are using an 11pt font, then the space provided by Шаблон:LaTeX/LaTeX will also be 11pt (horizontally, of course.) The Шаблон:LaTeX/LaTeX gives twice that amount. As you can see from the code from the above example, Шаблон:LaTeX/LaTeXs were used to add some separation between the maths and the text.
OK, so back to the fine tuning as mentioned at the beginning of the document. A good example would be displaying the simple equation for the indefinite integral of y with respect to x:
[math]\displaystyle{ \int y\, \mathrm{d}x }[/math]
If you were to try this, you may write:
However, this doesn't give the correct result. LaTeX doesn't respect the white-space left in the code to signify that the y and the dx are independent entities. Instead, it lumps them altogether. A Шаблон:LaTeX/LaTeX would clearly be overkill in this situation—what is needed are some small spaces to be utilized in this type of instance, and that's what LaTeX provides:
Command
Description
Size
Шаблон:LaTeX/LaTeX
small space
3/18 of a quad
Шаблон:LaTeX/LaTeX
medium space
4/18 of a quad
Шаблон:LaTeX/LaTeX
large space
5/18 of a quad
Шаблон:LaTeX/LaTeX
negative space
-3/18 of a quad
NB you can use more than one command in a sequence to achieve a greater space if necessary.
So, to rectify the current problem:
Шаблон:LaTeX/Example
Шаблон:LaTeX/Example
Шаблон:LaTeX/Example
The negative space may seem like an odd thing to use, however, it wouldn't be there if it didn't have some use! Take the following example:
The matrix-like expression for representing binomial coefficients is too padded. There is too much space between the brackets and the actual contents within. This can easily be corrected by adding a few negative spaces after the left bracket and before the right bracket.
In any case, adding some spaces manually should be avoided whenever possible: it makes the source code more complex and it's against the basic principles of a What You See is What You Mean approach. The best thing to do is to define some commands using all the spaces you want and then, when you use your command, you don't have to add any other space. Later, if you change your mind about the length of the horizontal space, you can easily change it modifying only the command you defined before. Let us use an example: you want the d of a dx in an integral to be in roman font and a small space away from the rest. If you want to type an integral like Шаблон:LaTeX/LaTeX, you can define a command like this:
Шаблон:LaTeX/Usage
in the preamble of your document. We have chosen Шаблон:LaTeX/LaTeX just because it reminds the "d" it replaces and it is fast to type. Doing so, the code for your integral becomes Шаблон:LaTeX/LaTeX. Now, whenever you write an integral, you just have to use the Шаблон:LaTeX/LaTeX instead of the "d", and all your integrals will have the same style. If you change your mind, you just have to change the definition in the preamble, and all your integrals will be changed accordingly.
Manually Specifying Formula Style
To manually display a fragment of a formula using text style, surround the fragment with curly braces and prefix the fragment with Шаблон:LaTeX/LaTeX. The braces are required because the Шаблон:LaTeX/LaTeX macro changes the state of the renderer, rendering all subsequent mathematics in text style. The braces limit this change of state to just the fragment enclosed within. For example, to use text style for just the summation symbol in a sum, one would enter
Шаблон:LaTeX/Usage
The same thing as a command would look like this:
Шаблон:LaTeX/Usage
Note the extra braces. Just one set around the expression won't be enough. That would cause all math after Шаблон:LaTeX/LaTeX to be displayed using text style.
To display part of a formula using display style, do the same thing, but use Шаблон:LaTeX/LaTeX instead.
Advanced Mathematics: AMS Math package
The AMS (American Mathematical Society) mathematics package is a powerful package that creates a higher layer of abstraction over mathematical LaTeX language; if you use it it will make your life easier. Some commands Шаблон:LaTeX/Package introduces will make other plain LaTeX commands obsolete: in order to keep consistency in the final output you'd better use Шаблон:LaTeX/Package commands whenever possible. If you do so, you will get an elegant output without worrying about alignment and other details, keeping your source code readable. If you want to use it, you have to add this in the preamble:
Шаблон:LaTeX/Usage
Introducing dots in formulas
Шаблон:LaTeX/Package defines also the Шаблон:LaTeX/LaTeX command, that is a generalization of the existing Шаблон:LaTeX/LaTeX. You can use Шаблон:LaTeX/LaTeX in both text and math mode and LaTeX will replace it with three dots "…" but it will decide according to the context whether to put it on the bottom (like Шаблон:LaTeX/LaTeX) or centered (like Шаблон:LaTeX/LaTeX).
Dots
LaTeX gives you several commands to insert dots (ellipses) in your formulae. This can be particularly useful if you have to type big matrices omitting elements. First of all, here are the main dots-related commands LaTeX provides:
Code
Output
Comment
Шаблон:LaTeX/LaTeX
[math]\displaystyle{ \dots }[/math]
generic dots (ellipsis), to be used in text (outside formulae as well). It automatically manages whitespaces before and after itself according to the context, it's a higher level command.
Шаблон:LaTeX/LaTeX
[math]\displaystyle{ \ldots }[/math]
the output is similar to the previous one, but there is no automatic whitespace management; it works at a lower level.
Шаблон:LaTeX/LaTeX
[math]\displaystyle{ \cdots }[/math]
These dots are centered relative to the height of a letter. There is also the binary multiplication operator, \cdot
, mentioned below.
Шаблон:LaTeX/LaTeX
[math]\displaystyle{ \vdots }[/math]
vertical dots
Шаблон:LaTeX/LaTeX
[math]\displaystyle{ \ddots }[/math]
diagonal dots
Шаблон:LaTeX/LaTeX
inverse diagonal dots (requires the Шаблон:LaTeX/Package package)
Шаблон:LaTeX/LaTeX
[math]\displaystyle{ \ldots \ldots }[/math]
to be used in matrices, it creates a row of dots spanning n columns.
Instead of using Шаблон:LaTeX/LaTeX and Шаблон:LaTeX/LaTeX, you should use the semantically oriented commands. It makes it possible to adapt your document to different conventions on the fly, in case (for example) you have to submit it to a publisher who insists on following house tradition in this respect. The default treatment for the various kinds follows American Mathematical Society conventions.
Code
Output
Comment
Шаблон:LaTeX/LaTeX
Файл:LaTeX Dotsc.png
for "dots with commas"
Шаблон:LaTeX/LaTeX
Файл:LaTeX Dotsb.png
for "dots with binary operators/relations"
Шаблон:LaTeX/LaTeX
Файл:LaTeX Dotsm.png
for "multiplication dots"
Шаблон:LaTeX/LaTeX
Файл:LaTeX Dotsi.png
for "dots with integrals"
Шаблон:LaTeX/LaTeX
Файл:LaTeX Dotso.png
for "other dots" (none of the above)
Write an equation with the align environment
How to write an equation with the align environment with the Шаблон:LaTeX/Package package is described in Advanced Mathematics.
List of mathematical symbols
All the pre-defined mathematical symbols from the \TeX\ package are listed below. More symbols are available from extra packages.
Relation Symbols
Symbol
Script
Symbol
Script
Symbol
Script
Symbol
Script
Symbol
Script
[math]\displaystyle{ \lt \, }[/math]
<
[math]\displaystyle{ \gt \, }[/math]
>
[math]\displaystyle{ =\, }[/math]
=
[math]\displaystyle{ \parallel\, }[/math]
\parallel
[math]\displaystyle{ \nparallel\, }[/math]
\nparallel
[math]\displaystyle{ \leq\, }[/math]
\leq
[math]\displaystyle{ \geq\, }[/math]
\geq
[math]\displaystyle{ \doteq\, }[/math]
\doteq
[math]\displaystyle{ \asymp\, }[/math]
\asymp
[math]\displaystyle{ \bowtie\, }[/math]
\bowtie
[math]\displaystyle{ \ll\, }[/math]
\ll
[math]\displaystyle{ \gg\, }[/math]
\gg
[math]\displaystyle{ \equiv\, }[/math]
\equiv
[math]\displaystyle{ \vdash\, }[/math]
\vdash
[math]\displaystyle{ \dashv\, }[/math]
\dashv
[math]\displaystyle{ \subset\, }[/math]
\subset
[math]\displaystyle{ \supset\, }[/math]
\supset
[math]\displaystyle{ \approx\, }[/math]
\approx
[math]\displaystyle{ \in\, }[/math]
\in
[math]\displaystyle{ \ni\, }[/math]
\ni
[math]\displaystyle{ \subseteq\, }[/math]
\subseteq
[math]\displaystyle{ \supseteq\, }[/math]
\supseteq
[math]\displaystyle{ \cong\, }[/math]
\cong
[math]\displaystyle{ \smile\, }[/math]
\smile
[math]\displaystyle{ \frown\, }[/math]
\frown
[math]\displaystyle{ \nsubseteq\, }[/math]
\nsubseteq
[math]\displaystyle{ \nsupseteq\, }[/math]
\nsupseteq
[math]\displaystyle{ \simeq\, }[/math]
\simeq
[math]\displaystyle{ \models\, }[/math]
\models
[math]\displaystyle{ \notin\, }[/math]
\notin
[math]\displaystyle{ \sqsubset\, }[/math]
\sqsubset
[math]\displaystyle{ \sqsupset\, }[/math]
\sqsupset
[math]\displaystyle{ \sim\, }[/math]
\sim
[math]\displaystyle{ \perp\, }[/math]
\perp
[math]\displaystyle{ \mid\, }[/math]
\mid
[math]\displaystyle{ \sqsubseteq\, }[/math]
\sqsubseteq
[math]\displaystyle{ \sqsupseteq\, }[/math]
\sqsupseteq
[math]\displaystyle{ \propto\, }[/math]
\propto
[math]\displaystyle{ \prec\, }[/math]
\prec
[math]\displaystyle{ \succ\, }[/math]
\succ
[math]\displaystyle{ \preceq\, }[/math]
\preceq
[math]\displaystyle{ \succeq\, }[/math]
\succeq
[math]\displaystyle{ \neq\, }[/math]
\neq
[math]\displaystyle{ \sphericalangle\, }[/math]
\sphericalangle
[math]\displaystyle{ \measuredangle\, }[/math]
\measuredangle
[math]\displaystyle{ \therefore\, }[/math]
\therefore
[math]\displaystyle{ \because\, }[/math]
\because
Binary Operations
Symbol
Script
Symbol
Script
Symbol
Script
Symbol
Script
[math]\displaystyle{ \pm\, }[/math]
\pm
[math]\displaystyle{ \cap\, }[/math]
\cap
[math]\displaystyle{ \diamond\, }[/math]
\diamond
[math]\displaystyle{ \oplus\, }[/math]
\oplus
[math]\displaystyle{ \mp\, }[/math]
\mp
[math]\displaystyle{ \cup\, }[/math]
\cup
[math]\displaystyle{ \bigtriangleup\, }[/math]
\bigtriangleup
[math]\displaystyle{ \ominus\, }[/math]
\ominus
[math]\displaystyle{ \times\, }[/math]
\times
[math]\displaystyle{ \uplus\, }[/math]
\uplus
[math]\displaystyle{ \bigtriangledown\, }[/math]
\bigtriangledown
[math]\displaystyle{ \otimes\, }[/math]
\otimes
[math]\displaystyle{ \div\, }[/math]
\div
[math]\displaystyle{ \sqcap\, }[/math]
\sqcap
[math]\displaystyle{ \triangleleft\, }[/math]
\triangleleft
[math]\displaystyle{ \oslash\, }[/math]
\oslash
[math]\displaystyle{ \ast\, }[/math]
\ast
[math]\displaystyle{ \sqcup\, }[/math]
\sqcup
[math]\displaystyle{ \triangleright\, }[/math]
\triangleright
[math]\displaystyle{ \odot\, }[/math]
\odot
[math]\displaystyle{ \star\, }[/math]
\star
[math]\displaystyle{ \vee\, }[/math]
\vee
[math]\displaystyle{ \bigcirc\, }[/math]
\bigcirc
[math]\displaystyle{ \circ\, }[/math]
\circ
[math]\displaystyle{ \dagger\, }[/math]
\dagger
[math]\displaystyle{ \wedge\, }[/math]
\wedge
[math]\displaystyle{ \bullet\, }[/math]
\bullet
[math]\displaystyle{ \setminus\, }[/math]
\setminus
[math]\displaystyle{ \ddagger\, }[/math]
\ddagger
[math]\displaystyle{ \cdot\, }[/math]
\cdot
[math]\displaystyle{ \wr\, }[/math]
\wr
[math]\displaystyle{ \amalg\, }[/math]
\amalg
Set and/or Logic Notation
Symbol
Script
Symbol
Script
[math]\displaystyle{ \exists\, }[/math]
\exists
[math]\displaystyle{ \rightarrow\, }[/math]
\rightarrow
or \to
[math]\displaystyle{ \nexists\, }[/math]
\nexists
[math]\displaystyle{ \leftarrow\, }[/math]
\leftarrow
or \gets
[math]\displaystyle{ \forall\, }[/math]
\forall
[math]\displaystyle{ \mapsto\, }[/math]
\mapsto
[math]\displaystyle{ \neg\, }[/math]
\neg
[math]\displaystyle{ \implies\, }[/math]
\implies
[math]\displaystyle{ \subset\, }[/math]
\subset
⟸
\impliedby
[math]\displaystyle{ \supset\, }[/math]
\supset
[math]\displaystyle{ \Rightarrow\, }[/math]
\Rightarrow
or \implies
[math]\displaystyle{ \in }[/math]
\in
[math]\displaystyle{ \leftrightarrow\, }[/math]
\leftrightarrow
[math]\displaystyle{ \notin\, }[/math]
\notin
[math]\displaystyle{ \iff\, }[/math]
\iff
[math]\displaystyle{ \ni\, }[/math]
\ni
[math]\displaystyle{ \Leftrightarrow\, }[/math]
\Leftrightarrow
(preferred for equivalence (iff))
[math]\displaystyle{ \land\, }[/math]
\land
[math]\displaystyle{ \top\, }[/math]
\top
[math]\displaystyle{ \lor\, }[/math]
\lor
[math]\displaystyle{ \bot\, }[/math]
\bot
[math]\displaystyle{ \angle\, }[/math]
\angle
[math]\displaystyle{ \emptyset\, }[/math] and [math]\displaystyle{ \varnothing\, }[/math]
\emptyset
and \varnothing
Шаблон:Ref
[math]\displaystyle{ \rightleftharpoons\, }[/math]
\rightleftharpoons
Delimiters
Symbol
Script
Symbol
Script
Symbol
Script
Symbol
Script
[math]\displaystyle{ |\, }[/math]
|
or \mid
(difference in spacing)
[math]\displaystyle{ \|\, }[/math]
\|
[math]\displaystyle{ /\, }[/math]
/
[math]\displaystyle{ \backslash\, }[/math]
\backslash
[math]\displaystyle{ \{\, }[/math]
\{
[math]\displaystyle{ \}\, }[/math]
\}
[math]\displaystyle{ \langle\, }[/math]
\langle
[math]\displaystyle{ \rangle\, }[/math]
\rangle
[math]\displaystyle{ \uparrow\, }[/math]
\uparrow
[math]\displaystyle{ \Uparrow\, }[/math]
\Uparrow
[math]\displaystyle{ \lceil\, }[/math]
\lceil
[math]\displaystyle{ \rceil\, }[/math]
\rceil
[math]\displaystyle{ \downarrow\, }[/math]
\downarrow
[math]\displaystyle{ \Downarrow\, }[/math]
\Downarrow
[math]\displaystyle{ \lfloor\, }[/math]
\lfloor
[math]\displaystyle{ \rfloor\, }[/math]
\rfloor
Note: To use the Greek Letters in LaTeX that have the same appearance in the Latin alphabet, just use Latin: e.g., A instead of Alpha, B instead of Beta, etc.
Greek Letters
Symbol
Script
Symbol
Script
[math]\displaystyle{ \Alpha\, }[/math] and [math]\displaystyle{ \alpha\, }[/math]
A
and \alpha
[math]\displaystyle{ \Nu\, }[/math] and [math]\displaystyle{ \nu\, }[/math]
N
and \nu
[math]\displaystyle{ \Beta\, }[/math] and [math]\displaystyle{ \beta\, }[/math]
B
and \beta
[math]\displaystyle{ \Xi\, }[/math] and [math]\displaystyle{ \xi\, }[/math]
\Xi
and \xi
[math]\displaystyle{ \Gamma\, }[/math] and [math]\displaystyle{ \gamma\, }[/math]
\Gamma
and \gamma
[math]\displaystyle{ \Omicron\, }[/math] and [math]\displaystyle{ \omicron\, }[/math]
O
and o
[math]\displaystyle{ \Delta\, }[/math] and [math]\displaystyle{ \delta\, }[/math]
\Delta
and \delta
[math]\displaystyle{ \Pi\, }[/math], [math]\displaystyle{ \pi\, }[/math] and [math]\displaystyle{ \varpi }[/math]
\Pi
, \pi
and \varpi
[math]\displaystyle{ \Epsilon\, }[/math], [math]\displaystyle{ \epsilon\, }[/math] and [math]\displaystyle{ \varepsilon\, }[/math]
E
, \epsilon
and \varepsilon
[math]\displaystyle{ \Rho\, }[/math], [math]\displaystyle{ \rho\, }[/math] and [math]\displaystyle{ \varrho\, }[/math]
P
, \rho
and \varrho
[math]\displaystyle{ \Zeta\, }[/math] and [math]\displaystyle{ \zeta\, }[/math]
Z
and \zeta
[math]\displaystyle{ \Sigma\, }[/math], [math]\displaystyle{ \sigma\, }[/math] and [math]\displaystyle{ \varsigma\, }[/math]
\Sigma
, \sigma
and \varsigma
[math]\displaystyle{ \Eta\, }[/math] and [math]\displaystyle{ \eta\, }[/math]
H
and \eta
[math]\displaystyle{ \Tau\, }[/math] and [math]\displaystyle{ \tau\, }[/math]
T
and \tau
[math]\displaystyle{ \Theta\, }[/math], [math]\displaystyle{ \theta\, }[/math] and [math]\displaystyle{ \vartheta\, }[/math]
\Theta
, \theta
and \vartheta
[math]\displaystyle{ \Upsilon\, }[/math] and [math]\displaystyle{ \upsilon\, }[/math]
\Upsilon
and \upsilon
[math]\displaystyle{ \Iota\, }[/math] and [math]\displaystyle{ \iota\, }[/math]
I
and \iota
[math]\displaystyle{ \Phi\, }[/math], [math]\displaystyle{ \phi\, }[/math], and [math]\displaystyle{ \varphi\, }[/math]
\Phi
, \phi
and \varphi
[math]\displaystyle{ \Kappa\, }[/math], [math]\displaystyle{ \kappa\, }[/math] and [math]\displaystyle{ \varkappa\, }[/math]
K
, \kappa
and \varkappa
[math]\displaystyle{ \Chi\, }[/math] and [math]\displaystyle{ \chi\, }[/math]
X
and \chi
[math]\displaystyle{ \Lambda\, }[/math] and [math]\displaystyle{ \lambda\, }[/math]
\Lambda
and \lambda
[math]\displaystyle{ \Psi\, }[/math] and [math]\displaystyle{ \psi\, }[/math]
\Psi
and \psi
[math]\displaystyle{ \Mu\, }[/math] and [math]\displaystyle{ \mu\, }[/math]
M
and \mu
[math]\displaystyle{ \Omega\, }[/math] and [math]\displaystyle{ \omega\, }[/math]
\Omega
and \omega
Other symbols
Symbol
Script
Symbol
Script
Symbol
Script
Symbol
Script
Symbol
Script
[math]\displaystyle{ \partial\, }[/math]
\partial
[math]\displaystyle{ \imath\, }[/math]
\imath
[math]\displaystyle{ \Re\, }[/math]
\Re
[math]\displaystyle{ \nabla\, }[/math]
\nabla
[math]\displaystyle{ \aleph\, }[/math]
\aleph
[math]\displaystyle{ \eth\, }[/math]
\eth
[math]\displaystyle{ \jmath\, }[/math]
\jmath
[math]\displaystyle{ \Im\, }[/math]
\Im
[math]\displaystyle{ \Box\, }[/math]
\Box
[math]\displaystyle{ \beth\, }[/math]
\beth
[math]\displaystyle{ \hbar\, }[/math]
\hbar
[math]\displaystyle{ \ell\, }[/math]
\ell
[math]\displaystyle{ \wp\, }[/math]
\wp
[math]\displaystyle{ \infty\, }[/math]
\infty
[math]\displaystyle{ \gimel\, }[/math]
\gimel
Шаблон:NoteNot predefined in LATEX 2. Use one of the packages latexsym, amsfonts, amssymb, txfonts, pxfonts, or wasysym
Trigonometric Functions
Symbol
Script
Symbol
Script
Symbol
Script
Symbol
Script
[math]\displaystyle{ \sin\, }[/math]
\sin
[math]\displaystyle{ \arcsin\, }[/math]
\arcsin
[math]\displaystyle{ \sinh\, }[/math]
\sinh
[math]\displaystyle{ \sec\, }[/math]
\sec
[math]\displaystyle{ \cos\, }[/math]
\cos
[math]\displaystyle{ \arccos\, }[/math]
\arccos
[math]\displaystyle{ \cosh\, }[/math]
\cosh
[math]\displaystyle{ \csc\, }[/math]
\csc
[math]\displaystyle{ \tan\, }[/math]
\tan
[math]\displaystyle{ \arctan\, }[/math]
\arctan
[math]\displaystyle{ \tanh\, }[/math]
\tanh
[math]\displaystyle{ \cot\, }[/math]
\cot
[math]\displaystyle{ \arccot\, }[/math]
\arccot
[math]\displaystyle{ \coth\, }[/math]
\coth
If LaTeX does not include a command for the mathematical operator you want to use, for example \cis
(cosine plus i times sine), add to your preamble:
\DeclareMathOperator\cis{cis}
You can then use \cis
in the document just like \cos
or any other mathematical operator.
Summary
As you begin to see, typesetting math can be tricky at times. However, because LaTeX provides so much control, you can get professional quality mathematics typesetting with relatively little effort (once you've had a bit of practice, of course!). It would be possible to keep going and going with math topics because it seems potentially limitless. However, with this tutorial, you should be able to get along sufficiently.
Notes
<references/>
Further reading
- meta:Help:Displaying a formula: Wikimedia uses a subset of LaTeX commands.
External links
- detexify: applet for looking up LaTeX symbols by drawing them
- amsmath documentation
- LaTeX - The Student Room
- The Comprehensive LaTeX Symbol List
- MathLex - LaTeX math translator and equation builder
Математическое окружение
Системе LaTeX необходимо сообщить, когда текст, который вы вводите, является математической формулой. Это необходимо из-за того, что LaTeX набирает математическую нотацию иначе, чем обычный текст. Поэтому для данной цели объявлены специальные окружения. Их можно разделить на две категории в зависимости от того, как они представлены:
- text - текст формулы отображается прямо в строке, внутри текста, где он объявлен. Например, я могу написать формулу [math]\displaystyle{ a + a = 2a }[/math] прямо в этом предложении.
- displayed - для отображения формулы в отдельной строке.
Поскольку математические формулы требуют особых окружений, естественно, есть их соответствующие названия, которые вы можете использовать стандартным способом. Однако, в отличие от большинства других окружений, есть удобные сокращения для объявления ваших формул. Следующая таблица объединяет информацию о них:
Тип
Встроенная (в текст) формула
Выключенная (на отдельной строке) формула
Выключенная формула с автонумерацией
Окружение
Шаблон:LaTeX/LaTeX
Шаблон:LaTeX/LaTeX
Шаблон:LaTeX/LaTeX
Сокращение LaTeX
Шаблон:LaTeX/LaTeX
Шаблон:LaTeX/LaTeX
Сокращение TeX
Шаблон:LaTeX/LaTeX
Шаблон:LaTeX/LaTeX
Комментарий
Шаблон:LaTeX/LaTeX (версия со звездочкой) убирает нумерацию, но требует использования amsmath
Внимание: Следует избегать использования Шаблон:LaTeX/LaTeX , так как это может вызывать проблемы, особнно с макросами AMS-LaTeX. Кроме того, в случае возникновения проблем сообщения об ошибках могут оказаться бесполезными.
Окружения Шаблон:LaTeX/LaTeX и Шаблон:LaTeX/LaTeX являются функционально эквивалентными.
Если вы набираете текст в обычном режиме, говорят, что вы находитесь в текстовом режиме, но когда вы печатаете в одной из этих математических сред, вы, как говорят, находитесь в математическом режиме, который имеет некоторые отличия от текстового режима:
- Большинство пробелов и разрывов строк не имеют никакого значения, поскольку все пробелы либо получены логически из математических выражений, либо должны быть указаны с помощью специальных команд, таких как Шаблон:LaTeX/LaTeX
- Пустые строки не допускаются. Только один абзац на формулу.
- Каждая буква считается именем переменной и будет набрана как таковая. Если вы хотите набрать обычный текст в формуле (обычный вертикальный шрифт и нормальный интервал), вам необходимо ввести текст с помощью специальных команд.
Вставка "выключенных" математических формул внутри блоков текста
Чтобы некоторые операторы, такие как Шаблон:LaTeX/LaTeX или Шаблон:LaTeX/LaTeX , правильно отображались в некоторых математических окружениях (имеется ввидуШаблон:LaTeX/LaTeX), может быть удобно написать класс Шаблон:LaTeX/LaTeX внутри окружения. Это может увеличить длину строки, но приведет к более правильному отображению показателей и индексов для некоторых математических операторов. Например, Шаблон:LaTeX/LaTeX напечатает маленькую Σ аШаблон:LaTeX/LaTeX напечатает большую [math]\displaystyle{ \displaystyle \sum }[/math], как в уравнениях (Работает только при включенном пакете AMSMATH). Можно принудительно настроить такое поведение для всех математических сред, объявив Шаблон:LaTeX/LaTeX в самом начале (т.е. до Шаблон:LaTeX/LaTeX).
Математические символы
В математике существует достаточно много различных символов! Ниже приведены те, к которым можно получить доступ прямо с клавиатуры:
+ - = ! / ( ) [ ] < > | ' : *
Помимо тех, что перечислены выше, для ввода некоторых символов могут потребоваться отдельные команды. Это требуется, например, для ввода греческих букв, символов множества и отношений, стреклок, бинарных операторов, и т.д.
Для примера:
К счастью, есть инструмент, который может значительно упростить поиск команды для определенного символа. Найдите "Detexify" в разделе external links ниже. Другой вариант - посмотреть "Полный список символов LaTeX" в разделе external links ниже.
Греческие буквы
Греческие буквы довольно часто используются в математике, но их достаточно просто набирать в математическом режиме. Вам просто нужно ввести название буквы после обратной косой черты: если первая буква названия строчная, вы получите строчную греческую букву, если первая буква названия заглавная (только первая буква), тогда вы получите прописную букву. Обратите внимание, что некоторые заглавные греческие буквы выглядят как латинские, поэтому они не предоставляются LaTeX (например, заглавные буквы Alpha и Beta это просто латинские "A" и "B" соответственно).
Строчные буквы эпсилон, тета, каппа, фи, пи, ро и сигма представлены в двух разных версиях. Строчные буквы эпсилон, тета, каппа, фи, пи, ро и сигма представлены в двух разных версиях. Альтернативная (variant сокр. var) версия, создается добавлением "var" перед названием буквы:
Прокрутите вниз до #List of mathematical symbols чтобы увидеть полный список греческих символов.
Математические операторы
Оператор - это функция, которая записывается с помощью слова: например, тригонометрические функции (sin, cos, tan), логарифмы и экспоненты (log, exp), пределы (lim), а также след и определитель (tr, det). В LaTeX многие из них определены как команды:
Шаблон:LaTeX/Example
Для некоторых операторов, таких как Предел, нижний индекс помещается под оператором:
Шаблон:LaTeX/Example
Для оператора Сравнения по модулю существует две команды: Шаблон:LaTeX/LaTeX и Шаблон:LaTeX/LaTeX:
Шаблон:LaTeX/Example
Шаблон:LaTeX/Example
Чтобы использовать операторы, которые не определены заранее, например argmax, см. [[../Высшая математика#Определяемые операторы|определяемые операторы]]
Степени и индексы
Степени и индексы эквивалентны верхним и нижним индексам в обычном текстовом режиме. Символ каретки (^
; так же известный как циркумфлекс) используется чтобы что-то поднять, а нижнее подчёркивание (_
) для опускания. Если необходимо повысить или понизить выражение, содержащее больше одного символа, его необходимо сгруппировать с помощью фигурных скобок ({
и }
).
Шаблон:LaTeX/Example
Для степеней, состоящих из более чем одной цифры, заключите степень в {}.
Шаблон:LaTeX/Example
Подчёркивание (_
) может использоваться с вертикальной чертой ([math]\displaystyle{ | }[/math]) при использовании выражения в качестве нижнего индекса (это предложение требует уточнения):
Дроби и биномы
Дроби создаются с помощью команды Шаблон:LaTeX/LaTeX. Так же и Биномиальный коэффициент можно записать используя команду Шаблон:LaTeX/LaTeX:
Шаблон:LaTeX/Example
Дроби можно помещать одну внутри другой:
Шаблон:LaTeX/Example
Так же обратите внимание, что при встраивании дробей в строку текста или записи одной дроби внутри другой, [math]\displaystyle{ \tfrac{a}{b} }[/math], их отображаемый размер должен быть заметно меньше, чем в выключенной формуле. Команды Шаблон:LaTeX/LaTeX и Шаблон:LaTeX/LaTeX позволяют использовать стиль записи соотвествующий использованию Шаблон:LaTeX/LaTeX и Шаблон:LaTeX/LaTeX. Точно так же работают команды Шаблон:LaTeX/LaTeX и Шаблон:LaTeX/LaTeX, записывающие биноминальный коэффициент.
Для относительно простых дробей, особенно внутри текста, может быть более эстетично использовать Степени и индексы:
Шаблон:LaTeX/Example
Данная запись может показаться немного "растянутой" (занимающей много места), сжатую версию можно определить, вставив некоторое отрицательное пространство. Шаблон:LaTeX/Example
Если вам необходимо часто использовать подобную запись дробей в своём документе, рекомендуем использовать пакет xfrac.
Данный пакет поддерживает команду Шаблон:LaTeX/LaTeX для создания наклонных дробей.
Использование:
Шаблон:LaTeX/Example
Если в качестве показателя степени используются дроби, необходимо использовать фигурные скобки вокруг команды Шаблон:LaTeX/LaTeX:
$x^\frac{1}{2}$ % no error
$x^\sfrac{1}{2}$ % error
$x^{\sfrac{1}{2}}$ % no error
В некоторых случаях добавление только данного пакета может привести к ошибкам о том, что определённые формы шрифтов недоступны. Тогда необходимо так же добавить пакеты lmodern и fix-cm.
В качестве альтернативы, пакет Шаблон:LaTeX/Package предоставляет команду Шаблон:LaTeX/LaTeX использование которой аналогично использованию Шаблон:LaTeX/LaTeX.
Непрерывные дроби
Непрерывные дроби следует записывать с помощью команды Шаблон:LaTeX/LaTeX:
Шаблон:LaTeX/Example
Умножение двух чисел
Чтобы сделать умножение визуально похожим на дробь, можно использовать вложенный массив, например, умножение чисел, написанных одно под другим..
Шаблон:LaTeX/Example
Корни
Команда Шаблон:LaTeX/LaTeX создаёт символ квадратного корня, окружающий математическое выражение. Он принимает необязательный аргумент в квадратных скобках ([
и ]
) для изменения показателя (степени) корня:
Шаблон:LaTeX/Example
Шаблон:LaTeX/Example
Some people prefer writing the square root "closing" it over its content. This method arguably makes it more clear what is in the scope of the root sign. This habit is not normally used while writing with the computer, but if you still want to change the output of the square root, LaTeX gives you this possibility. Just add the following code in the preamble of your document:
Шаблон:LaTeX/Example
This TeX code first renames the Шаблон:LaTeX/LaTeX command as Шаблон:LaTeX/LaTeX, then redefines Шаблон:LaTeX/LaTeX in terms of the old one, adding something more. The new square root can be seen in the picture on the left, compared to the old one on the right. Unfortunately this code won't work if you want to use multiple roots: if you try to write [math]\displaystyle{ \sqrt[b]{a} }[/math] as Шаблон:LaTeX/LaTeX after you used the code above, you'll just get a wrong output. In other words, you can redefine the square root this way only if you are not going to use multiple roots in the whole document.
An alternative piece of TeX code that does allow multiple roots is
Шаблон:LaTeX/Example
However this requires the Шаблон:LaTeX/LaTeX package
Sums and integrals
The Шаблон:LaTeX/LaTeX and Шаблон:LaTeX/LaTeX commands insert the sum and integral symbols respectively, with limits specified using the caret (^
) and underscore (_
). The typical notation for sums is:
Шаблон:LaTeX/Example
or
Шаблон:LaTeX/Example
The limits for the integrals follow the same notation. It's also important to represent the integration variables with an upright d, which in math mode is obtained through the \mathrm{} command, and with a small space separating it from the integrand, which is attained with the \, command.
Шаблон:LaTeX/Example
There are many other "big" commands which operate in a similar manner:
\sum
[math]\displaystyle{ \sum \, }[/math]
\prod
[math]\displaystyle{ \prod }[/math]
\coprod
[math]\displaystyle{ \coprod }[/math]
\bigoplus
[math]\displaystyle{ \bigoplus }[/math]
\bigotimes
[math]\displaystyle{ \bigotimes }[/math]
\bigodot
[math]\displaystyle{ \bigodot }[/math]
\bigcup
[math]\displaystyle{ \bigcup }[/math]
\bigcap
[math]\displaystyle{ \bigcap }[/math]
\biguplus
[math]\displaystyle{ \biguplus }[/math]
\bigsqcup
[math]\displaystyle{ \bigsqcup }[/math]
\bigvee
[math]\displaystyle{ \bigvee }[/math]
\bigwedge
[math]\displaystyle{ \bigwedge }[/math]
\int
[math]\displaystyle{ \int }[/math]
\oint
[math]\displaystyle{ \oint }[/math]
\iint
<ref name="amsmath"/>
[math]\displaystyle{ \iint }[/math]
\iiint
<ref name="amsmath"/>
[math]\displaystyle{ \iiint }[/math]
\iiiint
<ref name="amsmath"/>
[math]\displaystyle{ \iiiint }[/math]
\idotsint
<ref name="amsmath"/>
[math]\displaystyle{ \int \! \cdots \! \int }[/math]
For more integral symbols, including those not included by default in the Computer Modern font, try the Шаблон:LaTeX/Package package.
The Шаблон:LaTeX/LaTeX command<ref name="amsmath"/> allows the use of Шаблон:LaTeX/LaTeX to write the limits over multiple lines:
Шаблон:LaTeX/Example
If you want the limits of an integral to be specified above and below the symbol (like the sum), use the Шаблон:LaTeX/LaTeX command:
Шаблон:LaTeX/Example
However if you want this to apply to ALL integrals, it is preferable to specify the Шаблон:LaTeX/Parameter option when loading the Шаблон:LaTeX/Package package:
Шаблон:LaTeX/Usage
Subscripts and superscripts in other contexts as well as other parameters to Шаблон:LaTeX/Package package related to them are described in Advanced Mathematics chapter.
For bigger integrals, you may use personal declarations, or the Шаблон:LaTeX/Package package <ref name=LM> http://hdl.handle.net/2268/6219</ref>.
Brackets, braces and delimiters
How to use braces in multi line equations is described in the Advanced Mathematics chapter.
The use of delimiters such as brackets soon becomes important when dealing with anything but the most trivial equations. Without them, formulas can become ambiguous. Also, special types of mathematical structures, such as matrices, typically rely on delimiters to enclose them.
There are a variety of delimiters available for use in LaTeX:
Шаблон:LaTeX/Example
where Шаблон:LaTeX/LaTeX and Шаблон:LaTeX/LaTeX may be used in place of [ and ].
Automatic sizing
Very often mathematical features will differ in size, in which case the delimiters surrounding the expression should vary accordingly. This can be done automatically using the Шаблон:LaTeX/LaTeX, Шаблон:LaTeX/LaTeX, and Шаблон:LaTeX/LaTeX commands. Any of the previous delimiters may be used in combination with these:
Шаблон:LaTeX/Example
Шаблон:LaTeX/Example
Curly braces are defined differently by using Шаблон:LaTeX/LaTeX and Шаблон:LaTeX/LaTeX,
If a delimiter on only one side of an expression is required, then an invisible delimiter on the other side may be denoted using a period (.
).
Шаблон:LaTeX/Example
Manual sizing
In certain cases, the sizing produced by the Шаблон:LaTeX/LaTeX and Шаблон:LaTeX/LaTeX commands may not be desirable, or you may simply want finer control over the delimiter sizes. In this case, the Шаблон:LaTeX/LaTeX, Шаблон:LaTeX/LaTeX, Шаблон:LaTeX/LaTeX and Шаблон:LaTeX/LaTeX modifier commands may be used:
Шаблон:LaTeX/Example
These commands are primarily useful when dealing with nested delimiters. For example, when typesetting
Шаблон:LaTeX/Example
we notice that the Шаблон:LaTeX/LaTeX and Шаблон:LaTeX/LaTeX commands produce the same size delimiters as those nested within it. This can be difficult to read. To fix this, we write
Шаблон:LaTeX/Example
Manual sizing can also be useful when an equation is too large, trails off the end of the page, and must be separated into two lines using an align command. Although the commands Шаблон:LaTeX/LaTeX and Шаблон:LaTeX/LaTeX can be used to balance the delimiters on each line, this may lead to wrong delimiter sizes. Furthermore, manual sizing can be used to avoid overly large delimiters if an Шаблон:LaTeX/LaTeX or a similar command appears between the delimiters.
Matrices and arrays
A basic matrix may be created using the Шаблон:LaTeX/Environment environment<ref name="amsmath">requires the Шаблон:LaTeX/Package package</ref>: in common with other table-like structures, entries are specified by row, with columns separated using an ampersand (Шаблон:LaTeX/LaTeX) and a new rows separated with a double backslash (Шаблон:LaTeX/LaTeX)
Шаблон:LaTeX/Example
To specify alignment of columns in the table, use starred version<ref name="mathtools">requires the Шаблон:LaTeX/Package package</ref>:
Шаблон:LaTeX/Example
The alignment by default is Шаблон:LaTeX/Parameter but it can be any column type valid in Шаблон:LaTeX/Environment environment.
However matrices are usually enclosed in delimiters of some kind, and while it is possible to use the \left
and \right
commands, there are various other predefined environments which automatically include delimiters:
Environment name
Surrounding delimiter
Notes
Шаблон:LaTeX/Environment<ref name="amsmath"/>
[math]\displaystyle{ ( \, ) }[/math]
centers columns by default
Шаблон:LaTeX/Environment<ref name="mathtools"/>
[math]\displaystyle{ ( \, ) }[/math]
allows to specify alignment of columns in optional parameter
Шаблон:LaTeX/Environment<ref name="amsmath"/>
[math]\displaystyle{ [ \, ] }[/math]
centers columns by default
Шаблон:LaTeX/Environment<ref name="mathtools"/>
[math]\displaystyle{ [ \, ] }[/math]
allows to specify alignment of columns in optional parameter
Шаблон:LaTeX/Environment<ref name="amsmath"/>
[math]\displaystyle{ \{ \, \} }[/math]
centers columns by default
Шаблон:LaTeX/Environment<ref name="mathtools"/>
[math]\displaystyle{ \{ \, \} }[/math]
allows to specify alignment of columns in optional parameter
Шаблон:LaTeX/Environment<ref name="amsmath"/>
[math]\displaystyle{ | \, | }[/math]
centers columns by default
Шаблон:LaTeX/Environment<ref name="mathtools"/>
[math]\displaystyle{ | \, | }[/math]
allows to specify alignment of columns in optional parameter
Шаблон:LaTeX/Environment<ref name="amsmath"/>
[math]\displaystyle{ \| \, \| }[/math]
centers columns by default
Шаблон:LaTeX/Environment<ref name="mathtools"/>
[math]\displaystyle{ \| \, \| }[/math]
allows to specify alignment of columns in optional parameter
When writing down arbitrary sized matrices, it is common to use horizontal, vertical and diagonal triplets of dots (known as ellipses) to fill in certain columns and rows. These can be specified using the Шаблон:LaTeX/LaTeX, Шаблон:LaTeX/LaTeX and Шаблон:LaTeX/LaTeX respectively:
Шаблон:LaTeX/Example
In some cases you may want to have finer control of the alignment within each column, or want to insert lines between columns or rows. This can be achieved using the Шаблон:LaTeX/Environment environment, which is essentially a math-mode version of the [[../Tables#The tabular environment|tabular
environment]], which requires that the columns be pre-specified:
Шаблон:LaTeX/Example
You may see that the AMS matrix class of environments doesn't leave enough space when used together with fractions resulting in output similar to this:
[math]\displaystyle{
M = \begin{bmatrix}
\frac{5}{6} & \frac{1}{6} & 0\\
\frac{5}{6} & 0 & \frac{1}{6}\\
0 & \frac{5}{6} & \frac{1}{6}
\end{bmatrix}
}[/math]
To counteract this problem, add additional leading space with the optional parameter to the Шаблон:LaTeX/LaTeX command:
If you need "border" or "indexes" on your matrix, plain TeX provides the macro Шаблон:LaTeX/LaTeX
Шаблон:LaTeX/Example
Matrices in running text
To insert a small matrix, and not increase leading in the line containing it, use Шаблон:LaTeX/Environment environment:
Adding text to equations
The math environment differs from the text environment in the representation of text. Here is an example of trying to represent text within the math environment:
Шаблон:LaTeX/Example
There are two noticeable problems: there are no spaces between words or numbers, and the letters are italicized and more spaced out than normal. Both issues are simply artifacts of the maths mode, in that it treats it as a mathematical expression: spaces are ignored (LaTeX spaces mathematics according to its own rules), and each character is a separate element (so are not positioned as closely as normal text).
There are a number of ways that text can be added properly. The typical way is to wrap the text with the Шаблон:LaTeX/LaTeX command <ref name="amsmath"/> (a similar command is Шаблон:LaTeX/LaTeX, though this causes problems with subscripts, and has a less descriptive name). Let's see what happens when the above equation code is adapted:
Шаблон:LaTeX/Example
The text looks better. However, there are no gaps between the numbers and the words. Unfortunately, you are required to explicitly add these. There are many ways to add spaces between maths elements, but for the sake of simplicity we may simply insert space characters into the Шаблон:LaTeX/LaTeX commands.
Шаблон:LaTeX/Example
Formatted text
Using the Шаблон:LaTeX/LaTeX is fine and gets the basic result. Yet, there is an alternative that offers a little more flexibility. You may recall the introduction of font formatting commands, such as Шаблон:LaTeX/LaTeX, Шаблон:LaTeX/LaTeX, Шаблон:LaTeX/LaTeX, etc. These commands format the argument accordingly, e.g., Шаблон:LaTeX/LaTeX gives bold text. These commands are equally valid within a maths environment to include text. The added benefit here is that you can have better control over the font formatting, rather than the standard text achieved with Шаблон:LaTeX/LaTeX.
Formatting mathematics symbols
We can now format text; what about formatting mathematical expressions? There are a set of formatting commands very similar to the font formatting ones just used, except that they are specifically aimed at text in math mode (requires Шаблон:LaTeX/Package)
LaTeX command
Sample
Description
Common use
Шаблон:LaTeX/LaTeX
(or simply omit any command)
[math]\displaystyle{ ABCDEF~abcdef~123456\, }[/math]
The default math font
Most mathematical notation
Шаблон:LaTeX/LaTeX
[math]\displaystyle{ \mathrm{ABCDEF~abcdef~123456}\, }[/math]
This is the default or normal font, unitalicised
Units of measurement, one word functions
Шаблон:LaTeX/LaTeX
[math]\displaystyle{ \mathit{ABCDEF~abcdef~123456}\, }[/math]
Italicised font
Multi-letter function or variable names. Compared to \mathnormal
, words are spaced more naturally and numbers are italicized as well.
Шаблон:LaTeX/LaTeX
[math]\displaystyle{ \mathbf{ABCDEF~abcdef~123456}\, }[/math]
Bold font
Vectors
Шаблон:LaTeX/LaTeX
[math]\displaystyle{ \mathsf{ABCDEF~abcdef~123456}\, }[/math]
Sans-serif
Categories
Шаблон:LaTeX/LaTeX
[math]\displaystyle{ \mathtt{ABCDEF~abcdef~123456}\, }[/math]
Monospace (fixed-width) font
Шаблон:LaTeX/LaTeX
[math]\displaystyle{ \mathfrak{ABCDEF~abcdef~123456}\, }[/math]
Fraktur
Almost canonical font for Lie algebras, ideals in ring theory
Шаблон:LaTeX/LaTeX
[math]\displaystyle{ \mathcal{ABCDEF}\, }[/math]
Calligraphy (uppercase only)
Often used for sheaves/schemes and categories, used to denote cryptological concepts like an alphabet of definition ([math]\displaystyle{ \mathcal{A} }[/math]), message space ([math]\displaystyle{ \mathcal{M} }[/math]), ciphertext space ([math]\displaystyle{ \mathcal{C} }[/math]) and key space ([math]\displaystyle{ \mathcal{K} }[/math]); Kleene's [math]\displaystyle{ \mathcal{O} }[/math]; naming convention in description logic; Laplace transform ([math]\displaystyle{ \mathcal{L} }[/math]) and Fourier transform ([math]\displaystyle{ \mathcal{F} }[/math])
Шаблон:LaTeX/LaTeX
(requires the Шаблон:LaTeX/Package or Шаблон:LaTeX/Package package)
[math]\displaystyle{ \mathbb{ABCDEF}\, }[/math]
Blackboard bold (uppercase only)
Used to denote special sets (e.g. real numbers)
Шаблон:LaTeX/LaTeX
(requires the Шаблон:LaTeX/Package package)
Файл:Mathscr (A-F).png
Script (uppercase only)
An alternative font for categories and sheaves.
These formatting commands can be wrapped around the entire equation, and not just on the textual elements: they only format letters, numbers, and uppercase Greek, and other math commands are unaffected.
To bold lowercase Greek or other symbols use the Шаблон:LaTeX/LaTeX command<ref name="amsmath"/>; this will only work if there exists a bold version of the symbol in the current font. As a last resort there is the Шаблон:LaTeX/LaTeX command<ref name="amsmath"/> (poor man's bold): this prints multiple versions of the character slightly offset against each other.
Шаблон:LaTeX/Example
To change the size of the fonts in math mode, see [[../Advanced Mathematics#Changing font size|Changing font size]].
Accents
So what to do when you run out of symbols and fonts? Well, the next step is to use accents:
a'
or a^{\prime}
[math]\displaystyle{ a'\, }[/math]
a''
[math]\displaystyle{ a''\, }[/math]
\hat{a}
[math]\displaystyle{ \hat{a} \, }[/math]
\bar{a}
[math]\displaystyle{ \bar{a} \, }[/math]
\grave{a}
[math]\displaystyle{ \grave{a} \, }[/math]
\acute{a}
[math]\displaystyle{ \acute{a} \, }[/math]
\dot{a}
[math]\displaystyle{ \dot{a} \, }[/math]
\ddot{a}
[math]\displaystyle{ \ddot{a} \, }[/math]
\not{a}
[math]\displaystyle{ \not{a} \, }[/math]
\mathring{a}
\overrightarrow{AB}
[math]\displaystyle{ \overrightarrow{AB} \, }[/math]
\overleftarrow{AB}
[math]\displaystyle{ \overleftarrow{AB} \, }[/math]
a'''
[math]\displaystyle{ a'''\, }[/math]
a''''
[math]\displaystyle{ a''''\, }[/math]
\overline{aaa}
[math]\displaystyle{ \overline{aaa} \, }[/math]
\check{a}
[math]\displaystyle{ \check{a} \, }[/math]
\breve{a}
[math]\displaystyle{ \breve{a} \, }[/math]
\vec{a}
[math]\displaystyle{ \vec{a} \, }[/math]
\dddot{a}
<ref name="amsmath"/>
\ddddot{a}
<ref name="amsmath"/>
\widehat{AAA}
[math]\displaystyle{ \widehat{AAA} \, }[/math]
\widetilde{AAA}
[math]\displaystyle{ \widetilde{AAA} }[/math]
\stackrel\frown{AAA}
[math]\displaystyle{ \stackrel\frown{AAA} }[/math]
\tilde{a}
[math]\displaystyle{ \tilde{a} \, }[/math]
\underline{a}
[math]\displaystyle{ \underline{a} \, }[/math]
Color
The package Шаблон:LaTeX/Package, described in [[../Colors#Adding_the_color_package|Colors]], allows us to add color to our equations. For example,
Шаблон:LaTeX/Example
The only problem is that this disrupts the default Шаблон:LaTeX formatting around the Шаблон:LaTeX/LaTeX operator. To fix this, we enclose it in a Шаблон:LaTeX/LaTeX environment, since Шаблон:LaTeX/LaTeX is a binary operator. This process is described here.
Plus and minus signs
LaTeX deals with the + and − signs in two possible ways. The most common is as a binary operator. When two maths elements appear on either side of the sign, it is assumed to be a binary operator, and as such, allocates some space to either side of the sign. The alternative way is a sign designation. This is when you state whether a mathematical quantity is either positive or negative. This is common for the latter, as in math, such elements are assumed to be positive unless a − is prefixed to it. In this instance, you want the sign to appear close to the appropriate element to show their association. If you put a + or a − with nothing before it but you want it to be handled like a binary operator you can add an invisible character before the operator using Шаблон:LaTeX/LaTeX. This can be useful if you are writing multiple-line formulas, and a new line could start with a − or +, for example, then you can fix some strange alignments adding the invisible character where necessary.
A plus-minus sign is written as:
Шаблон:LaTeX/Example
Similarly, there exists also a minus-plus sign:
Шаблон:LaTeX/Example
Controlling horizontal spacing
LaTeX is obviously pretty good at typesetting maths—it was one of the chief aims of the core TeX system that LaTeX extends. However, it can't always be relied upon to accurately interpret formulas in the way you did. It has to make certain assumptions when there are ambiguous expressions. The result tends to be slightly incorrect horizontal spacing. In these events, the output is still satisfactory, yet any perfectionists will no doubt wish to fine-tune their formulas to ensure spacing is correct. These are generally very subtle adjustments.
There are other occasions where LaTeX has done its job correctly, but you just want to add some space, maybe to add a comment of some kind. For example, in the following equation, it is preferable to ensure there is a decent amount of space between the maths and the text.
This code produces errors with Miktex 2.9 and does not yield the results seen on the right.
Use \mathrm instead of just \text.
(Note that this particular example can be expressed in more elegant code by the Шаблон:LaTeX/Environment construct provided by the Шаблон:LaTeX/Package package described in Advanced Mathematics chapter.)
LaTeX has defined two commands that can be used anywhere in documents (not just maths) to insert some horizontal space. They are Шаблон:LaTeX/LaTeX and Шаблон:LaTeX/LaTeX
A Шаблон:LaTeX/LaTeX is a space equal to the current font size. So, if you are using an 11pt font, then the space provided by Шаблон:LaTeX/LaTeX will also be 11pt (horizontally, of course.) The Шаблон:LaTeX/LaTeX gives twice that amount. As you can see from the code from the above example, Шаблон:LaTeX/LaTeXs were used to add some separation between the maths and the text.
OK, so back to the fine tuning as mentioned at the beginning of the document. A good example would be displaying the simple equation for the indefinite integral of y with respect to x:
[math]\displaystyle{ \int y\, \mathrm{d}x }[/math]
If you were to try this, you may write:
However, this doesn't give the correct result. LaTeX doesn't respect the white-space left in the code to signify that the y and the dx are independent entities. Instead, it lumps them altogether. A Шаблон:LaTeX/LaTeX would clearly be overkill in this situation—what is needed are some small spaces to be utilized in this type of instance, and that's what LaTeX provides:
Command
Description
Size
Шаблон:LaTeX/LaTeX
small space
3/18 of a quad
Шаблон:LaTeX/LaTeX
medium space
4/18 of a quad
Шаблон:LaTeX/LaTeX
large space
5/18 of a quad
Шаблон:LaTeX/LaTeX
negative space
-3/18 of a quad
NB you can use more than one command in a sequence to achieve a greater space if necessary.
So, to rectify the current problem:
Шаблон:LaTeX/Example
Шаблон:LaTeX/Example
Шаблон:LaTeX/Example
The negative space may seem like an odd thing to use, however, it wouldn't be there if it didn't have some use! Take the following example:
The matrix-like expression for representing binomial coefficients is too padded. There is too much space between the brackets and the actual contents within. This can easily be corrected by adding a few negative spaces after the left bracket and before the right bracket.
In any case, adding some spaces manually should be avoided whenever possible: it makes the source code more complex and it's against the basic principles of a What You See is What You Mean approach. The best thing to do is to define some commands using all the spaces you want and then, when you use your command, you don't have to add any other space. Later, if you change your mind about the length of the horizontal space, you can easily change it modifying only the command you defined before. Let us use an example: you want the d of a dx in an integral to be in roman font and a small space away from the rest. If you want to type an integral like Шаблон:LaTeX/LaTeX, you can define a command like this:
Шаблон:LaTeX/Usage
in the preamble of your document. We have chosen Шаблон:LaTeX/LaTeX just because it reminds the "d" it replaces and it is fast to type. Doing so, the code for your integral becomes Шаблон:LaTeX/LaTeX. Now, whenever you write an integral, you just have to use the Шаблон:LaTeX/LaTeX instead of the "d", and all your integrals will have the same style. If you change your mind, you just have to change the definition in the preamble, and all your integrals will be changed accordingly.
Manually Specifying Formula Style
To manually display a fragment of a formula using text style, surround the fragment with curly braces and prefix the fragment with Шаблон:LaTeX/LaTeX. The braces are required because the Шаблон:LaTeX/LaTeX macro changes the state of the renderer, rendering all subsequent mathematics in text style. The braces limit this change of state to just the fragment enclosed within. For example, to use text style for just the summation symbol in a sum, one would enter
Шаблон:LaTeX/Usage
The same thing as a command would look like this:
Шаблон:LaTeX/Usage
Note the extra braces. Just one set around the expression won't be enough. That would cause all math after Шаблон:LaTeX/LaTeX to be displayed using text style.
To display part of a formula using display style, do the same thing, but use Шаблон:LaTeX/LaTeX instead.
Advanced Mathematics: AMS Math package
The AMS (American Mathematical Society) mathematics package is a powerful package that creates a higher layer of abstraction over mathematical LaTeX language; if you use it it will make your life easier. Some commands Шаблон:LaTeX/Package introduces will make other plain LaTeX commands obsolete: in order to keep consistency in the final output you'd better use Шаблон:LaTeX/Package commands whenever possible. If you do so, you will get an elegant output without worrying about alignment and other details, keeping your source code readable. If you want to use it, you have to add this in the preamble:
Шаблон:LaTeX/Usage
Introducing dots in formulas
Шаблон:LaTeX/Package defines also the Шаблон:LaTeX/LaTeX command, that is a generalization of the existing Шаблон:LaTeX/LaTeX. You can use Шаблон:LaTeX/LaTeX in both text and math mode and LaTeX will replace it with three dots "…" but it will decide according to the context whether to put it on the bottom (like Шаблон:LaTeX/LaTeX) or centered (like Шаблон:LaTeX/LaTeX).
Dots
LaTeX gives you several commands to insert dots (ellipses) in your formulae. This can be particularly useful if you have to type big matrices omitting elements. First of all, here are the main dots-related commands LaTeX provides:
Code
Output
Comment
Шаблон:LaTeX/LaTeX
[math]\displaystyle{ \dots }[/math]
generic dots (ellipsis), to be used in text (outside formulae as well). It automatically manages whitespaces before and after itself according to the context, it's a higher level command.
Шаблон:LaTeX/LaTeX
[math]\displaystyle{ \ldots }[/math]
the output is similar to the previous one, but there is no automatic whitespace management; it works at a lower level.
Шаблон:LaTeX/LaTeX
[math]\displaystyle{ \cdots }[/math]
These dots are centered relative to the height of a letter. There is also the binary multiplication operator, \cdot
, mentioned below.
Шаблон:LaTeX/LaTeX
[math]\displaystyle{ \vdots }[/math]
vertical dots
Шаблон:LaTeX/LaTeX
[math]\displaystyle{ \ddots }[/math]
diagonal dots
Шаблон:LaTeX/LaTeX
inverse diagonal dots (requires the Шаблон:LaTeX/Package package)
Шаблон:LaTeX/LaTeX
[math]\displaystyle{ \ldots \ldots }[/math]
to be used in matrices, it creates a row of dots spanning n columns.
Instead of using Шаблон:LaTeX/LaTeX and Шаблон:LaTeX/LaTeX, you should use the semantically oriented commands. It makes it possible to adapt your document to different conventions on the fly, in case (for example) you have to submit it to a publisher who insists on following house tradition in this respect. The default treatment for the various kinds follows American Mathematical Society conventions.
Code
Output
Comment
Шаблон:LaTeX/LaTeX
Файл:LaTeX Dotsc.png
for "dots with commas"
Шаблон:LaTeX/LaTeX
Файл:LaTeX Dotsb.png
for "dots with binary operators/relations"
Шаблон:LaTeX/LaTeX
Файл:LaTeX Dotsm.png
for "multiplication dots"
Шаблон:LaTeX/LaTeX
Файл:LaTeX Dotsi.png
for "dots with integrals"
Шаблон:LaTeX/LaTeX
Файл:LaTeX Dotso.png
for "other dots" (none of the above)
Write an equation with the align environment
How to write an equation with the align environment with the Шаблон:LaTeX/Package package is described in Advanced Mathematics.
List of mathematical symbols
All the pre-defined mathematical symbols from the \TeX\ package are listed below. More symbols are available from extra packages.
Relation Symbols
Symbol
Script
Symbol
Script
Symbol
Script
Symbol
Script
Symbol
Script
[math]\displaystyle{ \lt \, }[/math]
<
[math]\displaystyle{ \gt \, }[/math]
>
[math]\displaystyle{ =\, }[/math]
=
[math]\displaystyle{ \parallel\, }[/math]
\parallel
[math]\displaystyle{ \nparallel\, }[/math]
\nparallel
[math]\displaystyle{ \leq\, }[/math]
\leq
[math]\displaystyle{ \geq\, }[/math]
\geq
[math]\displaystyle{ \doteq\, }[/math]
\doteq
[math]\displaystyle{ \asymp\, }[/math]
\asymp
[math]\displaystyle{ \bowtie\, }[/math]
\bowtie
[math]\displaystyle{ \ll\, }[/math]
\ll
[math]\displaystyle{ \gg\, }[/math]
\gg
[math]\displaystyle{ \equiv\, }[/math]
\equiv
[math]\displaystyle{ \vdash\, }[/math]
\vdash
[math]\displaystyle{ \dashv\, }[/math]
\dashv
[math]\displaystyle{ \subset\, }[/math]
\subset
[math]\displaystyle{ \supset\, }[/math]
\supset
[math]\displaystyle{ \approx\, }[/math]
\approx
[math]\displaystyle{ \in\, }[/math]
\in
[math]\displaystyle{ \ni\, }[/math]
\ni
[math]\displaystyle{ \subseteq\, }[/math]
\subseteq
[math]\displaystyle{ \supseteq\, }[/math]
\supseteq
[math]\displaystyle{ \cong\, }[/math]
\cong
[math]\displaystyle{ \smile\, }[/math]
\smile
[math]\displaystyle{ \frown\, }[/math]
\frown
[math]\displaystyle{ \nsubseteq\, }[/math]
\nsubseteq
[math]\displaystyle{ \nsupseteq\, }[/math]
\nsupseteq
[math]\displaystyle{ \simeq\, }[/math]
\simeq
[math]\displaystyle{ \models\, }[/math]
\models
[math]\displaystyle{ \notin\, }[/math]
\notin
[math]\displaystyle{ \sqsubset\, }[/math]
\sqsubset
[math]\displaystyle{ \sqsupset\, }[/math]
\sqsupset
[math]\displaystyle{ \sim\, }[/math]
\sim
[math]\displaystyle{ \perp\, }[/math]
\perp
[math]\displaystyle{ \mid\, }[/math]
\mid
[math]\displaystyle{ \sqsubseteq\, }[/math]
\sqsubseteq
[math]\displaystyle{ \sqsupseteq\, }[/math]
\sqsupseteq
[math]\displaystyle{ \propto\, }[/math]
\propto
[math]\displaystyle{ \prec\, }[/math]
\prec
[math]\displaystyle{ \succ\, }[/math]
\succ
[math]\displaystyle{ \preceq\, }[/math]
\preceq
[math]\displaystyle{ \succeq\, }[/math]
\succeq
[math]\displaystyle{ \neq\, }[/math]
\neq
[math]\displaystyle{ \sphericalangle\, }[/math]
\sphericalangle
[math]\displaystyle{ \measuredangle\, }[/math]
\measuredangle
[math]\displaystyle{ \therefore\, }[/math]
\therefore
[math]\displaystyle{ \because\, }[/math]
\because
Binary Operations
Symbol
Script
Symbol
Script
Symbol
Script
Symbol
Script
[math]\displaystyle{ \pm\, }[/math]
\pm
[math]\displaystyle{ \cap\, }[/math]
\cap
[math]\displaystyle{ \diamond\, }[/math]
\diamond
[math]\displaystyle{ \oplus\, }[/math]
\oplus
[math]\displaystyle{ \mp\, }[/math]
\mp
[math]\displaystyle{ \cup\, }[/math]
\cup
[math]\displaystyle{ \bigtriangleup\, }[/math]
\bigtriangleup
[math]\displaystyle{ \ominus\, }[/math]
\ominus
[math]\displaystyle{ \times\, }[/math]
\times
[math]\displaystyle{ \uplus\, }[/math]
\uplus
[math]\displaystyle{ \bigtriangledown\, }[/math]
\bigtriangledown
[math]\displaystyle{ \otimes\, }[/math]
\otimes
[math]\displaystyle{ \div\, }[/math]
\div
[math]\displaystyle{ \sqcap\, }[/math]
\sqcap
[math]\displaystyle{ \triangleleft\, }[/math]
\triangleleft
[math]\displaystyle{ \oslash\, }[/math]
\oslash
[math]\displaystyle{ \ast\, }[/math]
\ast
[math]\displaystyle{ \sqcup\, }[/math]
\sqcup
[math]\displaystyle{ \triangleright\, }[/math]
\triangleright
[math]\displaystyle{ \odot\, }[/math]
\odot
[math]\displaystyle{ \star\, }[/math]
\star
[math]\displaystyle{ \vee\, }[/math]
\vee
[math]\displaystyle{ \bigcirc\, }[/math]
\bigcirc
[math]\displaystyle{ \circ\, }[/math]
\circ
[math]\displaystyle{ \dagger\, }[/math]
\dagger
[math]\displaystyle{ \wedge\, }[/math]
\wedge
[math]\displaystyle{ \bullet\, }[/math]
\bullet
[math]\displaystyle{ \setminus\, }[/math]
\setminus
[math]\displaystyle{ \ddagger\, }[/math]
\ddagger
[math]\displaystyle{ \cdot\, }[/math]
\cdot
[math]\displaystyle{ \wr\, }[/math]
\wr
[math]\displaystyle{ \amalg\, }[/math]
\amalg
Set and/or Logic Notation
Symbol
Script
Symbol
Script
[math]\displaystyle{ \exists\, }[/math]
\exists
[math]\displaystyle{ \rightarrow\, }[/math]
\rightarrow
or \to
[math]\displaystyle{ \nexists\, }[/math]
\nexists
[math]\displaystyle{ \leftarrow\, }[/math]
\leftarrow
or \gets
[math]\displaystyle{ \forall\, }[/math]
\forall
[math]\displaystyle{ \mapsto\, }[/math]
\mapsto
[math]\displaystyle{ \neg\, }[/math]
\neg
[math]\displaystyle{ \implies\, }[/math]
\implies
[math]\displaystyle{ \subset\, }[/math]
\subset
⟸
\impliedby
[math]\displaystyle{ \supset\, }[/math]
\supset
[math]\displaystyle{ \Rightarrow\, }[/math]
\Rightarrow
or \implies
[math]\displaystyle{ \in }[/math]
\in
[math]\displaystyle{ \leftrightarrow\, }[/math]
\leftrightarrow
[math]\displaystyle{ \notin\, }[/math]
\notin
[math]\displaystyle{ \iff\, }[/math]
\iff
[math]\displaystyle{ \ni\, }[/math]
\ni
[math]\displaystyle{ \Leftrightarrow\, }[/math]
\Leftrightarrow
(preferred for equivalence (iff))
[math]\displaystyle{ \land\, }[/math]
\land
[math]\displaystyle{ \top\, }[/math]
\top
[math]\displaystyle{ \lor\, }[/math]
\lor
[math]\displaystyle{ \bot\, }[/math]
\bot
[math]\displaystyle{ \angle\, }[/math]
\angle
[math]\displaystyle{ \emptyset\, }[/math] and [math]\displaystyle{ \varnothing\, }[/math]
\emptyset
and \varnothing
Шаблон:Ref
[math]\displaystyle{ \rightleftharpoons\, }[/math]
\rightleftharpoons
Delimiters
Symbol
Script
Symbol
Script
Symbol
Script
Symbol
Script
[math]\displaystyle{ |\, }[/math]
|
or \mid
(difference in spacing)
[math]\displaystyle{ \|\, }[/math]
\|
[math]\displaystyle{ /\, }[/math]
/
[math]\displaystyle{ \backslash\, }[/math]
\backslash
[math]\displaystyle{ \{\, }[/math]
\{
[math]\displaystyle{ \}\, }[/math]
\}
[math]\displaystyle{ \langle\, }[/math]
\langle
[math]\displaystyle{ \rangle\, }[/math]
\rangle
[math]\displaystyle{ \uparrow\, }[/math]
\uparrow
[math]\displaystyle{ \Uparrow\, }[/math]
\Uparrow
[math]\displaystyle{ \lceil\, }[/math]
\lceil
[math]\displaystyle{ \rceil\, }[/math]
\rceil
[math]\displaystyle{ \downarrow\, }[/math]
\downarrow
[math]\displaystyle{ \Downarrow\, }[/math]
\Downarrow
[math]\displaystyle{ \lfloor\, }[/math]
\lfloor
[math]\displaystyle{ \rfloor\, }[/math]
\rfloor
Note: To use the Greek Letters in LaTeX that have the same appearance in the Latin alphabet, just use Latin: e.g., A instead of Alpha, B instead of Beta, etc.
Greek Letters
Symbol
Script
Symbol
Script
[math]\displaystyle{ \Alpha\, }[/math] and [math]\displaystyle{ \alpha\, }[/math]
A
and \alpha
[math]\displaystyle{ \Nu\, }[/math] and [math]\displaystyle{ \nu\, }[/math]
N
and \nu
[math]\displaystyle{ \Beta\, }[/math] and [math]\displaystyle{ \beta\, }[/math]
B
and \beta
[math]\displaystyle{ \Xi\, }[/math] and [math]\displaystyle{ \xi\, }[/math]
\Xi
and \xi
[math]\displaystyle{ \Gamma\, }[/math] and [math]\displaystyle{ \gamma\, }[/math]
\Gamma
and \gamma
[math]\displaystyle{ \Omicron\, }[/math] and [math]\displaystyle{ \omicron\, }[/math]
O
and o
[math]\displaystyle{ \Delta\, }[/math] and [math]\displaystyle{ \delta\, }[/math]
\Delta
and \delta
[math]\displaystyle{ \Pi\, }[/math], [math]\displaystyle{ \pi\, }[/math] and [math]\displaystyle{ \varpi }[/math]
\Pi
, \pi
and \varpi
[math]\displaystyle{ \Epsilon\, }[/math], [math]\displaystyle{ \epsilon\, }[/math] and [math]\displaystyle{ \varepsilon\, }[/math]
E
, \epsilon
and \varepsilon
[math]\displaystyle{ \Rho\, }[/math], [math]\displaystyle{ \rho\, }[/math] and [math]\displaystyle{ \varrho\, }[/math]
P
, \rho
and \varrho
[math]\displaystyle{ \Zeta\, }[/math] and [math]\displaystyle{ \zeta\, }[/math]
Z
and \zeta
[math]\displaystyle{ \Sigma\, }[/math], [math]\displaystyle{ \sigma\, }[/math] and [math]\displaystyle{ \varsigma\, }[/math]
\Sigma
, \sigma
and \varsigma
[math]\displaystyle{ \Eta\, }[/math] and [math]\displaystyle{ \eta\, }[/math]
H
and \eta
[math]\displaystyle{ \Tau\, }[/math] and [math]\displaystyle{ \tau\, }[/math]
T
and \tau
[math]\displaystyle{ \Theta\, }[/math], [math]\displaystyle{ \theta\, }[/math] and [math]\displaystyle{ \vartheta\, }[/math]
\Theta
, \theta
and \vartheta
[math]\displaystyle{ \Upsilon\, }[/math] and [math]\displaystyle{ \upsilon\, }[/math]
\Upsilon
and \upsilon
[math]\displaystyle{ \Iota\, }[/math] and [math]\displaystyle{ \iota\, }[/math]
I
and \iota
[math]\displaystyle{ \Phi\, }[/math], [math]\displaystyle{ \phi\, }[/math], and [math]\displaystyle{ \varphi\, }[/math]
\Phi
, \phi
and \varphi
[math]\displaystyle{ \Kappa\, }[/math], [math]\displaystyle{ \kappa\, }[/math] and [math]\displaystyle{ \varkappa\, }[/math]
K
, \kappa
and \varkappa
[math]\displaystyle{ \Chi\, }[/math] and [math]\displaystyle{ \chi\, }[/math]
X
and \chi
[math]\displaystyle{ \Lambda\, }[/math] and [math]\displaystyle{ \lambda\, }[/math]
\Lambda
and \lambda
[math]\displaystyle{ \Psi\, }[/math] and [math]\displaystyle{ \psi\, }[/math]
\Psi
and \psi
[math]\displaystyle{ \Mu\, }[/math] and [math]\displaystyle{ \mu\, }[/math]
M
and \mu
[math]\displaystyle{ \Omega\, }[/math] and [math]\displaystyle{ \omega\, }[/math]
\Omega
and \omega
Other symbols
Symbol
Script
Symbol
Script
Symbol
Script
Symbol
Script
Symbol
Script
[math]\displaystyle{ \partial\, }[/math]
\partial
[math]\displaystyle{ \imath\, }[/math]
\imath
[math]\displaystyle{ \Re\, }[/math]
\Re
[math]\displaystyle{ \nabla\, }[/math]
\nabla
[math]\displaystyle{ \aleph\, }[/math]
\aleph
[math]\displaystyle{ \eth\, }[/math]
\eth
[math]\displaystyle{ \jmath\, }[/math]
\jmath
[math]\displaystyle{ \Im\, }[/math]
\Im
[math]\displaystyle{ \Box\, }[/math]
\Box
[math]\displaystyle{ \beth\, }[/math]
\beth
[math]\displaystyle{ \hbar\, }[/math]
\hbar
[math]\displaystyle{ \ell\, }[/math]
\ell
[math]\displaystyle{ \wp\, }[/math]
\wp
[math]\displaystyle{ \infty\, }[/math]
\infty
[math]\displaystyle{ \gimel\, }[/math]
\gimel
Шаблон:NoteNot predefined in LATEX 2. Use one of the packages latexsym, amsfonts, amssymb, txfonts, pxfonts, or wasysym
Trigonometric Functions
Symbol
Script
Symbol
Script
Symbol
Script
Symbol
Script
[math]\displaystyle{ \sin\, }[/math]
\sin
[math]\displaystyle{ \arcsin\, }[/math]
\arcsin
[math]\displaystyle{ \sinh\, }[/math]
\sinh
[math]\displaystyle{ \sec\, }[/math]
\sec
[math]\displaystyle{ \cos\, }[/math]
\cos
[math]\displaystyle{ \arccos\, }[/math]
\arccos
[math]\displaystyle{ \cosh\, }[/math]
\cosh
[math]\displaystyle{ \csc\, }[/math]
\csc
[math]\displaystyle{ \tan\, }[/math]
\tan
[math]\displaystyle{ \arctan\, }[/math]
\arctan
[math]\displaystyle{ \tanh\, }[/math]
\tanh
[math]\displaystyle{ \cot\, }[/math]
\cot
[math]\displaystyle{ \arccot\, }[/math]
\arccot
[math]\displaystyle{ \coth\, }[/math]
\coth
If LaTeX does not include a command for the mathematical operator you want to use, for example \cis
(cosine plus i times sine), add to your preamble:
\DeclareMathOperator\cis{cis}
You can then use \cis
in the document just like \cos
or any other mathematical operator.
Summary
As you begin to see, typesetting math can be tricky at times. However, because LaTeX provides so much control, you can get professional quality mathematics typesetting with relatively little effort (once you've had a bit of practice, of course!). It would be possible to keep going and going with math topics because it seems potentially limitless. However, with this tutorial, you should be able to get along sufficiently.
Notes
<references/>
Further reading
- meta:Help:Displaying a formula: Wikimedia uses a subset of LaTeX commands.
External links
- detexify: applet for looking up LaTeX symbols by drawing them
- amsmath documentation
- LaTeX - The Student Room
- The Comprehensive LaTeX Symbol List
- MathLex - LaTeX math translator and equation builder
Редактирование в режиме кода (полезно если необходимы не стандартные разметки)
Для размещения подписи редактора добавьте ~~~
или подпись и время правки ~~~~
Информацию по работе с этой вики можно найти в справочном руководстве.
Инструкция для написания статей: Инструкция.
Пример страницы с определением: Определение
Пример страницы со статьей: Статья
В этой вики можно использовать формулы MathJax, пример формулы в строке: [math]\displaystyle{ x = {-b \pm \sqrt{b^2-4ac} \over 2a} }[/math]
Этой формуле соответствует код x = {-b \pm \sqrt{b^2-4ac} \over 2a}.
Некоторые полезные ресурсы
Sonys (обсуждение) 13:21, 7 декабря 2020 (MSK).