Tag Info

Hot answers tagged

111

To typeset accented characters inside bibliography fields for processing with BibTeX, encase them in curly braces. To list but a few accented characters: {\"a} {\^e} {\`i} {\o} {\'u} {\aa} {\c c} {\u g} {\l} {\~n} {\H o} {\v r} {\ss} The word Birkhäuser should therefore be entered as Birkh{\"a}user. Addendum: There is an obvious follow-up question to ...


39

You can type texdoc lshort in a command line (Command Prompt on Windows, Terminal on Linux/Mac OS X). Then have a look at Table 2.2 in Section 2.4.8. I'll quote it for you here.


39

Here's a new implementation of \widebar, based on \overline. It works by hacking into amsmath's accent placement, so it needs that package. Here's a comparison of \widebar (first line) and \overline (second line): I think the placement of the bars in the first line is better, except for the \sin z, where there's no difference. Note that \widebar works ...


37

Save your file as UTF-8 and put \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} \usepackage{lmodern} % load a font with all the characters in your preamble. Then you can just type the characters normally into your source file. Or, use XeLaTeX or LuaLaTeX which accepts UTF-8 input natively. In that case you need to add \usepackage{fontspec} to ...


35

You can write the macron using \=<character>; \documentclass{article} \usepackage[T1]{fontenc} \begin{document} Sankhy\=a \end{document} Just for the record, here's a table I wrote some time ago, containing (I think) all the accents provided by LaTeX (the original names were in Spanish; I used the English names I found on the web, but let me ...


29

This works: M\^^22arz Indeed TeX interprets ^^xy (where x and y are digits or abcdef) as the character having "xy (hexadecimal) ASCII code. Since the character code of " is 34, hexadecimal 22, typing \^^22 is the same as typing \". This translation happens before TeX starts to make tokens.


26

With the following setup, you can just type these characters normally, and the copy-paste text in the pdf (the OCR layer) will be correct, too. Your source .tex document should be encoded in UTF8, of course, or you could use latin1, or some other input encoding that includes the characters you desire and is listed in the inputenc documentation. % !TEX ...


22

The dotless i is available as \imath, and similarly \jmath for a dotless j: Code: \documentclass{article} \newcommand*{\I}{\imath} \newcommand*{\J}{\jmath} \begin{document} $\hat{\I}$, $\hat{\J}$ \end{document}


21

The problem comes up already with a "more minimal" example: \documentclass{article} \usepackage{amsmath} \begin{document} $\breve{\breve{a}\breve{b}}$ \end{document} which produces ! Undefined control sequence. \macc@adjust ->\dimen@ \macc@kerna \advance \dimen@ \macc@kernb \kern -\dimen@ thus showing that the ...


20

The "standard way" would be to say \UndeclareUTFcomposite[\UTFencname]{x1E47}{\d}{n} in order to use the combining character instead of the missing character at U+1E47, but unfortunately Minion Pro has nothing in slot U+0323 (COMBINING DOT BELOW). We need to go the hard way: write the following in the preamble ...


18

You can use the \skew macro: \skew{shift}{accent}{character} Specifically, I would define macros for the symbols. So they can easily be adjusted later, especially if a font change occurs. \newcommand*{\Mtilde}{\skew{5}{\tilde}{M}} \newcommand*{\That}{\skew{3}{\hat}{T}} \newcommand*{\udot}{\skew{3}{\dot}{u}} Gives in beamer:


18

