Skip to main content
Share Your Experience: Take the 2024 Developer Survey
39 votes

How to type special/accented letters in LaTeX?

Users looking to make common accents in regular text mode can do so with, for example, \'e. MWE: \documentclass[10pt]{article} \begin{document} Alfred Land\'e. \end{document} Output:
user1717828's user avatar
31 votes

How can I write the Spanish 'lím' instead of 'lim'?

You can load babel with the spanish option. It changes \lim and other math operators to their Spanish versions. \documentclass{article} \usepackage[spanish]{babel} \begin{document} $\displaystyle\...
mbert's user avatar
  • 4,216
26 votes

Which is the better way to do accents in LaTeX?

The only sane reason I can think of for giving in to your professor's preference concerns bibliographies and, specifically, bibliographies created with BibTeX and a bibliography style that sorts ...
Mico's user avatar
  • 511k
24 votes
Accepted

Really wide hat symbol

An alternative (and very simple) solution consists in using the package yhmath (which, as far as I was able to understand from its documentation, requires the amsmath package). With such a package (i....
user229745's user avatar
21 votes
Accepted

How to bring bar and \sim symbol at the same level

By all means replace \overset{\sim}{u} with \tilde{u}. Optionally, replace \overline{\rho} with \bar{\rho}. Here's a screenshot of u with various math-mode adornments. \documentclass{article} \...
Mico's user avatar
  • 511k
19 votes

Americanist Phonetic Alphabet (APA) Glottalized Plosive

This is encoded in Unicode as "Combining Comma Above" (U+0313} and with a suitable font and XeLaTeX or LuaLaTeX can be entered directly. In the example below I've made a \glottal macro to make input ...
Alan Munn's user avatar
  • 219k
19 votes

How can I write the Spanish 'lím' instead of 'lim'?

If, for some reason, you can't load the babel package with the spanish option, you could redeclare the \lim macro as follows. \documentclass{article} \usepackage{amsmath} % for \DeclareMathOperator* ...
Mico's user avatar
  • 511k
18 votes
Accepted

Can LaTeX change the behavior of core TeX commands?

Firstly \" is not a tex primitive, it is a macro defined in plain tex and also a macro with a different definition defined in latex, so it isn't that latex changes this macro it just has a different ...
David Carlisle's user avatar
18 votes
Accepted

What does `\a` do?

\a is a LaTeX core instruction for generating a letter with a diacritical mark. \a{accent}{letter} The command is intended for the case when the normal accent commands of the form \accent{letter} or \...
dexteritas's user avatar
  • 9,216
17 votes
Accepted

Double-tilde over symbol

One of these? \documentclass[12pt]{article} \usepackage[utf8]{inputenc} \usepackage{amsmath} \usepackage{calc} \usepackage{accents} \newcommand{\dbtilde}[1]{\accentset{\approx}{#1}} \newcommand{\...
Bernard's user avatar
  • 272k
14 votes

\bar vs. \overline - when to use what, semantically?

The accepted answer is great. The major practical considerations I’ve run into are when I’ve wanted to either put a bar over multiple symbols or put wide bars over two distinct adjacent symbols that ...
Davislor's user avatar
  • 44.6k
14 votes
Accepted

How to place a dot below for example: e?

Line 84 of latex/base/tuenc.def is \relax\detokenize{#2}^^a0\else#2\fi Please edit to say \if\relax\detokenize{#2}\relax^^a0\else#2\fi I'll get an update to the release this evening, sorry.
David Carlisle's user avatar
14 votes

How can I write the Spanish 'lím' instead of 'lim'?

There is no “magic rule” that allows you to type \lim to get the standard symbol and \lím to get the accent. The command \lim has its own definition that eventually produces “lim” in upright medium ...
egreg's user avatar
  • 1.1m
13 votes

Accent in letters over a Letter

\documentclass{article} \usepackage{stackengine,graphicx} \begin{document} $\ensurestackMath{\stackengine{.5pt}{\tau}{\scriptscriptstyle e-m} {O}{c}{F}{F}{S}}$ or $\ensurestackMath{\stackengine{1pt}{...
Steven B. Segletes's user avatar
13 votes

Double-tilde over symbol

A variation on my answer here: double tilde symbol under letter. Here, \tsup takes an optional argument specifying the number of symbols to overset (default 2). \documentclass{article} \usepackage{...
Steven B. Segletes's user avatar
13 votes
Accepted

Fun titles by splitting in letters (or words)

You can make the argument of \aux delimited by a space, so it operates word-by-word, rather than token-by-token (which is why it doesn't work with accented characters: they are made of multiple tokens)...
Phelype Oleinik's user avatar
12 votes

How to insert code with accents with listings?

In Brazilian portuguese, this solution worked for me \usepackage{listings} % for including code \lstset{ language=R, % R code literate= {á}{{\'a}}1 {à}{{\`a}}1 {ã}{{\~a}}1 {é}{{\'e}}1 {ê}{{\^e}}1 {...
Alessandro Corrêa's user avatar
12 votes
Accepted

How to denote the fifth derivative in Newton’s notation?

The problem is that each macro has to be defined, and there is only up to \ddddot. So I made two macros: \dddddot, and \multidots. For both of them I copied the definition of \ddddot and added dots. ...
Phelype Oleinik's user avatar
12 votes
Accepted

Engine problem? Creating dynamic diacritics using the Brill typeface

The XeTeX behavior is a combination of HarfBuzz “features” and font limitations. Unicode has something called canonical equivalence. When a certain code point sequence is said to be canonically ...
12 votes

What does `\a` do?

\a' produces the same accent as \' but is usable in tabbing and other places where \' has other meanings. It is usable with all the accent commands. Its actual definition is \def\@tabacckludge#1{\...
David Carlisle's user avatar
12 votes

How to write an equal sign above a letter

I'd like to suggest that you load the amsmath package and write \bar{\bar{I}} -- in math mode, naturally. \documentclass{article} % or some other suitable document class \usepackage{amsmath} \begin{...
Mico's user avatar
  • 511k
11 votes
Accepted

How can I quickly type a LaTeX accent in vim?

You could just write ó and tell latex which encoding you are using, such as \usepackage[utf8]{inputenc} you do not have to use the ascii markup for accents unless you want to.
David Carlisle's user avatar
11 votes

How to put a \dot accent above a \hat accent in math mode?

First, be sure to load the amsmath package, as it provides for better positioning of stacked math accents. Second, write $\dot{\hat{E}}$ A full MWE (minimum working example): \documentclass{...
Mico's user avatar
  • 511k
11 votes

How can I get three diacritics on the same Greek letter?

You can use the character combination already provided in the font: \documentclass{article} \usepackage[greek.polytoniko,english]{babel} %\usepackage{fonttable} \DeclareRobustCommand{\...
egreg's user avatar
  • 1.1m
11 votes
Accepted

How to write a character/symbol similar to \k{A} for the character L?

It's not a “c”, but an ogonek (in Polish it means “little tail”). When you load the T1 encoding for fonts, it's already available in two forms: either at the far right of the character or centered. \...
egreg's user avatar
  • 1.1m
11 votes
Accepted

Double Bar/Overline

Although I do not fully understand the macro \widebar defined in the answer you linked to, I have managed to modify it to work for other accents (including stacked accents). Here is the code: \...
Circumscribe's user avatar
  • 10.9k
11 votes
Accepted

Width and positioning of \bar, \hat and \tilde

Here is a solution using the accents package. First, define the accent marks from scratch: \newcommand{\newbar}{\scalebox{.9}[.85]{\trimbox{0pt .55ex}{\textminus}}} \newcommand{\newtilde}{\scalebox{....
Sandy G's user avatar
  • 44.4k
10 votes
Accepted

Fine tuning diacritical marks in fonts

Complex solution This solution skips loading fontenc and uses the package newunicodechar to redefine the accented characters, in order to preserve the original accents while retaining some ...
Jonas Granholm's user avatar
10 votes
Accepted

Accent in letters over a Letter

Here are three additional possibilities. They vary in (a) the symbol used to connect "e" and "m" -- a mathematical minus sign or a simple dash -- and (b) the size of the superscript material -- \...
Mico's user avatar
  • 511k

Only top scored, non community-wiki answers of a minimum length are eligible