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 Answers1

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

  • 1
    e̊̊̊̊̊̊̊̊̊̊̊̊̊̊̊̊̊̊̊̊̊ – David Carlisle Sep 14 '17 at 15:16
  • @DavidCarlisle "To infinity...and beyond!!!" – Steven B. Segletes Sep 14 '17 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' – Marko Lustro Sep 15 '17 at 08: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. – Steven B. Segletes Sep 15 '17 at 09:22
  • @StevenB.Segletes can You write example? a with 2 cediles, a with 4 dot above. How defining it correctly. – Marko Lustro Sep 15 '17 at 09:57
  • i read this example and get : avail lists: 1:2,2:39,3:4,4:1,5:20,6:57,7:62,8:1,9:26 ! error: (type 0): cannot find file '' ! ==> Fatal error occurred, no output PDF file produced! – Marko Lustro Sep 15 '17 at 10:27