Tag Info

Entering Unicode characters in LaTeX

This is a minimal example that finally worked for me using OpTeX: \fontfam[lm] The vorticity $ω$ is defined as $ω = ∇ × u$. \bye
• 54.2k
1 vote

Capitalize first letter of non-latin word (utf-8 two bits)

Your problem is that you are using old 8bit TeX engine, no Unicoded engine in 2022. We have Unicode standard more than 20 years now an there is plenty fonts supporting it. For example, when we use ...
• 54.2k
Accepted

Capitalize first letter of non-latin word (utf-8 two bits)

Use \MakeTitlecase (this requires a current LaTeX, the underlying expl3 command \text_titlecase:n can be used also in older systems). \documentclass{article} \usepackage[T2A]{fontenc} \begin{document}...
• 296k

Force LaTeX to break a nonsensical line with a hyphen

Still another approach based on luatex, which allows \patterns in the document. A new language is declared and a set of hyphenation patterns are then assigned to it. \documentclass{article} \...
• 7,569

Typesetting phonetic symbols: Unicode or tipa?

I wrote a Rust(binary) program to convert unicodes to TIPA commands here. It's based on some data tables which I've collected and remain a bit incomplete. But it satisfies me now. You can call it with ...
1 vote

Problem with character placement (XeLaTeX, Linux Libertine and Unicode)

The font advertises correctly the character width, so you can use a zero kern. \documentclass{report} \usepackage{fontspec} \setmainfont{Linux Libertine O} \begin{document} aɻ \textit{aɻ} \textbf{...
• 1.0m

Force LaTeX to break a nonsensical line with a hyphen

This adds \- between all characters, but care is taken not to do it too early (three leading characters and three trailing ones are not considered) and not to tamper with combining characters (from U+...
• 1.0m

Force LaTeX to break a nonsensical line with a hyphen

If you're free to use LuaLaTeX, it's straightforward to set up a Lua function that modifies the string so that line breaks are possibly everywhere. The code can handle pretty much all utf8-encoded ...
• 443k
Accepted

Force LaTeX to break a nonsensical line with a hyphen

It wasn't clear if you want a hyphen at the break, I show without and with - here, also it wasn't clear if the space between some ] [ was meaningful, I do nothing outside [...] here so ] [ allows a ...
• 674k
Accepted

Beginner Question: Idiomatic way to quote non-latin text?

You could use babel to set up language switching: \documentclass{article} \usepackage{parskip} \usepackage{noto} \usepackage[english]{babel} \babelprovide[import=sa-Deva, hyphenrules=sanskrit]{...
• 19.7k
Accepted

Command \MakeUppercase does not work as expected in pdfLatex, but works fine in LuaLaTeX and XeLaTeX

The next expl3 update will address this: see https://github.com/latex3/latex3/commit/2b91cfa676bf2a99fbfab63537b9e0bdcb612880 for the code detail. The approach is to use a simplified method for ...
• 244k

Having problems with listings and UTF-8. Can it be fixed?

This answer (and other answers on this page) applies to pdflatex engine only. For other engines, see the linked question above. This method is not really recommended for non-TeX-expert. In other words ...
• 2,996

How can I typeset "è" by typing "\`e" in source code inside a lstlisting environment?

As pointed out in Having problems with listings and UTF-8. Can it be fixed? using escapeinside doesn't work well with the format. You can simply use (remember to escape the backslash) \documentclass{...
• 2,996
Accepted

Can the unicode character U+02B9 be produced using T1 or/and LGR encoding by pdfLatex?

U+02B9 is MODIFIER LETTER PRIME and like all Modifier letters should be avoided. Like U+2032 PRIME it is full size so would need to be in a superscript. ' expands to ^{\prime} so if you have documents ...
• 674k

Command \MakeUppercase does not work as expected in pdfLatex, but works fine in LuaLaTeX and XeLaTeX

Note \MakeUppercase had a big upgrade in the June2022 release, this applies to the current release mostly. The Unicode data files show accented letters as uppercase, which doesn't always match what is ...
• 674k

Force LaTeX to ignore unknown Unicode characters

Basically, thanks to @David Carlisle's answer, I've managed to extract all the Unicode codes that LaTeX does know how to print, and I've created a simple function in ruby that only keeps those ...
• 213
1 vote

Adding special characters Љ Б Д И П و △ ★ ✚ ✠ ✤ ✶ ✸ ❀ ❃ in latex

The simplest way is use xelatex\lualatex with a font with all the glyphs that you need: \documentclass{article} \usepackage{fontspec} \setmainfont{FreeSerif} \begin{document} Adding special ...
• 74k

Greek directly in math mode XeLaTeX instead of PdfLatex

It's not difficult to make alphabeta to do its job also for XeLaTeX or LuaLaTeX. \documentclass{article} \usepackage{iftex} \usepackage{amsmath} \iftutex \newcommand\DeclareUnicodeCharacter[2]{% \...
• 1.0m

R-Markdown pdfLatex won't work when rendering shape ="\U0001f693"

If you used lualatex you could use a font covering this range, but with pdftex I'd use an image. \documentclass{article} \usepackage{graphicx} \DeclareUnicodeCharacter{1F693}{\includegraphics[height=...
• 674k

Force LaTeX to ignore unknown Unicode characters

Pass your scraped data through a filter that removes all poorly-behaved Unicode characters. For example, a regex search-and-replace on all characters that do not match the allowed set, with the empty ...
• 38.6k
Accepted

Greek directly in math mode XeLaTeX instead of PdfLatex

You can use unicode-math with xelatex and lualatex, it includes amsmath \documentclass{article} \usepackage{unicode-math} \begin{document} $α+β+γ=\alpha+\beta+\gamma$ \end{document}
• 674k

Force LaTeX to ignore unknown Unicode characters

I'd use Ulrike's answer, but to answer your ALSO question, you can get a list of Unicode code points known to the base LaTeX distribution from /usr/local/texlive/2022/texmf-dist/tex/latex/base/utf8enc....
• 674k
Accepted

Force LaTeX to ignore unknown Unicode characters

You can redefine the error message: \documentclass[a4paper]{article} \usepackage[croatian]{babel} \makeatletter \def\UTFviii@undefined@err#1{??UPS??} \makeatother \begin{document} Sometimes crawler ...
• 296k

IM (Input Methods) for entering Unicode math on Windows 7 for use with the unicode-math package?

You can use a text expander tool for that. I am using aText (on Mac). I have multiple self-defined aliases for math unicode, all started with jj. For example, when I type jjalpha, aText automatically ...
Accepted

! LaTeX Error: Unicode character − (U+2212) not set up for use with LaTeX

The unicode-math package accepts that character. You can load a font that supports it, through, for example, fontsetup. An alternative that works with PDFTeX is to add the command: \...
• 38.6k
1 vote

! LaTeX Error: Unicode character − (U+2212) not set up for use with LaTeX

You should use a normal keyboard - so $\Phi^{-1}(u)$ %^%% not $\Phi^{−1}(u)$ %^%%
• 674k
1 vote
Accepted

Forcing overleaf to refresh a file changed on the docker file system

(I'm on support staff at Overleaf.) Any changes you make to files inside the compile container are ephemeral and don't persist back to the project's input files that you can see in the web editor. The ...
• 28.3k