\documentclass[a4paper]{article}

% The manual is typeset with the package it documents.
\usepackage{amsmath,amssymb}
\usepackage{microtype}
\usepackage{concrete-vec}

\usepackage[margin=1in]{geometry}
\usepackage{parskip}
\usepackage{hyperref}
\hypersetup{colorlinks=true,allcolors=blue!50!black,pdftitle={concrete-vec}}
\usepackage{fancyvrb}
\fvset{fontsize=\small,frame=single,framesep=6pt,rulecolor=\color{gray}}
\usepackage{xcolor}

\newcommand\pkg[1]{\textsf{#1}}
\newcommand\opt[1]{\texttt{#1}}
\newcommand\cs[1]{\texttt{\textbackslash #1}}

\title{The \pkg{concrete-vec} package\\[2pt]
  \large Concrete text and mathematics as outlines, with a bold weight}
\author{Matthew Lorig\\ \texttt{mlorig@uw.edu}}
\date{Version 1.2 \quad 2026/07/24}

\begin{document}
\maketitle

\begin{abstract}
\noindent
\pkg{concrete-vec} typesets a document in Donald Knuth's Concrete fonts with
two properties the existing Concrete packages do not jointly provide: every
glyph, in text \emph{and} in mathematics, is a vector outline rather than a
bitmap; and a bold weight is available, synthesised by stroking, in text and
in mathematics. It is a thin configuration layer over \pkg{ccfonts},
\pkg{mathastext} and \pkg{pdfrender}, and targets \texttt{pdflatex}.
\end{abstract}

\tableofcontents
\bigskip

\section{The problem}

Knuth designed the Concrete Roman fonts for \emph{Concrete Mathematics} and
they are widely admired. Three LaTeX packages typeset with them: \pkg{beton}
(text only), \pkg{concmath} and \pkg{ccfonts} (text and, in Concrete
mathematics). Two limitations recur.

\paragraph{Bitmap mathematics.}
The Concrete text fonts have freely available Type~1 outlines, but only in the
T1/TS1 (``Cork'') encoding: these are the \pkg{ecc} metrics, mapped to Type~1
by \pkg{cm-super}. The Concrete \emph{math} fonts (Ulrik Vieth's
\pkg{concmath-fonts}) ship as METAFONT source only, and \pkg{cm-super} does not
cover them. Consequently a document using \opt{concmath} or \opt{ccfonts} for
mathematics embeds \emph{bitmap} (Type~3) math fonts, which look poor on screen
and do not scale. The text can be vector while the mathematics is not.

\paragraph{No bold.}
There is no bold Concrete font. Worse, \opt{t1ccr.fd} silently substitutes
\opt{T1/ccr/bx/*} by Computer Modern bold, so \cs{textbf} in an otherwise
Concrete document quietly changes typeface; and \opt{T1/ccr/b/*} is undefined,
so on a current LaTeX (which requests series~\opt{b} first) headings and
\cs{textbf} may receive no extra weight at all. The traditional remedy---the
Computer Modern sans demibold condensed as a stand-in
(\opt{ccfonts}' \opt{boldsans} option)---changes both typeface and style.

\paragraph{What is new here.}
An OpenType Concrete math font now exists (\pkg{concmath-otf}, with a genuine
bold), and the classic all-vector route is \pkg{ccfonts} with Euler
mathematics (\pkg{eulervm}), as Knuth actually used. Both are excellent, but
neither gives \emph{Concrete letterforms in mathematics under
\texttt{pdflatex}}. That is the niche \pkg{concrete-vec} fills.

\section{The approach}

\begin{enumerate}
\item \textbf{T1 output encoding.} The only encoding in which Concrete has free
  outlines. The package sets it and warns if the default text encoding is not
  T1 at \cs{begin\{document\}}.
\item \textbf{Vector mathematics via \pkg{mathastext}.} \pkg{mathastext} reuses
  the current \emph{text} font for the letters, digits and operators of math
  mode. With Concrete as the text font, math letters become Concrete outlines.
  Symbols, delimiters and large operators fall back to Latin Modern (also
  vector).
\item \textbf{Synthetic bold by stroking.} PDF text rendering mode~2 both fills
  and strokes each glyph, so a medium outline gains weight from a chosen stroke
  width. The package patches \cs{bfseries} (not merely \cs{textbf}), so bold
  works in headings, tables and list labels; and it provides \cs{bd}, which
  bolds any single math symbol---Latin, Greek or other---\emph{in place},
  keeping its existing shape. Genuine bold designs (sans, typewriter) are left
  untouched. The same stroking idea is packaged independently as
  \pkg{xfakebold}.
\end{enumerate}

\section{Usage}

\begin{Verbatim}
\usepackage{amsmath}       % load amsmath/amssymb first, if wanted
\usepackage{concrete-vec}  % ... then load this package last
\end{Verbatim}

Load \pkg{concrete-vec} \emph{after} \pkg{amsmath} and any other math package,
because \pkg{mathastext} must be the last math package read. That is the only
ordering rule.

\subsection{A minimal document}

\begin{Verbatim}
\documentclass{article}
\usepackage{amsmath}
\usepackage{concrete-vec}
\begin{document}
Concrete text, with \textbf{simulated bold} and \emph{italic}.
\begin{align}
  \mathrm{d}X_t &= \mu(X_t)\,\mathrm{d}t + \sigma(X_t)\,\mathrm{d}W_t, &
  \bd{v}\cdot\bd{w} &= \sum_{i=1}^n v_i w_i, & \bd{\pi} &\approx 3.14.
\end{align}
\end{document}
\end{Verbatim}

Here \cs{bd} bolds each symbol in place: $\bd{v}$ and $\bd{w}$ stay italic,
$\bd{\pi}$ is a genuine bold $\pi$---something \cs{mathbf} cannot produce. The
same \cs{bd} also works in running text (there it is ordinary bold), so a
single command serves both modes.

\subsection{This manual}

This document is itself typeset with \pkg{concrete-vec}, so its body text,
headings and every formula are live examples. For instance
\[
  u(t,x) = \mathbb{E}\Big[ \int_t^T \textrm{e}^{-r(s-t)} f(X_s)\,\mathrm{d}s
    \;\Big|\; X_t = x \Big],
  \qquad \alpha,\beta,\gamma,\Gamma,\Lambda,\Omega \in \mathbb{R},
\]
and $\bd{A}\bd{x} = \bd{b}$ shows bold letters in mathematics next to the
ordinary weight $Ax=b$; note that $\bd{x}$ keeps its italic shape.

\section{Options}

All options are key/value or plain switches; unknown options are passed on to
\pkg{mathastext}, so its options (e.g.\ \opt{italic}, \opt{subdued}) may be
given here directly.

\begin{description}
\item[\opt{bold} / \opt{nobold}] \hfill (default \opt{bold})\\
  Enable or disable synthetic bold entirely. With \opt{nobold}, \cs{bfseries}
  is left as LaTeX found it.
\item[\opt{boldwidth=\textrm{$\langle$dimen$\rangle$}}] \hfill (default
  \opt{0.03em})\\
  Stroke width for synthetic bold. \opt{0.03em} is 0.3\,pt at 10\,pt and
  scales with the type size. Heavier values (e.g.\ \opt{0.4pt}) give a bolder
  weight. Also settable mid-document with \cs{setconcreteboldwidth}.
\item[\opt{mathbold} / \opt{nomathbold}] \hfill (default \opt{nomathbold})\\
  By default \cs{mathbf} is left as the standard upright Latin bold alphabet,
  and \cs{bd} is the way to bold a math symbol. Pass \opt{mathbold} to instead
  reroute \cs{mathbf} (and \cs{boldsymbol}) through the in-place stroke, so
  that \cs{mathbf} too preserves shape and accepts any symbol. Provided mainly
  for backward compatibility.
\item[\opt{math} / \opt{nomath}] \hfill (default \opt{math})\\
  Whether to configure mathematics at all. \opt{nomath} gives Concrete text
  with the document's existing math setup untouched.
\item[\opt{greek=\textrm{$\langle$value$\rangle$}}] \hfill (default \opt{lgr})\\
  Source of Greek letters in math: \opt{lgr} (the CB Greek fonts, via
  \pkg{mathastext}'s \opt{LGRgreek}), \opt{euler}, \opt{symbol}, or \opt{none}.
  All are vector.
\item[\opt{frenchmath} / \opt{nofrenchmath}] \hfill (default \opt{frenchmath})\\
  Passes \opt{frenchmath} to \pkg{mathastext}: upright uppercase \emph{and}
  lowercase Greek, and upright operator names.
\item[\opt{lmodern} / \opt{nolmodern}] \hfill (default \opt{lmodern})\\
  Whether to load \pkg{lmodern} for the sans, typewriter and math-symbol slots.
  With \opt{nolmodern}, \pkg{cm-super} still supplies vector fonts for those.
\end{description}

\section{Commands}

\begin{description}
\item[\cs{bd\{\textrm{$\dots$}\}}] The main tool, and it works in \emph{both}
  modes. In running text it is ordinary bold (like \cs{textbf}). In mathematics
  it bolds by thickening the glyph \emph{in place}, so it keeps whatever shape
  it already has and works on any symbol, not just Latin letters: $\bd{x}$ is
  the italic $x$ made heavy, $\bd{\pi}$ a bold $\pi$, $\bd{\Gamma}$ a bold
  upright $\Gamma$. One command covers \verb|\bd{a heading}| and
  \verb|$\bd{\alpha}$| alike.
\item[\cs{mathbold\{\textrm{$\dots$}\}}] Strokes a whole subformula, e.g.\
  \verb|\mathbold{\alpha + \sum_i x_i}| gives
  $\mathbold{\alpha + \textstyle\sum_i x_i}$. \cs{bd} and \cs{mathbold} are the
  same operation; use whichever name reads better.
\item[\cs{concretebold}, \cs{concretenobold}] Switch stroking on/off for the
  text that follows, within the current group. Rarely needed directly.
\item[\cs{setconcreteboldwidth\{\textrm{$\langle$dimen$\rangle$}\}}] Change the
  stroke width mid-document.
\end{description}

\noindent
In mathematics \cs{bd} bolds the glyph by drawing its outline thicker, so an
italic letter stays italic---only the strokes get heavier. That is usually what
is wanted when emphasising a variable, and it is the one thing \cs{mathbf}
cannot do, since \cs{mathbf} switches to an upright bold alphabet.

\section{How the bold works, and its limits}

Synthetic bold is a fill-and-stroke, not a redrawn typeface. It is convincing
at text sizes and for emphasis, but:

\begin{itemize}
\item It thickens stems uniformly and does not reproduce the optical
  refinements of a true bold design.
\item At very large sizes, or very heavy \opt{boldwidth}, the outline can look
  slightly inked; reduce \opt{boldwidth} for display sizes.
\item It requires a PDF-producing engine: \texttt{pdflatex}, or
  \texttt{lualatex}. It has no effect with DVI-only workflows.
\end{itemize}

Bold is applied only where the current family is Concrete, so \cs{textsf} and
\cs{texttt} keep their genuine Latin Modern bold rather than being
double-stroked.

\section{Requirements}

A T1-encoded Concrete document needs, beyond a standard \TeX\ Live or MiK\TeX:
the \pkg{ccfonts} package (for \opt{t1ccr.fd}), the \pkg{ecc} font metrics, and
the \pkg{cm-super} outlines; \pkg{mathastext}; \pkg{pdfrender}; and, for
\opt{greek=lgr}, the CB Greek fonts (\pkg{cbfonts}, \pkg{cbfonts-fd}). All are
free and present in a full distribution.

\section{License}

Copyright \copyright\ 2026 Matthew Lorig. This work may be distributed and/or
modified under the LaTeX Project Public License, version 1.3c or later.

\end{document}
