0

Since an e with an acute accent is a pain to type, I have a macro for the name Bézier:

\def\Bez{B\'{e}zier}

I swear this used to work fine, but today I tried typing

The so-called \Bez curve is not really based on \Bez's original ideas.

And the output I got was

enter image description here

What happened to the space before the word "curve"?

If I add a space to my macro definition, then "Bezier curve" comes out right, but "Bezier's work" get's an extra space. What should I do?

bubba
  • 2,462
  • 1
    I just found this: https://tex.stackexchange.com/questions/31091/space-after-latex-commands. So, unless there have been some improvements since 2009, no need to answer. – bubba Jul 16 '22 at 06:00
  • 2
    Use either \Bez\ or \Bez{} to get a space. – marv Jul 16 '22 at 06:01
  • 1
    LaTeX can process UTF-8 input. Bézier is fine. – frougon Jul 16 '22 at 06:04
  • @frougon. It might be fine for LaTeX, but it's not fine for me because Bézier is difficult to type (unless you know some trick that I don't). – bubba Jul 16 '22 at 06:07
  • @bubba My keyboard has an é key. Other possibilities would be input methods in Emacs and the Compose key in X11. – frougon Jul 16 '22 at 06:10
  • I'm not going to buy a French keyboard that has an é key :-) – bubba Jul 16 '22 at 06:10
  • Here's a trick: Copy and paste the name from some external pdf file that contains the name Bézier into your tex document. – Mico Jul 16 '22 at 06:11
  • @Mico. Yes, that's what I often do. I thought a macro would make life easier. Maybe not. – bubba Jul 16 '22 at 06:13
  • Yes, correct duplicate. If you read carefully there are two "automatic" solutions there, with limitations. – user202729 Jul 16 '22 at 06:55
  • If you're on Linux with an us keyboard, chose the us-int-altgr keyboard layout and is as simple as pressing the altgr key and ` and the the letter you want to accent. If you're on windows, https://github.com/samhocevar/wincompose makes the keyboard bearable. – Rmano Jul 16 '22 at 07:43
  • @bubba On other topic: In Linux, most desktops have access to other characters when you press ALT + <SPEC.KEY> followed by a letter e.g. e after releasing ALT, where SPEC.KEY is ;, ', #, [, ], ,, ., / (those are on the right-hand side of regular letters on my keyboard). For instance ALT+[ followed by e gives me ë whereas ALT+; followed by e gives me é. Hope that helps. – Celdor Jul 16 '22 at 08:34
  • @Rmano (and Celdor) : Thanks, but I don't use Linux. – bubba Jul 17 '22 at 09:01
  • @bubba wincompose is a windows 10/11 app, it works nicely. It's also useful for adding emoj wherever you like . – Rmano Jul 17 '22 at 16:15

1 Answers1

0

Seems like the best solution is to keep typing "\Bez" and then globally replace "\Bez" by "Bézier". Anyway, that's what I did.

bubba
  • 2,462