# A bit of fun with logos: how to combine lines and letters in LaTeX (or just TeX)?

I was just having a bit of fun messing around with typesetting, and was able to produce a simple logo. However, it suffers from several issues that are illustrated in the MWE. I'm mainly just doing this for fun and understanding.

\documentclass{article}

\newcommand{\BEBsigit}{%
\setlength{\unitlength}{1em}
{\linethickness{0.062ex}
\line(1,0){1.2}}

\vspace{-1.2452ex}

\textit{B\hspace{-0.30em}E\hspace{-0.26em}B}%

\vspace{-2.833ex}

{\linethickness{0.062ex}
\line(1,0){1.2}}
}

\begin{document}

{\Huge

\BEBsigit

Can we put \begin{minipage}\BEBsigit\end{minipage} in a sentence? No.
}

{\small

The line does not seem to line up and scale properly:

\BEBsigit
}

\end{document}


The first line contains a reasonable image, but ...

1) If we zoom in on it, it looks good to a point:

And then the scaling seems to be off a bit: the line thickness seems to drop:

2) The command is not portable. When trying to include it in a sentence, very bad things happen. When trying to draw it at a smaller size (bottom line of first image), the lines are also a bit off in alignment.

3) There was a lot of trial and error coming up with scale and space numbers, which, while not a show stopper in itself, is a bit of extra work. So if this can be avoided somehow, it may be beneficial.

4) If I use a minipage, i.e. \begin{minipage}\BEBsigit\end{minipage}, why does there seem to be an extra (albeit badly drawn) logo and some other funny business?

What are some reasonable ways to avoid such problems?

• \begin{minipage} takes the width of the minipage as an argument like that: \begin{minipage}{1in} Apr 29 '14 at 11:49

## 1 Answer

you have a lot of whitespace (trailing spaces) in your definitions. However, write first the BEB into a box to get the correct width and height:

\documentclass{article}

\newsavebox\BEBbox
\newlength\BEBwidth
\newlength\BEBheight
\makeatletter
\newcommand\BEBsigit{%
\savebox\BEBbox{\textit{B\kern-0.30em E\kern-0.26em B}}%
\leavevmode
\unitlength=1pt
\linethickness{0.07ex}%
\setlength\BEBwidth{0.65\wd\BEBbox}%
\setlength\BEBheight{\ht\BEBbox}\addtolength\BEBheight{-0.3\linethickness}%
\put(0,\strip@pt\BEBheight){\line(1,0){\strip@pt\BEBwidth}}%
\put(0,0.5){\line(1,0){\strip@pt\BEBwidth}}%
\put(0,0){\usebox\BEBbox}}
\makeatother

\begin{document}
\Huge\BEBsigit

\normalsize\BEBsigit

\small\BEBsigit

\end{document}


It depends to the magnification of the PDF-viewer if the lines are set properly. The printed output should be okay.

• Thanks, lots of helpful info and examples. Also I saw you have a book on making tables - I will check it out! Apr 27 '14 at 20:54