Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

How can I create the symbol shown below so that it be insertable as letter into text in LaTeX?

enter image description here

I found it in a book and I tried to reverse engineer it, but I failed:

% does not compile {}[\bf{п}]^(\bf{п}){}[\bf{м}]^(\bf{у})
% does not compile {}^{\bf{п}}_{\bf{п}}\mathbf{C}^{\bf{м}}_{\bf{у}}
share|improve this question
    
Something like this? –  Werner Mar 18 at 3:35
    
Are any of the elements fixed/dynamic or does the "symbol" always the way you present it in your post? Also, when you mention "indices", are you referring to the "top part" as being a superscript and the "bottom part" as being a subscript? –  Werner Mar 18 at 5:27
    
This is a good opportunity for stackengine probably. –  percusse Mar 18 at 5:54
    
Or a simple use of \shortstack{<top>\\<bottom>}.... (Which is not to say that stackengine is pretty awesome.) –  jon Mar 18 at 6:08
    
What is the purpose of the dot(s) in the image at the right side? Where is the base line of the symbol? What is its height? –  Heiko Oberdiek Mar 18 at 11:37

4 Answers 4

Solution 1

  • Cyrillic letters were typeset with inputenc and babel.
  • tabular environment was employed for alignment of letters.
  • \scalebox was used to shrink the output.

Here is the code:

\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage[russian,english]{babel}
\usepackage{graphicx}

\newcommand{\mysymbol}{%
  \scalebox{0.7}{%
    \foreignlanguage{russian}{%
      \setlength{\tabcolsep}{0pt}%
      \renewcommand{\arraystretch}{0}%
      \begin{tabular}[b]{@{}cc@{}}
        п & м \\[0.2ex]
        п & у \\
      \end{tabular}%
    }%
  }%
}

\newcommand{\test}{a\mysymbol b}

\begin{document}
{\Large\test}

\test

{\footnotesize\test}

\end{document}

Solution 2

  • \relscale was used instead of \scalebox. This looks better than the solution above, because font with correct optical sizes are employed.

Here is the code:

\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage[russian,english]{babel}
\usepackage{relsize}

\newcommand{\mysymbol}{%
    \foreignlanguage{russian}{%
      \renewcommand{\RSsmallest}{0pt}%
      \relscale{0.7}%
      \setlength{\tabcolsep}{0pt}%
      \renewcommand{\arraystretch}{0}%
      \begin{tabular}[b]{@{}cc@{}}
        п & м \\[0.2ex]
        п & у \\
      \end{tabular}%
    }%
}

\newcommand{\test}{a\mysymbol b}

\begin{document}
{\Large\test}

\test

{\footnotesize\test}

\end{document}
share|improve this answer

Some low level programming can help:

\documentclass{article}
\usepackage[T2A,T1]{fontenc}

\makeatletter
\newcommand{\pmpu}{%
  \leavevmode\vbox{
    \check@mathfonts %% we want to know what's the subsubscript size
    \fontencoding{T2A}\fontsize{\ssf@size}{0}\selectfont
    \offinterlineskip
    \lineskip=0pt
    \ialign{%
      &\hfil##\hfil\cr
      \CYRP&\CYRM\cr
      \noalign{\vskip.1ex}
      \CYRP&\CYRU\cr
    }%
  }%
}
\makeatother

\begin{document}
Text around \pmpu\ and other text

\bigskip

{\Large Text around \pmpu\ and other text}

\end{document}

enter image description here

share|improve this answer

whatsis

Change scale factor to change font size.

\documentclass{standalone}
\usepackage{mathtools}
\usepackage{graphics}

\newcommand{\whatsis}[1]% scale factor - 0.4 is normalsize
{\scalebox{#1}{\normalsize\raisebox{8pt}{$\Pi$M }\hspace{-20pt}%
{$\Pi$\hspace{1pt}\raisebox{1.65pt}{\large y.}}}}%

\begin{document}
\huge text \whatsis{0.8} text
\end{document}
share|improve this answer
1  
...that's why it's better to use font-related measurements like ex and em. –  Werner Mar 18 at 4:50
    
The \large y will still remain \large. –  John Kormylo Mar 18 at 4:59

You can adjust the .15ex if you wish to change the distance between the stacked lines. In this MWE, the symbol is made to fit to 1.95ex in vertical extent, which can also be adjusted.

\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage[russian,english]{babel}
\usepackage{scalerel,tabstackengine,graphicx}
\def\mysym{\foreignlanguage{russian}{%
  \setstackgap{S}{.15ex}\scaleto{$\tabbedShortstack{п&м\\п&у}$}{1.95ex}}}
\def\test{a\mysym b}
\begin{document}
{\Large\test}\par\test\par{\footnotesize\test}
\end{document}

enter image description here

And if one prefers the symbol in bold, as the OP's graphic might indicate, a one-word change to the MWE accomplishes that:

\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage[russian,english]{babel}
\usepackage{scalerel,tabstackengine,graphicx}
\def\mysym{\foreignlanguage{russian}{%
  \setstackgap{S}{.15ex}\scaleto{$\bfseries\tabbedShortstack{п&м\\п&у}$}{1.95ex}}}
\def\test{a\mysym b}
\begin{document}
{\Large\test}\par\test\par{\footnotesize\test}
\end{document}

enter image description here

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.