If the Unicode value is known, then there is a mapping from glyph name to Unicode in glyphlist.txt that can quite easily parsed (with # as comment char) to get the hex string of the Unicode value. However this method is quite limited, because there are lots of Unicode characters without proper glyph name in this list. If the name does not care, then the ...


18

Semantically, don't use either. Use \conj, or \mean, or \variant or whatever the overline is meant to mean. Then in your preamble, do: \newcommand*\conj[1]{\bar{#1}} \newcommand*\mean[1]{\bar{#1}} Then: Your document source becomes readable: you can determine the meaning right there and then. Your document becomes more flexible: if you decide to ...


17

For bold and upright, you could use the regular text-version of \imath and \jmath, which are \i and \j: \newcommand{\ihat}{\hat{\textbf{\i}}} \newcommand{\jhat}{\hat{\textbf{\j}}} Additionally, if you want the \hat to be bold as well, then use \boldsymbol. \newcommand{\ihat}{\boldsymbol{\hat{\textbf{\i}}}} ...


17

The symbol you are looking for is widecheck and can be found in the mathabx font package. Please consult pages 10 and 16 of the mathabx user manual. The syntax is \widecheck{xyz}. Here is a minimum working example to demonstrate: \documentclass{article} \usepackage{amsmath} \usepackage{mathabx} \begin{document} $\widecheck{\theta\tilde\theta} + ...


16

When typing the name in the text, N\o rregard will not leave any space in the output, as spaces after control sequences (with name consisting of letters) are ignored. However, in .bib file the question is slightly different, as you want to use the name also for collation. The BibTeX manual recommends author = {N{\o}rregard, X.} because in this way the ...


16

OK, after talking to Joseph Wright I went ahead and wrote a patch for cmssi, which is the standard math font in beamer. The problem is that this font (computer modern sans serif italics) is designed as a text font, so it doesn't contain any information about positioning of accents. Compare these for before and after patching: Now the answer (hopefully) is ...


16

In the definition files for output encodings, you can find the defined combinations that are substituted with precomposed accented characters; for instance, in t1enc.def we find \DeclareTextComposite{\.}{T1}{i}{`\i} \DeclareTextComposite{\.}{T1}{\i}{`\i} \DeclareTextComposite{\`}{T1}{i}{236} \DeclareTextComposite{\`}{T1}{\i}{236} ...


16

It is difficult to see in some editors, but in the first case you have \" acting on o, in the second: \' acting on ', hence the strange result. \documentclass{article} \begin{document} Toks\"{o}z Toks\''{o}z \end{document} BTW: your question gives an interesting example, why " and '' should never be mixed. Improper usage of " as a quote does not ...


15

For the breve accent in text mode use \u{\i}, for the háček use \v{\i}. In math mode, they are \breve{\imath} and \check{\imath}. \documentclass{article} \begin{document} \verb|\u{\i}|: \u{\i} \verb|\v{\i}|: \v{\i} \verb|$\breve{\imath}\ne\check{\imath}$|: $\breve{\imath}\ne\check{\imath}$ \end{document}


15

Well, I wrote that suggestion at LaTeX Community, but there I assumed the person wanted fine-grained control. If you don't, then maybe something like this would be more suitable? You may need to tweak the -0.35ex to your liking, though not separately for each character. How about this? \documentclass{article} \usepackage{amsmath} \usepackage{accents} ...


15

this is certainly a bug, and has already been reported as such to tech-support@ams.org. it has been added to the list for the next overhaul of the amsmath package. here are two additional small tests that provide useful information: \documentclass[11pt]{article} \usepackage[]{amsmath} \begin{document} \[ \breve{\breve{T} v} \] \end{document} this results ...


14

while the answer by @user001 is correct in that \widecheck is supported by the mathabx fonts and package, that package/font collection also changes the shapes of a lot of (most) other symbols. if you want to avoid such "extra" changes, you can load just the symbol(s) you want as shown in this example. \documentclass{article} \usepackage{amsmath} \nofiles ...


14

If you put an accent over a single character, TeX uses information in the font metrics to shift the accent to take some account of the slope of the italic letters. Which is why the first one shifts. If you put an accent over a more complicated math list then it's just centered over the list.


14

Here is my attempt. I tried to emulate the original julia logo from julialang.org. Some features: The positioning of the dots is relative to the x-height of the current font, which means that they should stay in the right position if the font size changes. The word "julia" is set in the cmss (Computer Modern sans serif) font, which means the logo won't ...


14

You can use the UTF-8 (hex.) representation: \documentclass{article} \usepackage[utf8]{inputenc} \usepackage{hyperref} \begin{document} \href{http://www.something.com/cami\%C3\%B3n/ }{link} \end{document} A site with a table to look up characters: http://www.utf8-chartable.de/ As Heiko Oberdiek mentions in his comment, the browser might help to get ...


14

It is described in manuals to LaTeX that inside tabbing you have to use \a'{e} instead of \'{e}. This will work for you. As well, I recommend loading lmodern and [T1]{fontenc} to get proper accent placement: \documentclass{article} \usepackage{lmodern} \usepackage[T1]{fontenc} \begin{document} \section{EDUCATION \& CERTIFICATION} \begin{tabbing} ...


14

A modification of the \dddot macro of amsmath: \documentclass{article} \newcommand\ringring[1]{% {% make an Ord atom \mathop{\kern0pt #1}\limits^{% set a box over the variable \vbox to-1.85ex{ \kern-2ex % lower the ring accents \hbox to 0pt{\hss\normalfont\kern.1em \r{}\kern-.45em \r{}\hss}% \vss % fill }% end of \vbox ...


13

If you load inputenc with the utf8 encoding option (make sure that your editor is also configured to use Unicode), you can input those characters directly from your keyboard: \documentclass{article} \usepackage[utf8]{inputenc} \begin{document} Ç et ç \end{document} A few comments (added by herve): If your keyboard has not a french layout, the way to ...


13

The following works with the input described above. \documentclass{article} \usepackage{xparse} \ExplSyntaxOn \NewDocumentCommand{\getargs}{m}{ \get_args:n {#1} } \int_new:N \narg \cs_new_protected:Npn \get_args:n #1 { \seq_set_split:Nnn \l_tmpa_seq {~} {#1} \seq_map_inline:Nn \l_tmpa_seq { \int_incr:N \l_tmpa_int ...



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