Will two-letter font style commands (\bf , \it , …) ever be resurrected in LaTeX?
The simple answer is no, because the new font commands work better for the reasons in the links you cite.
The best way to reduce your typing to customize your editor. In my editor (TeXShop on a Mac) I have the command \textbf{}
bound to Command-B, and \emph{}
to Command-I. (I generally don't use textit{}
) This makes it simple to use the "new" font commands in my source but with drastically reduced typing.
Most editors should be able to do this sort of shortcut.
To expand on Alan's good answer (and to reiterate his ‘no’) there's another big reason that \bf
and \it
are not recommended now: they are short and easy to type, but they do not have semantics. LaTeX attempts to separate content and formatting in its markup, and these font changing commands break such ideals.
In the rough, commands to type often as part of your document should be short and meaningful; commands to define formatting decisions should be long and descriptive.
Following on the markdown idea mentionned in comments by @Emre
, it can be coded in LaTeX. For instance, the code below gets *italics*
and **bold**
to work (with nesting as well).
\documentclass{article}
\makeatletter
\newcommand{\star@out}{%
\star@ifnext{\bgroup\bfseries\let\star@current\star@inbf\@gobble}%
{\bgroup\itshape\let\star@current\star@init}}
\newcommand{\star@inbf}{%
\star@ifnext{\egroup\@gobble}{\bgroup\itshape\let\star@current\star@initbf}}
\newcommand{\star@init}{%
\star@ifnext{\bgroup\bfseries\let\star@current\star@initbf}{\egroup}}
\newcommand{\star@initbf}{\star@ifnext{\egroup\@gobble}{\egroup}}
\let\star@current\star@out
\newcommand{\star@ifnext}[2]{%
\def \reserved@a {#1}%
\def \reserved@b {#2}%
\futurelet \@let@token \star@ifnext@aux
}
\begingroup
\catcode`\*=13
\@firstofone{\endgroup
\newcommand{*}{\star@current}
\newcommand{\star@ifnext@aux}{%
\ifx \@let@token *\let \reserved@c \reserved@a
\else \let \reserved@c \reserved@b
\fi
\reserved@c
}
}
\makeatother
\AtBeginDocument{\catcode`\*=13}
\begin{document}
Hello, *th**i**s* is a **test, *to see* whether** it works.
\end{document}
EDIT as per Hendrik Vogt's suggestion. The construction
\begingroup
\catcode`\*=13
\@firstofone{\endgroup ... }
ensures that every *
within the argument of \@firstofone
has catcode 13
. Namely, a group is started, in which *
are active, then \@firstofone
does nothing but forces TeX to read its argument, converting characters of the input file to tokens (with catcode fixed, except if someone later uses \scantokens
), and the group then ends with \endgroup
. The catcode of *
is restored, which means that any *
which is read later (i.e., not those in the argument of \@firstofone
) will be of catcode 12
(other). The advantage of this construction over doing \catcode`*=13
before and \catcode`*=12
after is that the catcode of *
keeps whichever value it had, even if it wasn't 12
.