How to cut off part of a letter

You can do this with \adjustbox, but because it can only clip rectangular areas you'll need to create two clippings and place them next to each other.

I'm using two \adjustboxes below: the first just shows the leftmost 0.175em of the “R”, with the top 0.1em cut off, and the second one shows the remainder of the letter. I've \fboxed the letters to show that their bounding boxes are identical and I've converted the pdf to a png with transparency to demonstrate that I'm not covering anything up :).

\documentclass{article}

\usepackage{adjustbox}
\newcommand*\clippedR{%
  \adjustbox{viewport = {0em} {-.95em} {.175em} {\dimexpr\height-.1em}, clip,set depth=0pt}{R}%
  \adjustbox{viewport = {.175em} {-.05em} {\width} {\height}, clip,set depth=0pt}{R}%
}

\begin{document}

\fbox{R}
\fbox{\clippedR}

\end{document}

output

Note that \height, \width and \depth can be used to refer to the original dimensions of the letter (see the adjustbox documentation) and that \dimexpr can be used to perform computations with dimensions (see the etex documentation, §3.5 as of this writing). The % at the end of these lines are necessary because single newlines are normally interpreted as spaces (see this answer).


What works with make-up also works for tex: instead of removing the corner of the R, cover it up:

\documentclass{standalone}
\usepackage{xcolor}

\begin{document}

{    
    \leavevmode\rlap{R}\rlap{\kern-0.02em\textcolor{white}{\raisebox{0.5em}{\rule{0.2em}{0.25em}}}}
}

text

\end{document}

enter image description here


A possible solution is to simply draw over that corner using tikz:

\documentclass{article}
\usepackage{tikz}
% Lengths used to hold Height/Width of `R' in current font
\newlength{\uppercaseHeight}
\newlength{\uppercaseWidth}
% R with a corner missing
\newcommand\cutR{%
% Save hieght and width of current R (depends on fontsize)
\settoheight{\uppercaseHeight}{R}%
\settowidth{\uppercaseWidth}{R}%
R% Print R
% Overlay a white rectangle
\tikz[baseline,overlay] \fill [white] % [red] % useful to use a red box when tweaking
(-\uppercaseWidth, 0.8*\uppercaseHeight) rectangle ++(0.24*\uppercaseWidth, 0.25*\uppercaseHeight);
}
\begin{document}\noindent
\small X \cutR X \\
\normalsize X \cutR X \\
\large X \cutR X
\end{document}

Output: output

The values used in the fill command appear to work fairly well for the default font over a range of sizes, but you may want to adjust them to get things looking exactly as intended.

Tags:

Adjustbox