New answers tagged

0 votes

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
user avatar
  • 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 ...
user avatar
  • 54.2k
7 votes
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}...
user avatar
0 votes

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} \...
user avatar
  • 7,569
0 votes

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 ...
user avatar
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{...
user avatar
  • 1.0m
5 votes

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+...
user avatar
  • 1.0m
3 votes

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 ...
user avatar
  • 443k
8 votes
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 ...
user avatar
2 votes
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]{...
user avatar
  • 19.7k
2 votes
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 ...
user avatar
  • 244k
0 votes

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 ...
user avatar
  • 2,996
0 votes

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{...
user avatar
  • 2,996
2 votes
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 ...
user avatar
5 votes

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 ...
user avatar
0 votes

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 ...
user avatar
  • 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 ...
user avatar
  • 74k
2 votes

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]{% \...
user avatar
  • 1.0m
3 votes

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=...
user avatar
0 votes

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 ...
user avatar
  • 38.6k
7 votes
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}
user avatar
11 votes

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....
user avatar
17 votes
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 ...
user avatar
0 votes

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 ...
user avatar
  • 1
2 votes
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: \...
user avatar
  • 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)$ %^%%
user avatar
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 ...
user avatar
  • 28.3k
2 votes

Put file contents as PDF comment (respecting UTF-8)

Actually easy - i am just not sure if one can easily include the linebreaks, but i am sure you are going to find out. Using expl3 because it's much more readable in there ;-) \documentclass{article} \...
user avatar
  • 166

Top 50 recent answers are included