# Make a ligature by deleting part of a letter

I'd like to display a ligature of an A and an L where the A is followed by the bottom 'bar' of the L to form a ligature. Essentially, it would be like the following, without the vertical bar of the L.

(If this is even possible...!)

\documentclass[a4paper]{article}

\begin{document}

\Huge A\kern-0.3em L

\end{document}

• You can't remove the vertical bar of the L effectively, but why not simply lowering a \rule? – TeXnician Jan 26 '19 at 20:35

You could use \clipbox from the trimclip package (which is part of adjustbox) to cut off the stem of the leter L. Its syntax is

\clipbox{<l> <b> <r> <t>}{<stuff>}


and it cuts off <l> from the left, <b> from the bottom, <r> from the right and <t> from the top of <stuff>. The part that is clipped off is not covered, but actually hidden.

It's not a perfect solution though, as the kerning between the L and the next character will be incorrect if that character is wider at the top than at the bottom, as illustrated below. If you want to avoid this you'll probably have to look ahead for the next character or something (or maybe something with Lua is possible?).

\documentclass{article}

\usepackage{trimclip}
\DeclareRobustCommand*\AL{A\kern-.035em\clipbox{.26em 0em 0em .25em}{L}}

\begin{document}

\begin{tabular}{ll}
Good:       & A\AL A
\\
Comparison: & AA\kern-.295em LA
\\
\\
Comparison: & WA\kern-.295em LW
\end{tabular}

\end{document}


I'm using \DeclareRobustCommand instead of \newcommand for technical reasons (see here). Without it you would not be able to use this command in e.g. section titles or index entries.

### Version that doesn't eat spaces

I would prefer defining \AL/ instead of \AL. You could do this using

\protected\def\AL/{A\kern-.035em\clipbox{.26em 0em 0em .25em}{L}}


The advantage is that spaces after \AL/ aren't eaten like those after \AL are, so you can write something like Minim\AL/ \AL/uminium without having to insert an explicit \ between the words or having to add a space between \AL/ and uminium. You'll get an error if you forget the closing /. I don't know who came up with this idea, but it can be found e.g. here and here.

I'm using \protected for the same reason as I was using \DeclareRobustCommand above.

### Mostly correctly kerned version

Just because we can, here's a version that does look ahead at the next character and removes an appropriate amount of space. It only works if the token following \AL/ is an actual letter (and not e.g. a macro that expands to one or produces an accent).

\documentclass{article}

\usepackage{trimclip}
\protected\def\AL/{A\kern-.035em\Lfoot}
\makeatletter %% <- make @ usable in command names
\def\Lfoot{\begingroup\futurelet\Lfoot@nextchar\Lfoot@}
\def\Lfoot@{%                          %% ^^ \futurelet peeks at next token
\clipbox{.26em 0em 0em .25em}{L}%    %% <- clipped L
\ifcat\noexpand\Lfoot@nextchar A%    %% <- test if next char is a letter
\sbox0{L\Lfoot@nextchar}%          %% <- correct L+next char
\sbox2{{L}{\Lfoot@nextchar}}%      %% <- wrong L+next char
\kern\dimexpr\wd0-\wd2             %% <- remove excess width
\fi
\endgroup                            %% <- limits scope of assignments
}
\makeatletter  % <- revert @

\begin{document}

\begin{tabular}{ll}
Good:       & A\AL/A \\
Comparison: & AA\kern-.295em LA \\
Also good:  & W\AL/W \\
Comparison: & WA\kern-.295em LW\\
\end{tabular}

\end{document}


\documentclass[a4paper]{article}
\usepackage{xcolor}
\newsavebox\LBox
\newsavebox\ABox
\def\AL{\sbox\LBox{L}\sbox\ABox{A}%
\leavevmode\kern\wd\ABox\rlap{L}\rlap{\kern0.05em%
\textcolor{white}{\rule[0.1ex]{0.5\wd\LBox}{1.7ex}}}%
\kern-\wd\ABox\kern0.35em\usebox\ABox\kern\wd\LBox}

\begin{document}
\AL foo
\end{document}


• The amount of space surrounding this character seems rather excessive. You may want to adjust some of these \kerns. – Circumscribe Jan 26 '19 at 21:09
• (More specifically, you should insert a \kern-.35em after \kern\wd\ABox and after \kern\wd\LBox. Then the spacing it will be correct (if the preceding and following characters don't have overhang).) – Circumscribe Jan 27 '19 at 10:04