1

I need my own character and I need to use it in LaTeX.

In LaTeX we have \={a} \.{a} etc.

How can I can create my own character? For example I have two glyphs, my version of tilde ~ and char a.

How to define a new character \~{a} with the specific character and tilde? Or how to add two tildes above 'e'?

Maybe creating a virtual font is the simplest way?

1
  • The macro \~ is already defined. I would choose a different name. Sep 14, 2017 at 12:48

1 Answer 1

2

Based on my answer at Looking for a package/method that can make "best-guess" (heuristic) accents onto a font that doesn't have latin-extended support

\documentclass{article}
\usepackage{stackengine}
\newcommand\fit[3][0ex]{\stackengine{#1}{#3}{\smash{#2}}{O}{c}{F}{T}{S}}
\newcommand\mytilde[2][-1.2ex]{\fit[#1]{\~{}}{#2}}
\newcommand\myring[2][-1.2ex]{\fit[#1]{\r{}}{#2}}
\begin{document}
\mytilde A\mytilde a
\mytilde[-4.3pt]{\mytilde e}
\mytilde[-11.5pt]{\mytilde e}

\myring A\myring a
\myring[-3.3pt]{\myring e}
\myring[-11.5pt]{\myring e}
\end{document}

enter image description here

6
  • 1
    e̊̊̊̊̊̊̊̊̊̊̊̊̊̊̊̊̊̊̊̊̊ Sep 14, 2017 at 15:16
  • @DavidCarlisle "To infinity...and beyond!!!" Sep 14, 2017 at 17:30
  • can you show me answer without {stackengine}? simple as possible answer. i need different char above letter. Not only doule ~ or one ~ sometimes i need one 'o' and ~ above and dot left 'o' Sep 15, 2017 at 8:18
  • @MarkoLustro I have to leave momentarily, but suggest you look into the \ooalign primitive and \raisebox to accomplish similar things. By the way, stackengine can align to the left, center, or right, and by adding blank space on one side of the stacked item, it will shift that item to the left or right, accordingly. Sep 15, 2017 at 9:22
  • @StevenB.Segletes can You write example? a with 2 cediles, a with 4 dot above. How defining it correctly. Sep 15, 2017 at 9:57

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .