Will two-letter font style commands (bf , it , …) ever be resurrected in LaTeX?
I understand that bf
and it
are now obsolete in LaTeX and that textbf
and textit
are proper, as they produce more sophisticated (in particular, cumulative and properly kerned) changes to font style. I have read the English version of "Obsolete commands and packages", v. 1.8.5.7 of l2tabu, Sec. 2.1 and I understand the rules and their reasons, as well as the several other commands that are affected.
However, I find it convenient to use LaTeX for notetaking during lectures, and in that rushed environment, shortening a command by any number of keystrokes helps keep me from falling behind. bf
and its two-letter kin are still very useful to me for that reason, and once a presentation is finished I can go through and replace all appearances of bf
et al. with textbf
et al.
My question is this: is there a plan eventually to replace the short font style commands like bf
with the implementations of textbf
etc. some day, or should I expect bf
always to remain in existence but obsolete, for reasons of backward compatibility with original TeX? Original TeX has been greatly improved on in countless ways, but in the heat of transcription I sometimes miss its conciseness.
fonts macros formatting obsolete
|
show 1 more comment
I understand that bf
and it
are now obsolete in LaTeX and that textbf
and textit
are proper, as they produce more sophisticated (in particular, cumulative and properly kerned) changes to font style. I have read the English version of "Obsolete commands and packages", v. 1.8.5.7 of l2tabu, Sec. 2.1 and I understand the rules and their reasons, as well as the several other commands that are affected.
However, I find it convenient to use LaTeX for notetaking during lectures, and in that rushed environment, shortening a command by any number of keystrokes helps keep me from falling behind. bf
and its two-letter kin are still very useful to me for that reason, and once a presentation is finished I can go through and replace all appearances of bf
et al. with textbf
et al.
My question is this: is there a plan eventually to replace the short font style commands like bf
with the implementations of textbf
etc. some day, or should I expect bf
always to remain in existence but obsolete, for reasons of backward compatibility with original TeX? Original TeX has been greatly improved on in countless ways, but in the heat of transcription I sometimes miss its conciseness.
fonts macros formatting obsolete
24
You can alias the commands,lettttexttt
and you will be ok.
– Yiannis Lazarides
Apr 9 '11 at 3:37
8
Perhaps you could migrate to a markdown format like multimarkdown?
– Emre
Apr 9 '11 at 3:41
4
Why don't you use a LaTeX editor that has keyboard shortcut support for the formatting commands? If you know how to use Emacs (or are willing to learn), AucTeX is best-of-breed, but there are other more GUI-oriented options (Texmaker, to name one) as well.
– Aaron
Apr 9 '11 at 8:48
5
@Yiannis: I think you meanletttttfamily
!
– Martin Scharrer♦
Jul 29 '11 at 20:10
2
tt
has the clear advantage to switch to a fully defined font, which is not achieved byttfamily
but rather bynormalfontttfamily
(as done not by LaTeX format, but by LaTeX standard classes when providing att
macro; I am skipping here math mode discussion). Why do people hatett
will remain an eternal mystery to me. KOMA-script turned it into an error in recent releases, breaking old, possibly useful packages, now unmaintained, which used it. Is this reasonable? No.
– jfbu
Jan 5 at 11:43
|
show 1 more comment
I understand that bf
and it
are now obsolete in LaTeX and that textbf
and textit
are proper, as they produce more sophisticated (in particular, cumulative and properly kerned) changes to font style. I have read the English version of "Obsolete commands and packages", v. 1.8.5.7 of l2tabu, Sec. 2.1 and I understand the rules and their reasons, as well as the several other commands that are affected.
However, I find it convenient to use LaTeX for notetaking during lectures, and in that rushed environment, shortening a command by any number of keystrokes helps keep me from falling behind. bf
and its two-letter kin are still very useful to me for that reason, and once a presentation is finished I can go through and replace all appearances of bf
et al. with textbf
et al.
My question is this: is there a plan eventually to replace the short font style commands like bf
with the implementations of textbf
etc. some day, or should I expect bf
always to remain in existence but obsolete, for reasons of backward compatibility with original TeX? Original TeX has been greatly improved on in countless ways, but in the heat of transcription I sometimes miss its conciseness.
fonts macros formatting obsolete
I understand that bf
and it
are now obsolete in LaTeX and that textbf
and textit
are proper, as they produce more sophisticated (in particular, cumulative and properly kerned) changes to font style. I have read the English version of "Obsolete commands and packages", v. 1.8.5.7 of l2tabu, Sec. 2.1 and I understand the rules and their reasons, as well as the several other commands that are affected.
However, I find it convenient to use LaTeX for notetaking during lectures, and in that rushed environment, shortening a command by any number of keystrokes helps keep me from falling behind. bf
and its two-letter kin are still very useful to me for that reason, and once a presentation is finished I can go through and replace all appearances of bf
et al. with textbf
et al.
My question is this: is there a plan eventually to replace the short font style commands like bf
with the implementations of textbf
etc. some day, or should I expect bf
always to remain in existence but obsolete, for reasons of backward compatibility with original TeX? Original TeX has been greatly improved on in countless ways, but in the heat of transcription I sometimes miss its conciseness.
fonts macros formatting obsolete
fonts macros formatting obsolete
edited Jul 29 '11 at 20:12
Martin Scharrer♦
200k45636818
200k45636818
asked Apr 9 '11 at 3:31
brannerchinesebrannerchinese
2,87762455
2,87762455
24
You can alias the commands,lettttexttt
and you will be ok.
– Yiannis Lazarides
Apr 9 '11 at 3:37
8
Perhaps you could migrate to a markdown format like multimarkdown?
– Emre
Apr 9 '11 at 3:41
4
Why don't you use a LaTeX editor that has keyboard shortcut support for the formatting commands? If you know how to use Emacs (or are willing to learn), AucTeX is best-of-breed, but there are other more GUI-oriented options (Texmaker, to name one) as well.
– Aaron
Apr 9 '11 at 8:48
5
@Yiannis: I think you meanletttttfamily
!
– Martin Scharrer♦
Jul 29 '11 at 20:10
2
tt
has the clear advantage to switch to a fully defined font, which is not achieved byttfamily
but rather bynormalfontttfamily
(as done not by LaTeX format, but by LaTeX standard classes when providing att
macro; I am skipping here math mode discussion). Why do people hatett
will remain an eternal mystery to me. KOMA-script turned it into an error in recent releases, breaking old, possibly useful packages, now unmaintained, which used it. Is this reasonable? No.
– jfbu
Jan 5 at 11:43
|
show 1 more comment
24
You can alias the commands,lettttexttt
and you will be ok.
– Yiannis Lazarides
Apr 9 '11 at 3:37
8
Perhaps you could migrate to a markdown format like multimarkdown?
– Emre
Apr 9 '11 at 3:41
4
Why don't you use a LaTeX editor that has keyboard shortcut support for the formatting commands? If you know how to use Emacs (or are willing to learn), AucTeX is best-of-breed, but there are other more GUI-oriented options (Texmaker, to name one) as well.
– Aaron
Apr 9 '11 at 8:48
5
@Yiannis: I think you meanletttttfamily
!
– Martin Scharrer♦
Jul 29 '11 at 20:10
2
tt
has the clear advantage to switch to a fully defined font, which is not achieved byttfamily
but rather bynormalfontttfamily
(as done not by LaTeX format, but by LaTeX standard classes when providing att
macro; I am skipping here math mode discussion). Why do people hatett
will remain an eternal mystery to me. KOMA-script turned it into an error in recent releases, breaking old, possibly useful packages, now unmaintained, which used it. Is this reasonable? No.
– jfbu
Jan 5 at 11:43
24
24
You can alias the commands,
lettttexttt
and you will be ok.– Yiannis Lazarides
Apr 9 '11 at 3:37
You can alias the commands,
lettttexttt
and you will be ok.– Yiannis Lazarides
Apr 9 '11 at 3:37
8
8
Perhaps you could migrate to a markdown format like multimarkdown?
– Emre
Apr 9 '11 at 3:41
Perhaps you could migrate to a markdown format like multimarkdown?
– Emre
Apr 9 '11 at 3:41
4
4
Why don't you use a LaTeX editor that has keyboard shortcut support for the formatting commands? If you know how to use Emacs (or are willing to learn), AucTeX is best-of-breed, but there are other more GUI-oriented options (Texmaker, to name one) as well.
– Aaron
Apr 9 '11 at 8:48
Why don't you use a LaTeX editor that has keyboard shortcut support for the formatting commands? If you know how to use Emacs (or are willing to learn), AucTeX is best-of-breed, but there are other more GUI-oriented options (Texmaker, to name one) as well.
– Aaron
Apr 9 '11 at 8:48
5
5
@Yiannis: I think you mean
letttttfamily
!– Martin Scharrer♦
Jul 29 '11 at 20:10
@Yiannis: I think you mean
letttttfamily
!– Martin Scharrer♦
Jul 29 '11 at 20:10
2
2
tt
has the clear advantage to switch to a fully defined font, which is not achieved by ttfamily
but rather by normalfontttfamily
(as done not by LaTeX format, but by LaTeX standard classes when providing a tt
macro; I am skipping here math mode discussion). Why do people hate tt
will remain an eternal mystery to me. KOMA-script turned it into an error in recent releases, breaking old, possibly useful packages, now unmaintained, which used it. Is this reasonable? No.– jfbu
Jan 5 at 11:43
tt
has the clear advantage to switch to a fully defined font, which is not achieved by ttfamily
but rather by normalfontttfamily
(as done not by LaTeX format, but by LaTeX standard classes when providing a tt
macro; I am skipping here math mode discussion). Why do people hate tt
will remain an eternal mystery to me. KOMA-script turned it into an error in recent releases, breaking old, possibly useful packages, now unmaintained, which used it. Is this reasonable? No.– jfbu
Jan 5 at 11:43
|
show 1 more comment
6 Answers
6
active
oldest
votes
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.
4
I'd imagine that if we ever succeed in writing LaTeX3 as a stand-alone format, we won't even includebf
, etc. There's nothing stopping you doingletbftextbf
, though.
– Joseph Wright♦
Apr 9 '11 at 7:37
1
@Joseph: Shouldn't it beletbfbfseries
? After allbf
doesn't take an argument.
– Martin Scharrer♦
Apr 9 '11 at 10:03
@Martin: From the question, it seemed that the idea was to usebf
as a short-hand fortextbf
, not forbfseries
. Hence my suggestion. (I'd say thatbf
is not a LaTeX command, so it does not have a 'defined' LaTeX syntax. So the OP can do what he likes!)
– Joseph Wright♦
Apr 9 '11 at 10:05
3
@Joseph: Ok, in his own document he can. As long no one still usedbf
in some package.
– Martin Scharrer♦
Apr 9 '11 at 10:08
add a comment |
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.
add a comment |
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{bgroupbfseriesletstar@currentstar@inbf@gobble}%
{bgroupitshapeletstar@currentstar@init}}
newcommand{star@inbf}{%
star@ifnext{egroup@gobble}{bgroupitshapeletstar@currentstar@initbf}}
newcommand{star@init}{%
star@ifnext{bgroupbfseriesletstar@currentstar@initbf}{egroup}}
newcommand{star@initbf}{star@ifnext{egroup@gobble}{egroup}}
letstar@currentstar@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
.
1
It would be great to see an explanation what@firstofone
does here.
– Hendrik Vogt
Jun 21 '11 at 15:38
See edit. Thanks for the tip.
– Bruno Le Floch
Jun 21 '11 at 21:11
Thanks for the edit! Now I remember: This trick reminded me of thelccode
trick I saw in several of Phillip Goutet's answers, but it's somewhat different.
– Hendrik Vogt
Jun 22 '11 at 9:08
@Hendrik: it is definitely inspired from thelccode
trick (which I think I learnt from Philippe Goutet). It is less powerful, though, since that won't work to change the catcode of a letter (except if that letter appears nowhere in control sequences in the argument).
– Bruno Le Floch
Jun 22 '11 at 12:50
4
Surely it would be easier at this stage to just write in markdown and then use e.g. Pandoc to convert it to LaTeX later…
– Seamus
May 26 '12 at 15:38
add a comment |
Following the answer of Bruno, the wiki
package allow a very simplified entry of
boldface and italics fonts using the Wikipedia syntax:
documentclass{article}
usepackage{wiki}
begin{document}
wikimarkup
Write in '''bold''', ''italic'' or '''''both'''''.
end{document}
Bold and italics can be nested and even overlapped, so that you can obtain the eqivalent to textit{intertextbf{sec}}textbf{tion}
with ''inter'''sec''tion'''
.
add a comment |
First, regarding the use of the PlainTeX-based font switching commands rm
, sf
, tt
, etc in a LaTeX document: Even though the LaTeX2e kernel does not define these commands, they are in fact still available if you use one of the "standard" document classes -- article
, report
, and book
-- or a document class that's based on these three classes. For more on how rm
, sf
, etc are implemented in the article
, report
, and book
classes see, e.g., this answer to the posting Is there any reason not to use let to redefine a deprecated control sequence to the currently recommended one?
Second, here's a solution that uses LuaLaTeX to convert some simple markdown-type text formatting "instructions" into LaTeX code. Specifically, text inside matched pairs of ***
, **
, and *
characters in a line of input is rendered in bold-italics, bold, and italics, respectively.
The operation of the Lua function that does the main work can be initiated and terminated via two LaTeX macros named MarkdownOn
and MarkdownOff
. The Lua function doesn't operate on material contained in verbatim
-like environments.
documentclass{article}
%% Lua-side code
usepackage{luacode}
begin{luacode}
in_verbatim = false
function markdown ( line )
-- don't operate on input if we're in a verbabim-type environment
if string.find ( line , "\begin{[vV]erbatim}" ) then
in_verbatim = true
elseif string.find ( line , "\end{[vV]erbatim}" ) then
in_verbatim = false
elseif in_verbatim == false then
line = string.gsub ( line, "%*%*%*(.-)%*%*%*" , "\textbf{\textit{%1}}")
line = string.gsub ( line, "%*%*(.-)%*%*" , "\textbf{%1}")
line = string.gsub ( line, "%*(.-)%*" , "\textit{%1}" )
end
return line
end
end{luacode}
%% TeX-side code
newcommandMarkdownOn{directlua{luatexbase.add_to_callback(
"process_input_buffer", markdown, "markdown" )}}
newcommandMarkdownOff{directlua{luatexbase.remove_from_callback(
"process_input_buffer", "markdown" )}}
setlengthparindent{0pt} % just for this example
begin{document}
MarkdownOn
Lua function texttt{markdown} turned on:
*italic*, **bold**, ***bold italic***
bigskip
A line inside a texttt{verbatim} environment:
begin{verbatim}
*italic*, **bold**, ***bold italic***
end{verbatim}
bigskip
MarkdownOff
Lua function texttt{markdown} turned off:
*italic*, **bold**, ***bold italic***
end{document}
1
Did the LaTeX kernel ever define those commands? As far as I know,bf
,it
etc. are TeX font switches and nothing to do with LaTeX.
– cfr
Aug 20 '16 at 21:34
@cfr - It depends on the version of LaTeX: The LaTeX2.09 kernel -- yes, I'll admit to being old enough to having used LaTeX2.09 for real work ... -- did definerm
,bf
, etc. In contrast, the LaTeX2e kernel does not. However, the "standard" document classes (but not thememoir
class) designed for LaTeX2e do provide definitions forrm
,bf
etc, and the definitions are set up to ensure that these font switching macros behave exactly as they would in a Plain-TeX document.
– Mico
Aug 20 '16 at 21:38
Fair enough. I never used 2.09. Memoir can define them, I think, if you use the relevant class option, but it will still complain with warnings, I believe.
– cfr
Aug 20 '16 at 21:45
@Mico "*the definitions are set up to ensure that these font switching macros behave exactly as they would in a Plain-TeX document. *" is not exactly true. Try in LaTeXLargett AAAshowoutput
, you will see it usesOT1/cmtt/m/n/14.4
and the meaning of the latter isselect font cmtt12 at 14.4pt
, which is not the same as in Plain TeX wherett
would also reset the fontsize, as it expands in text mode to the font switchtentt
andfonttentt=cmtt10 % typewriter
fromplain.tex
.
– jfbu
Jan 5 at 14:46
1
:) I could not find my quote of you in your answer but I had picked it from your comment, thus the sin is already attenuated as comments are more volatile :)
– jfbu
Jan 5 at 14:53
|
show 1 more comment
I had the same problem recently:
scrartcl Error: undefined old font command `bf'.
After some investigations, I found this on the tug.org web site:
makeatletter
DeclareOldFontCommand{rm}{normalfontrmfamily}{mathrm}
DeclareOldFontCommand{sf}{normalfontsffamily}{mathsf}
DeclareOldFontCommand{tt}{normalfontttfamily}{mathtt}
DeclareOldFontCommand{bf}{normalfontbfseries}{mathbf}
DeclareOldFontCommand{it}{normalfontitshape}{mathit}
DeclareOldFontCommand{sl}{normalfontslshape}{@nomathsl}
DeclareOldFontCommand{sc}{normalfontscshape}{@nomathsc}
makeatother
It allows to recover all "old" TeX commands we all like...
4
It allows, but you shouldn't. The class you are using does not provide them on purpose, because they are obsolete. You really should change to the proper font change commands. Besides, the question does not ask how to get the commands, to your answer misses the point a little.
– Phelype Oleinik
Jan 5 at 11:22
2
see my comment to OP
– jfbu
Jan 5 at 11:45
2
This does not answer the question. The question is whether there are plans to reintegrate the old TeX commands into LaTeX… You could have left a comment below David Carlisle's answer linking to that TUG site.
– TeXnician
Jan 5 at 12:27
1
@PhelypeOleinik I'm not sure if you have received the ping by Martin Scharrer.
– TeXnician
Jan 17 at 11:00
1
@TeXnician: It's not about the quality of the answer. Moderator flags are not for technical incorrect or just "wrong" answers. The "not an answer" is for posts which do not even try to answer the question: spam posts, follow-up questions or me-too posts, etc. There are not intended for quality control. For this the voting system is in place.
– Martin Scharrer♦
Jan 17 at 12:02
|
show 4 more comments
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "85"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f15361%2fwill-two-letter-font-style-commands-bf-it-ever-be-resurrected-in-latex%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
6 Answers
6
active
oldest
votes
6 Answers
6
active
oldest
votes
active
oldest
votes
active
oldest
votes
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.
4
I'd imagine that if we ever succeed in writing LaTeX3 as a stand-alone format, we won't even includebf
, etc. There's nothing stopping you doingletbftextbf
, though.
– Joseph Wright♦
Apr 9 '11 at 7:37
1
@Joseph: Shouldn't it beletbfbfseries
? After allbf
doesn't take an argument.
– Martin Scharrer♦
Apr 9 '11 at 10:03
@Martin: From the question, it seemed that the idea was to usebf
as a short-hand fortextbf
, not forbfseries
. Hence my suggestion. (I'd say thatbf
is not a LaTeX command, so it does not have a 'defined' LaTeX syntax. So the OP can do what he likes!)
– Joseph Wright♦
Apr 9 '11 at 10:05
3
@Joseph: Ok, in his own document he can. As long no one still usedbf
in some package.
– Martin Scharrer♦
Apr 9 '11 at 10:08
add a comment |
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.
4
I'd imagine that if we ever succeed in writing LaTeX3 as a stand-alone format, we won't even includebf
, etc. There's nothing stopping you doingletbftextbf
, though.
– Joseph Wright♦
Apr 9 '11 at 7:37
1
@Joseph: Shouldn't it beletbfbfseries
? After allbf
doesn't take an argument.
– Martin Scharrer♦
Apr 9 '11 at 10:03
@Martin: From the question, it seemed that the idea was to usebf
as a short-hand fortextbf
, not forbfseries
. Hence my suggestion. (I'd say thatbf
is not a LaTeX command, so it does not have a 'defined' LaTeX syntax. So the OP can do what he likes!)
– Joseph Wright♦
Apr 9 '11 at 10:05
3
@Joseph: Ok, in his own document he can. As long no one still usedbf
in some package.
– Martin Scharrer♦
Apr 9 '11 at 10:08
add a comment |
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.
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.
edited Apr 9 '11 at 13:01
answered Apr 9 '11 at 3:40
Alan MunnAlan Munn
159k28426701
159k28426701
4
I'd imagine that if we ever succeed in writing LaTeX3 as a stand-alone format, we won't even includebf
, etc. There's nothing stopping you doingletbftextbf
, though.
– Joseph Wright♦
Apr 9 '11 at 7:37
1
@Joseph: Shouldn't it beletbfbfseries
? After allbf
doesn't take an argument.
– Martin Scharrer♦
Apr 9 '11 at 10:03
@Martin: From the question, it seemed that the idea was to usebf
as a short-hand fortextbf
, not forbfseries
. Hence my suggestion. (I'd say thatbf
is not a LaTeX command, so it does not have a 'defined' LaTeX syntax. So the OP can do what he likes!)
– Joseph Wright♦
Apr 9 '11 at 10:05
3
@Joseph: Ok, in his own document he can. As long no one still usedbf
in some package.
– Martin Scharrer♦
Apr 9 '11 at 10:08
add a comment |
4
I'd imagine that if we ever succeed in writing LaTeX3 as a stand-alone format, we won't even includebf
, etc. There's nothing stopping you doingletbftextbf
, though.
– Joseph Wright♦
Apr 9 '11 at 7:37
1
@Joseph: Shouldn't it beletbfbfseries
? After allbf
doesn't take an argument.
– Martin Scharrer♦
Apr 9 '11 at 10:03
@Martin: From the question, it seemed that the idea was to usebf
as a short-hand fortextbf
, not forbfseries
. Hence my suggestion. (I'd say thatbf
is not a LaTeX command, so it does not have a 'defined' LaTeX syntax. So the OP can do what he likes!)
– Joseph Wright♦
Apr 9 '11 at 10:05
3
@Joseph: Ok, in his own document he can. As long no one still usedbf
in some package.
– Martin Scharrer♦
Apr 9 '11 at 10:08
4
4
I'd imagine that if we ever succeed in writing LaTeX3 as a stand-alone format, we won't even include
bf
, etc. There's nothing stopping you doing letbftextbf
, though.– Joseph Wright♦
Apr 9 '11 at 7:37
I'd imagine that if we ever succeed in writing LaTeX3 as a stand-alone format, we won't even include
bf
, etc. There's nothing stopping you doing letbftextbf
, though.– Joseph Wright♦
Apr 9 '11 at 7:37
1
1
@Joseph: Shouldn't it be
letbfbfseries
? After all bf
doesn't take an argument.– Martin Scharrer♦
Apr 9 '11 at 10:03
@Joseph: Shouldn't it be
letbfbfseries
? After all bf
doesn't take an argument.– Martin Scharrer♦
Apr 9 '11 at 10:03
@Martin: From the question, it seemed that the idea was to use
bf
as a short-hand for textbf
, not for bfseries
. Hence my suggestion. (I'd say that bf
is not a LaTeX command, so it does not have a 'defined' LaTeX syntax. So the OP can do what he likes!)– Joseph Wright♦
Apr 9 '11 at 10:05
@Martin: From the question, it seemed that the idea was to use
bf
as a short-hand for textbf
, not for bfseries
. Hence my suggestion. (I'd say that bf
is not a LaTeX command, so it does not have a 'defined' LaTeX syntax. So the OP can do what he likes!)– Joseph Wright♦
Apr 9 '11 at 10:05
3
3
@Joseph: Ok, in his own document he can. As long no one still used
bf
in some package.– Martin Scharrer♦
Apr 9 '11 at 10:08
@Joseph: Ok, in his own document he can. As long no one still used
bf
in some package.– Martin Scharrer♦
Apr 9 '11 at 10:08
add a comment |
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.
add a comment |
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.
add a comment |
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.
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.
answered Apr 9 '11 at 9:39
Will RobertsonWill Robertson
58.4k13156202
58.4k13156202
add a comment |
add a comment |
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{bgroupbfseriesletstar@currentstar@inbf@gobble}%
{bgroupitshapeletstar@currentstar@init}}
newcommand{star@inbf}{%
star@ifnext{egroup@gobble}{bgroupitshapeletstar@currentstar@initbf}}
newcommand{star@init}{%
star@ifnext{bgroupbfseriesletstar@currentstar@initbf}{egroup}}
newcommand{star@initbf}{star@ifnext{egroup@gobble}{egroup}}
letstar@currentstar@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
.
1
It would be great to see an explanation what@firstofone
does here.
– Hendrik Vogt
Jun 21 '11 at 15:38
See edit. Thanks for the tip.
– Bruno Le Floch
Jun 21 '11 at 21:11
Thanks for the edit! Now I remember: This trick reminded me of thelccode
trick I saw in several of Phillip Goutet's answers, but it's somewhat different.
– Hendrik Vogt
Jun 22 '11 at 9:08
@Hendrik: it is definitely inspired from thelccode
trick (which I think I learnt from Philippe Goutet). It is less powerful, though, since that won't work to change the catcode of a letter (except if that letter appears nowhere in control sequences in the argument).
– Bruno Le Floch
Jun 22 '11 at 12:50
4
Surely it would be easier at this stage to just write in markdown and then use e.g. Pandoc to convert it to LaTeX later…
– Seamus
May 26 '12 at 15:38
add a comment |
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{bgroupbfseriesletstar@currentstar@inbf@gobble}%
{bgroupitshapeletstar@currentstar@init}}
newcommand{star@inbf}{%
star@ifnext{egroup@gobble}{bgroupitshapeletstar@currentstar@initbf}}
newcommand{star@init}{%
star@ifnext{bgroupbfseriesletstar@currentstar@initbf}{egroup}}
newcommand{star@initbf}{star@ifnext{egroup@gobble}{egroup}}
letstar@currentstar@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
.
1
It would be great to see an explanation what@firstofone
does here.
– Hendrik Vogt
Jun 21 '11 at 15:38
See edit. Thanks for the tip.
– Bruno Le Floch
Jun 21 '11 at 21:11
Thanks for the edit! Now I remember: This trick reminded me of thelccode
trick I saw in several of Phillip Goutet's answers, but it's somewhat different.
– Hendrik Vogt
Jun 22 '11 at 9:08
@Hendrik: it is definitely inspired from thelccode
trick (which I think I learnt from Philippe Goutet). It is less powerful, though, since that won't work to change the catcode of a letter (except if that letter appears nowhere in control sequences in the argument).
– Bruno Le Floch
Jun 22 '11 at 12:50
4
Surely it would be easier at this stage to just write in markdown and then use e.g. Pandoc to convert it to LaTeX later…
– Seamus
May 26 '12 at 15:38
add a comment |
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{bgroupbfseriesletstar@currentstar@inbf@gobble}%
{bgroupitshapeletstar@currentstar@init}}
newcommand{star@inbf}{%
star@ifnext{egroup@gobble}{bgroupitshapeletstar@currentstar@initbf}}
newcommand{star@init}{%
star@ifnext{bgroupbfseriesletstar@currentstar@initbf}{egroup}}
newcommand{star@initbf}{star@ifnext{egroup@gobble}{egroup}}
letstar@currentstar@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
.
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{bgroupbfseriesletstar@currentstar@inbf@gobble}%
{bgroupitshapeletstar@currentstar@init}}
newcommand{star@inbf}{%
star@ifnext{egroup@gobble}{bgroupitshapeletstar@currentstar@initbf}}
newcommand{star@init}{%
star@ifnext{bgroupbfseriesletstar@currentstar@initbf}{egroup}}
newcommand{star@initbf}{star@ifnext{egroup@gobble}{egroup}}
letstar@currentstar@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
.
edited Jun 21 '11 at 21:09
answered Apr 9 '11 at 12:54
Bruno Le FlochBruno Le Floch
34k5115211
34k5115211
1
It would be great to see an explanation what@firstofone
does here.
– Hendrik Vogt
Jun 21 '11 at 15:38
See edit. Thanks for the tip.
– Bruno Le Floch
Jun 21 '11 at 21:11
Thanks for the edit! Now I remember: This trick reminded me of thelccode
trick I saw in several of Phillip Goutet's answers, but it's somewhat different.
– Hendrik Vogt
Jun 22 '11 at 9:08
@Hendrik: it is definitely inspired from thelccode
trick (which I think I learnt from Philippe Goutet). It is less powerful, though, since that won't work to change the catcode of a letter (except if that letter appears nowhere in control sequences in the argument).
– Bruno Le Floch
Jun 22 '11 at 12:50
4
Surely it would be easier at this stage to just write in markdown and then use e.g. Pandoc to convert it to LaTeX later…
– Seamus
May 26 '12 at 15:38
add a comment |
1
It would be great to see an explanation what@firstofone
does here.
– Hendrik Vogt
Jun 21 '11 at 15:38
See edit. Thanks for the tip.
– Bruno Le Floch
Jun 21 '11 at 21:11
Thanks for the edit! Now I remember: This trick reminded me of thelccode
trick I saw in several of Phillip Goutet's answers, but it's somewhat different.
– Hendrik Vogt
Jun 22 '11 at 9:08
@Hendrik: it is definitely inspired from thelccode
trick (which I think I learnt from Philippe Goutet). It is less powerful, though, since that won't work to change the catcode of a letter (except if that letter appears nowhere in control sequences in the argument).
– Bruno Le Floch
Jun 22 '11 at 12:50
4
Surely it would be easier at this stage to just write in markdown and then use e.g. Pandoc to convert it to LaTeX later…
– Seamus
May 26 '12 at 15:38
1
1
It would be great to see an explanation what
@firstofone
does here.– Hendrik Vogt
Jun 21 '11 at 15:38
It would be great to see an explanation what
@firstofone
does here.– Hendrik Vogt
Jun 21 '11 at 15:38
See edit. Thanks for the tip.
– Bruno Le Floch
Jun 21 '11 at 21:11
See edit. Thanks for the tip.
– Bruno Le Floch
Jun 21 '11 at 21:11
Thanks for the edit! Now I remember: This trick reminded me of the
lccode
trick I saw in several of Phillip Goutet's answers, but it's somewhat different.– Hendrik Vogt
Jun 22 '11 at 9:08
Thanks for the edit! Now I remember: This trick reminded me of the
lccode
trick I saw in several of Phillip Goutet's answers, but it's somewhat different.– Hendrik Vogt
Jun 22 '11 at 9:08
@Hendrik: it is definitely inspired from the
lccode
trick (which I think I learnt from Philippe Goutet). It is less powerful, though, since that won't work to change the catcode of a letter (except if that letter appears nowhere in control sequences in the argument).– Bruno Le Floch
Jun 22 '11 at 12:50
@Hendrik: it is definitely inspired from the
lccode
trick (which I think I learnt from Philippe Goutet). It is less powerful, though, since that won't work to change the catcode of a letter (except if that letter appears nowhere in control sequences in the argument).– Bruno Le Floch
Jun 22 '11 at 12:50
4
4
Surely it would be easier at this stage to just write in markdown and then use e.g. Pandoc to convert it to LaTeX later…
– Seamus
May 26 '12 at 15:38
Surely it would be easier at this stage to just write in markdown and then use e.g. Pandoc to convert it to LaTeX later…
– Seamus
May 26 '12 at 15:38
add a comment |
Following the answer of Bruno, the wiki
package allow a very simplified entry of
boldface and italics fonts using the Wikipedia syntax:
documentclass{article}
usepackage{wiki}
begin{document}
wikimarkup
Write in '''bold''', ''italic'' or '''''both'''''.
end{document}
Bold and italics can be nested and even overlapped, so that you can obtain the eqivalent to textit{intertextbf{sec}}textbf{tion}
with ''inter'''sec''tion'''
.
add a comment |
Following the answer of Bruno, the wiki
package allow a very simplified entry of
boldface and italics fonts using the Wikipedia syntax:
documentclass{article}
usepackage{wiki}
begin{document}
wikimarkup
Write in '''bold''', ''italic'' or '''''both'''''.
end{document}
Bold and italics can be nested and even overlapped, so that you can obtain the eqivalent to textit{intertextbf{sec}}textbf{tion}
with ''inter'''sec''tion'''
.
add a comment |
Following the answer of Bruno, the wiki
package allow a very simplified entry of
boldface and italics fonts using the Wikipedia syntax:
documentclass{article}
usepackage{wiki}
begin{document}
wikimarkup
Write in '''bold''', ''italic'' or '''''both'''''.
end{document}
Bold and italics can be nested and even overlapped, so that you can obtain the eqivalent to textit{intertextbf{sec}}textbf{tion}
with ''inter'''sec''tion'''
.
Following the answer of Bruno, the wiki
package allow a very simplified entry of
boldface and italics fonts using the Wikipedia syntax:
documentclass{article}
usepackage{wiki}
begin{document}
wikimarkup
Write in '''bold''', ''italic'' or '''''both'''''.
end{document}
Bold and italics can be nested and even overlapped, so that you can obtain the eqivalent to textit{intertextbf{sec}}textbf{tion}
with ''inter'''sec''tion'''
.
answered Feb 16 '15 at 3:29
FranFran
51.9k6115176
51.9k6115176
add a comment |
add a comment |
First, regarding the use of the PlainTeX-based font switching commands rm
, sf
, tt
, etc in a LaTeX document: Even though the LaTeX2e kernel does not define these commands, they are in fact still available if you use one of the "standard" document classes -- article
, report
, and book
-- or a document class that's based on these three classes. For more on how rm
, sf
, etc are implemented in the article
, report
, and book
classes see, e.g., this answer to the posting Is there any reason not to use let to redefine a deprecated control sequence to the currently recommended one?
Second, here's a solution that uses LuaLaTeX to convert some simple markdown-type text formatting "instructions" into LaTeX code. Specifically, text inside matched pairs of ***
, **
, and *
characters in a line of input is rendered in bold-italics, bold, and italics, respectively.
The operation of the Lua function that does the main work can be initiated and terminated via two LaTeX macros named MarkdownOn
and MarkdownOff
. The Lua function doesn't operate on material contained in verbatim
-like environments.
documentclass{article}
%% Lua-side code
usepackage{luacode}
begin{luacode}
in_verbatim = false
function markdown ( line )
-- don't operate on input if we're in a verbabim-type environment
if string.find ( line , "\begin{[vV]erbatim}" ) then
in_verbatim = true
elseif string.find ( line , "\end{[vV]erbatim}" ) then
in_verbatim = false
elseif in_verbatim == false then
line = string.gsub ( line, "%*%*%*(.-)%*%*%*" , "\textbf{\textit{%1}}")
line = string.gsub ( line, "%*%*(.-)%*%*" , "\textbf{%1}")
line = string.gsub ( line, "%*(.-)%*" , "\textit{%1}" )
end
return line
end
end{luacode}
%% TeX-side code
newcommandMarkdownOn{directlua{luatexbase.add_to_callback(
"process_input_buffer", markdown, "markdown" )}}
newcommandMarkdownOff{directlua{luatexbase.remove_from_callback(
"process_input_buffer", "markdown" )}}
setlengthparindent{0pt} % just for this example
begin{document}
MarkdownOn
Lua function texttt{markdown} turned on:
*italic*, **bold**, ***bold italic***
bigskip
A line inside a texttt{verbatim} environment:
begin{verbatim}
*italic*, **bold**, ***bold italic***
end{verbatim}
bigskip
MarkdownOff
Lua function texttt{markdown} turned off:
*italic*, **bold**, ***bold italic***
end{document}
1
Did the LaTeX kernel ever define those commands? As far as I know,bf
,it
etc. are TeX font switches and nothing to do with LaTeX.
– cfr
Aug 20 '16 at 21:34
@cfr - It depends on the version of LaTeX: The LaTeX2.09 kernel -- yes, I'll admit to being old enough to having used LaTeX2.09 for real work ... -- did definerm
,bf
, etc. In contrast, the LaTeX2e kernel does not. However, the "standard" document classes (but not thememoir
class) designed for LaTeX2e do provide definitions forrm
,bf
etc, and the definitions are set up to ensure that these font switching macros behave exactly as they would in a Plain-TeX document.
– Mico
Aug 20 '16 at 21:38
Fair enough. I never used 2.09. Memoir can define them, I think, if you use the relevant class option, but it will still complain with warnings, I believe.
– cfr
Aug 20 '16 at 21:45
@Mico "*the definitions are set up to ensure that these font switching macros behave exactly as they would in a Plain-TeX document. *" is not exactly true. Try in LaTeXLargett AAAshowoutput
, you will see it usesOT1/cmtt/m/n/14.4
and the meaning of the latter isselect font cmtt12 at 14.4pt
, which is not the same as in Plain TeX wherett
would also reset the fontsize, as it expands in text mode to the font switchtentt
andfonttentt=cmtt10 % typewriter
fromplain.tex
.
– jfbu
Jan 5 at 14:46
1
:) I could not find my quote of you in your answer but I had picked it from your comment, thus the sin is already attenuated as comments are more volatile :)
– jfbu
Jan 5 at 14:53
|
show 1 more comment
First, regarding the use of the PlainTeX-based font switching commands rm
, sf
, tt
, etc in a LaTeX document: Even though the LaTeX2e kernel does not define these commands, they are in fact still available if you use one of the "standard" document classes -- article
, report
, and book
-- or a document class that's based on these three classes. For more on how rm
, sf
, etc are implemented in the article
, report
, and book
classes see, e.g., this answer to the posting Is there any reason not to use let to redefine a deprecated control sequence to the currently recommended one?
Second, here's a solution that uses LuaLaTeX to convert some simple markdown-type text formatting "instructions" into LaTeX code. Specifically, text inside matched pairs of ***
, **
, and *
characters in a line of input is rendered in bold-italics, bold, and italics, respectively.
The operation of the Lua function that does the main work can be initiated and terminated via two LaTeX macros named MarkdownOn
and MarkdownOff
. The Lua function doesn't operate on material contained in verbatim
-like environments.
documentclass{article}
%% Lua-side code
usepackage{luacode}
begin{luacode}
in_verbatim = false
function markdown ( line )
-- don't operate on input if we're in a verbabim-type environment
if string.find ( line , "\begin{[vV]erbatim}" ) then
in_verbatim = true
elseif string.find ( line , "\end{[vV]erbatim}" ) then
in_verbatim = false
elseif in_verbatim == false then
line = string.gsub ( line, "%*%*%*(.-)%*%*%*" , "\textbf{\textit{%1}}")
line = string.gsub ( line, "%*%*(.-)%*%*" , "\textbf{%1}")
line = string.gsub ( line, "%*(.-)%*" , "\textit{%1}" )
end
return line
end
end{luacode}
%% TeX-side code
newcommandMarkdownOn{directlua{luatexbase.add_to_callback(
"process_input_buffer", markdown, "markdown" )}}
newcommandMarkdownOff{directlua{luatexbase.remove_from_callback(
"process_input_buffer", "markdown" )}}
setlengthparindent{0pt} % just for this example
begin{document}
MarkdownOn
Lua function texttt{markdown} turned on:
*italic*, **bold**, ***bold italic***
bigskip
A line inside a texttt{verbatim} environment:
begin{verbatim}
*italic*, **bold**, ***bold italic***
end{verbatim}
bigskip
MarkdownOff
Lua function texttt{markdown} turned off:
*italic*, **bold**, ***bold italic***
end{document}
1
Did the LaTeX kernel ever define those commands? As far as I know,bf
,it
etc. are TeX font switches and nothing to do with LaTeX.
– cfr
Aug 20 '16 at 21:34
@cfr - It depends on the version of LaTeX: The LaTeX2.09 kernel -- yes, I'll admit to being old enough to having used LaTeX2.09 for real work ... -- did definerm
,bf
, etc. In contrast, the LaTeX2e kernel does not. However, the "standard" document classes (but not thememoir
class) designed for LaTeX2e do provide definitions forrm
,bf
etc, and the definitions are set up to ensure that these font switching macros behave exactly as they would in a Plain-TeX document.
– Mico
Aug 20 '16 at 21:38
Fair enough. I never used 2.09. Memoir can define them, I think, if you use the relevant class option, but it will still complain with warnings, I believe.
– cfr
Aug 20 '16 at 21:45
@Mico "*the definitions are set up to ensure that these font switching macros behave exactly as they would in a Plain-TeX document. *" is not exactly true. Try in LaTeXLargett AAAshowoutput
, you will see it usesOT1/cmtt/m/n/14.4
and the meaning of the latter isselect font cmtt12 at 14.4pt
, which is not the same as in Plain TeX wherett
would also reset the fontsize, as it expands in text mode to the font switchtentt
andfonttentt=cmtt10 % typewriter
fromplain.tex
.
– jfbu
Jan 5 at 14:46
1
:) I could not find my quote of you in your answer but I had picked it from your comment, thus the sin is already attenuated as comments are more volatile :)
– jfbu
Jan 5 at 14:53
|
show 1 more comment
First, regarding the use of the PlainTeX-based font switching commands rm
, sf
, tt
, etc in a LaTeX document: Even though the LaTeX2e kernel does not define these commands, they are in fact still available if you use one of the "standard" document classes -- article
, report
, and book
-- or a document class that's based on these three classes. For more on how rm
, sf
, etc are implemented in the article
, report
, and book
classes see, e.g., this answer to the posting Is there any reason not to use let to redefine a deprecated control sequence to the currently recommended one?
Second, here's a solution that uses LuaLaTeX to convert some simple markdown-type text formatting "instructions" into LaTeX code. Specifically, text inside matched pairs of ***
, **
, and *
characters in a line of input is rendered in bold-italics, bold, and italics, respectively.
The operation of the Lua function that does the main work can be initiated and terminated via two LaTeX macros named MarkdownOn
and MarkdownOff
. The Lua function doesn't operate on material contained in verbatim
-like environments.
documentclass{article}
%% Lua-side code
usepackage{luacode}
begin{luacode}
in_verbatim = false
function markdown ( line )
-- don't operate on input if we're in a verbabim-type environment
if string.find ( line , "\begin{[vV]erbatim}" ) then
in_verbatim = true
elseif string.find ( line , "\end{[vV]erbatim}" ) then
in_verbatim = false
elseif in_verbatim == false then
line = string.gsub ( line, "%*%*%*(.-)%*%*%*" , "\textbf{\textit{%1}}")
line = string.gsub ( line, "%*%*(.-)%*%*" , "\textbf{%1}")
line = string.gsub ( line, "%*(.-)%*" , "\textit{%1}" )
end
return line
end
end{luacode}
%% TeX-side code
newcommandMarkdownOn{directlua{luatexbase.add_to_callback(
"process_input_buffer", markdown, "markdown" )}}
newcommandMarkdownOff{directlua{luatexbase.remove_from_callback(
"process_input_buffer", "markdown" )}}
setlengthparindent{0pt} % just for this example
begin{document}
MarkdownOn
Lua function texttt{markdown} turned on:
*italic*, **bold**, ***bold italic***
bigskip
A line inside a texttt{verbatim} environment:
begin{verbatim}
*italic*, **bold**, ***bold italic***
end{verbatim}
bigskip
MarkdownOff
Lua function texttt{markdown} turned off:
*italic*, **bold**, ***bold italic***
end{document}
First, regarding the use of the PlainTeX-based font switching commands rm
, sf
, tt
, etc in a LaTeX document: Even though the LaTeX2e kernel does not define these commands, they are in fact still available if you use one of the "standard" document classes -- article
, report
, and book
-- or a document class that's based on these three classes. For more on how rm
, sf
, etc are implemented in the article
, report
, and book
classes see, e.g., this answer to the posting Is there any reason not to use let to redefine a deprecated control sequence to the currently recommended one?
Second, here's a solution that uses LuaLaTeX to convert some simple markdown-type text formatting "instructions" into LaTeX code. Specifically, text inside matched pairs of ***
, **
, and *
characters in a line of input is rendered in bold-italics, bold, and italics, respectively.
The operation of the Lua function that does the main work can be initiated and terminated via two LaTeX macros named MarkdownOn
and MarkdownOff
. The Lua function doesn't operate on material contained in verbatim
-like environments.
documentclass{article}
%% Lua-side code
usepackage{luacode}
begin{luacode}
in_verbatim = false
function markdown ( line )
-- don't operate on input if we're in a verbabim-type environment
if string.find ( line , "\begin{[vV]erbatim}" ) then
in_verbatim = true
elseif string.find ( line , "\end{[vV]erbatim}" ) then
in_verbatim = false
elseif in_verbatim == false then
line = string.gsub ( line, "%*%*%*(.-)%*%*%*" , "\textbf{\textit{%1}}")
line = string.gsub ( line, "%*%*(.-)%*%*" , "\textbf{%1}")
line = string.gsub ( line, "%*(.-)%*" , "\textit{%1}" )
end
return line
end
end{luacode}
%% TeX-side code
newcommandMarkdownOn{directlua{luatexbase.add_to_callback(
"process_input_buffer", markdown, "markdown" )}}
newcommandMarkdownOff{directlua{luatexbase.remove_from_callback(
"process_input_buffer", "markdown" )}}
setlengthparindent{0pt} % just for this example
begin{document}
MarkdownOn
Lua function texttt{markdown} turned on:
*italic*, **bold**, ***bold italic***
bigskip
A line inside a texttt{verbatim} environment:
begin{verbatim}
*italic*, **bold**, ***bold italic***
end{verbatim}
bigskip
MarkdownOff
Lua function texttt{markdown} turned off:
*italic*, **bold**, ***bold italic***
end{document}
edited Apr 13 '17 at 12:34
Community♦
1
1
answered Aug 20 '16 at 21:17
MicoMico
275k30373761
275k30373761
1
Did the LaTeX kernel ever define those commands? As far as I know,bf
,it
etc. are TeX font switches and nothing to do with LaTeX.
– cfr
Aug 20 '16 at 21:34
@cfr - It depends on the version of LaTeX: The LaTeX2.09 kernel -- yes, I'll admit to being old enough to having used LaTeX2.09 for real work ... -- did definerm
,bf
, etc. In contrast, the LaTeX2e kernel does not. However, the "standard" document classes (but not thememoir
class) designed for LaTeX2e do provide definitions forrm
,bf
etc, and the definitions are set up to ensure that these font switching macros behave exactly as they would in a Plain-TeX document.
– Mico
Aug 20 '16 at 21:38
Fair enough. I never used 2.09. Memoir can define them, I think, if you use the relevant class option, but it will still complain with warnings, I believe.
– cfr
Aug 20 '16 at 21:45
@Mico "*the definitions are set up to ensure that these font switching macros behave exactly as they would in a Plain-TeX document. *" is not exactly true. Try in LaTeXLargett AAAshowoutput
, you will see it usesOT1/cmtt/m/n/14.4
and the meaning of the latter isselect font cmtt12 at 14.4pt
, which is not the same as in Plain TeX wherett
would also reset the fontsize, as it expands in text mode to the font switchtentt
andfonttentt=cmtt10 % typewriter
fromplain.tex
.
– jfbu
Jan 5 at 14:46
1
:) I could not find my quote of you in your answer but I had picked it from your comment, thus the sin is already attenuated as comments are more volatile :)
– jfbu
Jan 5 at 14:53
|
show 1 more comment
1
Did the LaTeX kernel ever define those commands? As far as I know,bf
,it
etc. are TeX font switches and nothing to do with LaTeX.
– cfr
Aug 20 '16 at 21:34
@cfr - It depends on the version of LaTeX: The LaTeX2.09 kernel -- yes, I'll admit to being old enough to having used LaTeX2.09 for real work ... -- did definerm
,bf
, etc. In contrast, the LaTeX2e kernel does not. However, the "standard" document classes (but not thememoir
class) designed for LaTeX2e do provide definitions forrm
,bf
etc, and the definitions are set up to ensure that these font switching macros behave exactly as they would in a Plain-TeX document.
– Mico
Aug 20 '16 at 21:38
Fair enough. I never used 2.09. Memoir can define them, I think, if you use the relevant class option, but it will still complain with warnings, I believe.
– cfr
Aug 20 '16 at 21:45
@Mico "*the definitions are set up to ensure that these font switching macros behave exactly as they would in a Plain-TeX document. *" is not exactly true. Try in LaTeXLargett AAAshowoutput
, you will see it usesOT1/cmtt/m/n/14.4
and the meaning of the latter isselect font cmtt12 at 14.4pt
, which is not the same as in Plain TeX wherett
would also reset the fontsize, as it expands in text mode to the font switchtentt
andfonttentt=cmtt10 % typewriter
fromplain.tex
.
– jfbu
Jan 5 at 14:46
1
:) I could not find my quote of you in your answer but I had picked it from your comment, thus the sin is already attenuated as comments are more volatile :)
– jfbu
Jan 5 at 14:53
1
1
Did the LaTeX kernel ever define those commands? As far as I know,
bf
, it
etc. are TeX font switches and nothing to do with LaTeX.– cfr
Aug 20 '16 at 21:34
Did the LaTeX kernel ever define those commands? As far as I know,
bf
, it
etc. are TeX font switches and nothing to do with LaTeX.– cfr
Aug 20 '16 at 21:34
@cfr - It depends on the version of LaTeX: The LaTeX2.09 kernel -- yes, I'll admit to being old enough to having used LaTeX2.09 for real work ... -- did define
rm
, bf
, etc. In contrast, the LaTeX2e kernel does not. However, the "standard" document classes (but not the memoir
class) designed for LaTeX2e do provide definitions for rm
, bf
etc, and the definitions are set up to ensure that these font switching macros behave exactly as they would in a Plain-TeX document.– Mico
Aug 20 '16 at 21:38
@cfr - It depends on the version of LaTeX: The LaTeX2.09 kernel -- yes, I'll admit to being old enough to having used LaTeX2.09 for real work ... -- did define
rm
, bf
, etc. In contrast, the LaTeX2e kernel does not. However, the "standard" document classes (but not the memoir
class) designed for LaTeX2e do provide definitions for rm
, bf
etc, and the definitions are set up to ensure that these font switching macros behave exactly as they would in a Plain-TeX document.– Mico
Aug 20 '16 at 21:38
Fair enough. I never used 2.09. Memoir can define them, I think, if you use the relevant class option, but it will still complain with warnings, I believe.
– cfr
Aug 20 '16 at 21:45
Fair enough. I never used 2.09. Memoir can define them, I think, if you use the relevant class option, but it will still complain with warnings, I believe.
– cfr
Aug 20 '16 at 21:45
@Mico "*the definitions are set up to ensure that these font switching macros behave exactly as they would in a Plain-TeX document. *" is not exactly true. Try in LaTeX
Largett AAAshowoutput
, you will see it uses OT1/cmtt/m/n/14.4
and the meaning of the latter is select font cmtt12 at 14.4pt
, which is not the same as in Plain TeX where tt
would also reset the fontsize, as it expands in text mode to the font switch tentt
and fonttentt=cmtt10 % typewriter
from plain.tex
.– jfbu
Jan 5 at 14:46
@Mico "*the definitions are set up to ensure that these font switching macros behave exactly as they would in a Plain-TeX document. *" is not exactly true. Try in LaTeX
Largett AAAshowoutput
, you will see it uses OT1/cmtt/m/n/14.4
and the meaning of the latter is select font cmtt12 at 14.4pt
, which is not the same as in Plain TeX where tt
would also reset the fontsize, as it expands in text mode to the font switch tentt
and fonttentt=cmtt10 % typewriter
from plain.tex
.– jfbu
Jan 5 at 14:46
1
1
:) I could not find my quote of you in your answer but I had picked it from your comment, thus the sin is already attenuated as comments are more volatile :)
– jfbu
Jan 5 at 14:53
:) I could not find my quote of you in your answer but I had picked it from your comment, thus the sin is already attenuated as comments are more volatile :)
– jfbu
Jan 5 at 14:53
|
show 1 more comment
I had the same problem recently:
scrartcl Error: undefined old font command `bf'.
After some investigations, I found this on the tug.org web site:
makeatletter
DeclareOldFontCommand{rm}{normalfontrmfamily}{mathrm}
DeclareOldFontCommand{sf}{normalfontsffamily}{mathsf}
DeclareOldFontCommand{tt}{normalfontttfamily}{mathtt}
DeclareOldFontCommand{bf}{normalfontbfseries}{mathbf}
DeclareOldFontCommand{it}{normalfontitshape}{mathit}
DeclareOldFontCommand{sl}{normalfontslshape}{@nomathsl}
DeclareOldFontCommand{sc}{normalfontscshape}{@nomathsc}
makeatother
It allows to recover all "old" TeX commands we all like...
4
It allows, but you shouldn't. The class you are using does not provide them on purpose, because they are obsolete. You really should change to the proper font change commands. Besides, the question does not ask how to get the commands, to your answer misses the point a little.
– Phelype Oleinik
Jan 5 at 11:22
2
see my comment to OP
– jfbu
Jan 5 at 11:45
2
This does not answer the question. The question is whether there are plans to reintegrate the old TeX commands into LaTeX… You could have left a comment below David Carlisle's answer linking to that TUG site.
– TeXnician
Jan 5 at 12:27
1
@PhelypeOleinik I'm not sure if you have received the ping by Martin Scharrer.
– TeXnician
Jan 17 at 11:00
1
@TeXnician: It's not about the quality of the answer. Moderator flags are not for technical incorrect or just "wrong" answers. The "not an answer" is for posts which do not even try to answer the question: spam posts, follow-up questions or me-too posts, etc. There are not intended for quality control. For this the voting system is in place.
– Martin Scharrer♦
Jan 17 at 12:02
|
show 4 more comments
I had the same problem recently:
scrartcl Error: undefined old font command `bf'.
After some investigations, I found this on the tug.org web site:
makeatletter
DeclareOldFontCommand{rm}{normalfontrmfamily}{mathrm}
DeclareOldFontCommand{sf}{normalfontsffamily}{mathsf}
DeclareOldFontCommand{tt}{normalfontttfamily}{mathtt}
DeclareOldFontCommand{bf}{normalfontbfseries}{mathbf}
DeclareOldFontCommand{it}{normalfontitshape}{mathit}
DeclareOldFontCommand{sl}{normalfontslshape}{@nomathsl}
DeclareOldFontCommand{sc}{normalfontscshape}{@nomathsc}
makeatother
It allows to recover all "old" TeX commands we all like...
4
It allows, but you shouldn't. The class you are using does not provide them on purpose, because they are obsolete. You really should change to the proper font change commands. Besides, the question does not ask how to get the commands, to your answer misses the point a little.
– Phelype Oleinik
Jan 5 at 11:22
2
see my comment to OP
– jfbu
Jan 5 at 11:45
2
This does not answer the question. The question is whether there are plans to reintegrate the old TeX commands into LaTeX… You could have left a comment below David Carlisle's answer linking to that TUG site.
– TeXnician
Jan 5 at 12:27
1
@PhelypeOleinik I'm not sure if you have received the ping by Martin Scharrer.
– TeXnician
Jan 17 at 11:00
1
@TeXnician: It's not about the quality of the answer. Moderator flags are not for technical incorrect or just "wrong" answers. The "not an answer" is for posts which do not even try to answer the question: spam posts, follow-up questions or me-too posts, etc. There are not intended for quality control. For this the voting system is in place.
– Martin Scharrer♦
Jan 17 at 12:02
|
show 4 more comments
I had the same problem recently:
scrartcl Error: undefined old font command `bf'.
After some investigations, I found this on the tug.org web site:
makeatletter
DeclareOldFontCommand{rm}{normalfontrmfamily}{mathrm}
DeclareOldFontCommand{sf}{normalfontsffamily}{mathsf}
DeclareOldFontCommand{tt}{normalfontttfamily}{mathtt}
DeclareOldFontCommand{bf}{normalfontbfseries}{mathbf}
DeclareOldFontCommand{it}{normalfontitshape}{mathit}
DeclareOldFontCommand{sl}{normalfontslshape}{@nomathsl}
DeclareOldFontCommand{sc}{normalfontscshape}{@nomathsc}
makeatother
It allows to recover all "old" TeX commands we all like...
I had the same problem recently:
scrartcl Error: undefined old font command `bf'.
After some investigations, I found this on the tug.org web site:
makeatletter
DeclareOldFontCommand{rm}{normalfontrmfamily}{mathrm}
DeclareOldFontCommand{sf}{normalfontsffamily}{mathsf}
DeclareOldFontCommand{tt}{normalfontttfamily}{mathtt}
DeclareOldFontCommand{bf}{normalfontbfseries}{mathbf}
DeclareOldFontCommand{it}{normalfontitshape}{mathit}
DeclareOldFontCommand{sl}{normalfontslshape}{@nomathsl}
DeclareOldFontCommand{sc}{normalfontscshape}{@nomathsc}
makeatother
It allows to recover all "old" TeX commands we all like...
answered Jan 5 at 11:17
lehallelehalle
1294
1294
4
It allows, but you shouldn't. The class you are using does not provide them on purpose, because they are obsolete. You really should change to the proper font change commands. Besides, the question does not ask how to get the commands, to your answer misses the point a little.
– Phelype Oleinik
Jan 5 at 11:22
2
see my comment to OP
– jfbu
Jan 5 at 11:45
2
This does not answer the question. The question is whether there are plans to reintegrate the old TeX commands into LaTeX… You could have left a comment below David Carlisle's answer linking to that TUG site.
– TeXnician
Jan 5 at 12:27
1
@PhelypeOleinik I'm not sure if you have received the ping by Martin Scharrer.
– TeXnician
Jan 17 at 11:00
1
@TeXnician: It's not about the quality of the answer. Moderator flags are not for technical incorrect or just "wrong" answers. The "not an answer" is for posts which do not even try to answer the question: spam posts, follow-up questions or me-too posts, etc. There are not intended for quality control. For this the voting system is in place.
– Martin Scharrer♦
Jan 17 at 12:02
|
show 4 more comments
4
It allows, but you shouldn't. The class you are using does not provide them on purpose, because they are obsolete. You really should change to the proper font change commands. Besides, the question does not ask how to get the commands, to your answer misses the point a little.
– Phelype Oleinik
Jan 5 at 11:22
2
see my comment to OP
– jfbu
Jan 5 at 11:45
2
This does not answer the question. The question is whether there are plans to reintegrate the old TeX commands into LaTeX… You could have left a comment below David Carlisle's answer linking to that TUG site.
– TeXnician
Jan 5 at 12:27
1
@PhelypeOleinik I'm not sure if you have received the ping by Martin Scharrer.
– TeXnician
Jan 17 at 11:00
1
@TeXnician: It's not about the quality of the answer. Moderator flags are not for technical incorrect or just "wrong" answers. The "not an answer" is for posts which do not even try to answer the question: spam posts, follow-up questions or me-too posts, etc. There are not intended for quality control. For this the voting system is in place.
– Martin Scharrer♦
Jan 17 at 12:02
4
4
It allows, but you shouldn't. The class you are using does not provide them on purpose, because they are obsolete. You really should change to the proper font change commands. Besides, the question does not ask how to get the commands, to your answer misses the point a little.
– Phelype Oleinik
Jan 5 at 11:22
It allows, but you shouldn't. The class you are using does not provide them on purpose, because they are obsolete. You really should change to the proper font change commands. Besides, the question does not ask how to get the commands, to your answer misses the point a little.
– Phelype Oleinik
Jan 5 at 11:22
2
2
see my comment to OP
– jfbu
Jan 5 at 11:45
see my comment to OP
– jfbu
Jan 5 at 11:45
2
2
This does not answer the question. The question is whether there are plans to reintegrate the old TeX commands into LaTeX… You could have left a comment below David Carlisle's answer linking to that TUG site.
– TeXnician
Jan 5 at 12:27
This does not answer the question. The question is whether there are plans to reintegrate the old TeX commands into LaTeX… You could have left a comment below David Carlisle's answer linking to that TUG site.
– TeXnician
Jan 5 at 12:27
1
1
@PhelypeOleinik I'm not sure if you have received the ping by Martin Scharrer.
– TeXnician
Jan 17 at 11:00
@PhelypeOleinik I'm not sure if you have received the ping by Martin Scharrer.
– TeXnician
Jan 17 at 11:00
1
1
@TeXnician: It's not about the quality of the answer. Moderator flags are not for technical incorrect or just "wrong" answers. The "not an answer" is for posts which do not even try to answer the question: spam posts, follow-up questions or me-too posts, etc. There are not intended for quality control. For this the voting system is in place.
– Martin Scharrer♦
Jan 17 at 12:02
@TeXnician: It's not about the quality of the answer. Moderator flags are not for technical incorrect or just "wrong" answers. The "not an answer" is for posts which do not even try to answer the question: spam posts, follow-up questions or me-too posts, etc. There are not intended for quality control. For this the voting system is in place.
– Martin Scharrer♦
Jan 17 at 12:02
|
show 4 more comments
Thanks for contributing an answer to TeX - LaTeX Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f15361%2fwill-two-letter-font-style-commands-bf-it-ever-be-resurrected-in-latex%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
24
You can alias the commands,
lettttexttt
and you will be ok.– Yiannis Lazarides
Apr 9 '11 at 3:37
8
Perhaps you could migrate to a markdown format like multimarkdown?
– Emre
Apr 9 '11 at 3:41
4
Why don't you use a LaTeX editor that has keyboard shortcut support for the formatting commands? If you know how to use Emacs (or are willing to learn), AucTeX is best-of-breed, but there are other more GUI-oriented options (Texmaker, to name one) as well.
– Aaron
Apr 9 '11 at 8:48
5
@Yiannis: I think you mean
letttttfamily
!– Martin Scharrer♦
Jul 29 '11 at 20:10
2
tt
has the clear advantage to switch to a fully defined font, which is not achieved byttfamily
but rather bynormalfontttfamily
(as done not by LaTeX format, but by LaTeX standard classes when providing att
macro; I am skipping here math mode discussion). Why do people hatett
will remain an eternal mystery to me. KOMA-script turned it into an error in recent releases, breaking old, possibly useful packages, now unmaintained, which used it. Is this reasonable? No.– jfbu
Jan 5 at 11:43