# Vertical line superimposed over a letter

}
\begin{document}
\vertchar{S} and \vertchar{C} or \vertchar[.08ex]{C}
\end{document}


\stackinset allows you do do this with the syntax

\stackinset{H-anchor}{H-offset}{V-anchor}{V-offset}{inset}{base}

The inset and base can be glyphs, phrases, images, anything that can be set into a LaTeX box. The H-anchors are l, c, or r. The V-anchors are t, c, or b. You can stack math by default by issuing \stackMath, which is done for the 2nd example of the MWE, where I simulate an @ symbol by insetting a math a inside a math O.

\documentclass{article}
\usepackage{stackengine}
\begin{document}
\stackinset{c}{}{c}{}{\rule{.4pt}{2ex}}{C}
\stackMath
\stackinset{c}{}{b}{1pt}{a}{O}
\end{document}


The insets can be nested to inset multiple things over one base, such as in this answer: Mathematical formulas on a graph (not made by TeX)