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.

The title is self-explanatory really, all I really want to do is be able to add some kind of notch to any character, so that they are visible if you are actively looking for them.

Like accents, but less obvious and more customizable.

EDIT:

David Carlisle asked about what kind of notch I was talking, I was thinking something like:

Indentation in a character

Or the opposite

Either would work, but I would prefer something like the first one.

More specifically working with the cedilla thing, I would cut off the round part, keep the square at the top and move it up and to the right, but still such that it would be connected wih it.

share|improve this question
    
what kind of "notch" above/below? That is, starting from \c{x} which puts a cedilla below, what changes would you want? –  David Carlisle Nov 29 '12 at 17:33
    
David Carlisle, I edited my question with some examples of what I'd like. Just something much more subtle than the usual accents you find in TeX. –  Atheuz Nov 29 '12 at 17:44
add comment

2 Answers 2

up vote 6 down vote accepted

The following example provides \notch{<char>} to add a notch to a character. Because each character is different, the position of the notch and the notch itself is configured by \notchsetup{<char>}{<x pos>}{<y pos>}{<notch>}. The position value can be given as dimensions (recommended are the units ex and em). If the <x pos> is given as real number, then it means the fraction of the character's width, a real number for <y pos> means the fraction of the character's height. With \notchcolor{<color name>} the color of the notch can be configured, useful for visual debugging of the notch and its position.

\documentclass{article}
\usepackage{xcolor}
\usepackage{graphicx}

\makeatletter
\newcommand*{\notchcolor}[1]{%
  \def\@notchcolor{#1}%
}
\notchcolor{white}
\newcommand*{\notch}[1]{%
  \leavevmode
  \@ifundefined{notch@#1}{%
    \@latex@warning{Notch is not configured for `#1'}%
    #1%
  }{%
    \begingroup
      \sbox0{#1}%
      \csname notch@#1\endcsname
      \rlap{\copy0}%
      \setbox0=\hbox to \wd0{%
        \kern\dimen0 %
        \textcolor{\@notchcolor}{%
          \raise\dimen2\hbox{\@notch}%
        }%
        \hss
      }%
      \ht0=\z@
      \dp0=\z@
      \box0 %
    \endgroup
  }%
}
% \notchsetup{<char>}{<move right>}{<move up>}{<notch>}
\newcommand*{\notchsetup}[4]{%
  \@namedef{notch@#1}{%
    \@notchset0{#2}\wd
    \@notchset2{#3}\ht
    \def\@notch{#4}%
  }%
}
\newcommand*{\@notchset}[3]{%
  \afterassignment\@notchcleanup
  \dimen#1=#2#30 \@nil
}
\def\@notchcleanup#1\@nil{}
\makeatother

\begin{document}

\notchsetup{A}{.62}{.6}{\rule{.2ex}{.2ex}}
\notch A
{\notchcolor{yellow}\notch A}

\notchsetup{A}{.6}{.6}{\rotatebox{-20}{\rule{.2ex}{.2ex}}}
\notch A
{\notchcolor{yellow}\notch A}

\end{document}

Result

share|improve this answer
add comment

Unless there is a font-ish way to do this (i.e. use special fonts that has those glyphs already or defining your own accent), this could be a solution for an A and white background. Tik Z is also possible for non-white background …

This will break kerning, though.

Code

\documentclass{article}
\usepackage{xcolor,graphicx}
\begin{document}
\ooalign{A\cr\hidewidth\color{white}\kern.25em\raise1ex\hbox{\rotatebox[origin=c]{-15}{\rule{.15em}{.15em}}}\hidewidth\cr}
\end{document}

Output

enter image description here

share|improve this answer
    
I went with the other response because it seemed easier to typeset all the letters using it. But thank you too. –  Atheuz Nov 29 '12 at 20:49
    
@Atheuz Yes, of course. Heiko Oberdiek's answer is the “Let’s do it proper” version of my answer which should have been only an idea to start, anyway. I was hoping for a more font-ish alternative, though … –  Qrrbrbirlbel Nov 29 '12 at 20:53
add comment

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.