0

I’m discovering the joy of typing directly UTF-8 characters easily on my keyboard (thanks bépo and/or XCompose), and I’d love to use them to write more readable LaTeX, without resorting to using LuaLaTeX. For now I need to manually define all my characters (thanks newunicodechar), but I’d love to use a package taking care of this for me automatically.

Is there such a package that I missed, or should I create my own?

MWE:

\documentclass{article}

\usepackage{amsmath} \usepackage{amsfonts}

\usepackage{newunicodechar} \newunicodechar{α}{\alpha} \newunicodechar{β}{\beta} \newunicodechar{⊗}{\otimes} \newunicodechar{⊕}{\oplus} \newunicodechar{∀}{\forall} \newunicodechar{ℕ}{\mathbb{N}} \newunicodechar{ℤ}{\mathbb{Z}} \newunicodechar{⩾}{\geq} \newunicodechar{∈}{\in} \newunicodechar{∃}{\exists} \newunicodechar{∧}{\land} \newunicodechar{∨}{\lor} \newunicodechar{⇒}{\implies} \newunicodechar{½}{\frac{1}{2}} \newunicodechar{²}{^2} \newunicodechar{ˣ}{^x} \begin{document}

$∀ x ∈ ℕ, ∃ y ∈ ℤ, x ⩾ y$

\begin{align} (A ⊗ B)(C ⊗ D) & = (AC) ⊗ (BD) \ α ⊕ β & = β ⊕ α \end{align}

$a ∧ b ⇒ a ∨ b$

$x² ⩾ ½$

\end{document}

tobiasBora
  • 8,684
  • Just curious, what's the reason for ruling out LuaLaTeX for you? I, too, have hesitated for quite some time to make the switch, but it really hasn't changed anything in a significant way, except for making a lot of things easier (among them all things font and font encodings.) – Ingmar Apr 12 '23 at 16:12
  • 1
    Unfortunately there isn't (yet) but I have a few private packages for this thing. That having said read my answer in https://tex.stackexchange.com/a/628285/250119 for a list of everything-I-could-possibly-find – user202729 Apr 12 '23 at 16:13
  • @Ingmar for at least two: the fact that the editors (maybe even the arXiv?) might not support lualatex, and the fact that I don’t want to force my co-authors to change their setup just because I want to use unicode characters. – tobiasBora Apr 12 '23 at 16:26
  • @user202729 thanks a lot, too bad that there is no existing package. Let me know if you write your own at some points, or I might start to create my own ^^ – tobiasBora Apr 12 '23 at 16:29
  • 1
    Technically unixode counts if you are willing to download sty file from random GitHub repository and install it manually... (that package is a bit limiting though) – user202729 Apr 12 '23 at 16:31
  • 1
    as I show in the linked question you can use the unicode-math data with just a few extra lines of setup code – David Carlisle Apr 12 '23 at 18:17
  • 1
    Update: I wrote such a package https://www.ctan.org/pkg/unicode-math-input (just uploaded, will be available in 1 or 2 days, for now source code is on GitHub) – user202729 May 12 '23 at 11:56
  • @user202729 great thanks a lot! – tobiasBora May 12 '23 at 13:28

0 Answers0