82
votes
Highlight, textcolor, and boldface simultaneously
\documentclass{article}
\usepackage{xcolor}
\begin{document}
~\\
\colorbox{pink}{highlight}\\
\colorbox{green}{highlight}\\
\colorbox{yellow}{highlight}\\
\bfseries\colorbox{pink}{highlight + boldface}...
63
votes
Make specific author bold using biblatex
Since biblatex 3.4/biber 2.5, there is a general "annotation" functionality to do things like this, for example:
\documentclass{article}
\usepackage{biblatex}
\usepackage{filecontents}
\begin{...
44
votes
How do I get \texttt with bold face in LaTeX?
There are the Latin Modern Fonts, from their README:
The fonts are based on Donald E. Knuth's Computer Modern fonts in the
PostScript Type 1 format
In family lmtt, there are even three series:
\...
33
votes
Make specific author bold using biblatex
As I couldn't use https://tex.stackexchange.com/a/73246/7561 as well, and in case others stumble into this looking for a solution, I'm updating the answers. As pointed by Adam Liter, in the comments ...
33
votes
Accepted
How to write bold, italic and sans-serif at the same time?
Your issue is "font-dependent".
Background
Indeed, special shapes of a font (bold, italic, slanted, small caps) are not defined relatively to a main font (its regular shape), but independently. The "...
29
votes
Accepted
Automatic bold for every first character of a line
Assuming you do want fixed line ends:
\documentclass{article}
\newcommand\dob[1]{\textbf{#1}}
\newenvironment{boldfirst}{\obeylines\everypar{\dob}}{}
\begin{document}
\begin{boldfirst}
Lorem ipsum ...
27
votes
Accepted
Is there any reason not to use \let to redefine a deprecated control sequence to the currently recommended one?
Is there any reason(s) not to use \let to redefine \bf to \bfseries and \it to \itshape?
Yes, there are good reasons. :-) With the above \let-based setup, {\bf\it ...} produces bold-italic. In ...
26
votes
Accepted
bold just one line inside of lstlisting
The best way to do this would be to use the escapeinside command, like this:
\documentclass{article}
\usepackage{listings}
\lstset{
escapeinside={(*}{*)}
}
\begin{document}
\begin{lstlisting}
//...
24
votes
Automatic bold for every first character of a line
Here's a more complicated version that tries to preserve kerning between the first two letters, as shown in the last two lines.
As in Thruston's answer, accented first characters must be enclosed in ...
24
votes
Format whole row of table as bold
Maybe this? I introduce a \setrow{...} macro invoked on the first element of a row, which applies to each cell of that row (and is then reset). It employs the >{} and <{} feature of tabularx.
...
24
votes
Accepted
How do you pronounce letters generated with \Bbb and \mathbb?
BBB stands for blackboard bold, but "double struck" is also used (e.g. ℝ). However how it should be pronounced is another matter -- between reading out the markup ("dollar dollar backlash B B B space ...
23
votes
How do I get \texttt with bold face in LaTeX?
I just ran across it and found a simpler answer here:
https://en.wikibooks.org/wiki/LaTeX/Fonts
\usepackage{bold-extra}
...
\texttt{TT Text \textbf{Bold TT Text}}
23
votes
Is there any reason not to use \let to redefine a deprecated control sequence to the currently recommended one?
The commands \rm, \bf etc are called "deprecated" because they have been removed from the latex kernel. The way the commands work don't fit in the (much better) "new font selection scheme" (nfss) used ...
21
votes
Add bold enumerate items
This is in response to this comment by Raffi Khatchadourian on the accepted answer: "I see a problem here: this answer is redefining the numbering style completely instead of enhancing it, i.e., ...
21
votes
Accepted
\textit is to \emph as \textbf is to...?
The idea behind \emph is that it provides a high level way for giving emphasis to a part of the text. High level in the sense it is “independent” of the actual implementation.
The default behavior of ...
19
votes
How do I write "LaTeX" in LaTeX with the first letter bolded?
You can make a small extension to the metalogo package, which enables you to choose a different initial “L”.
\documentclass{article}
\usepackage{metalogo}
\usepackage{xpatch}
\makeatletter
\...
18
votes
Accepted
Why can't I get a bold Greek letter?
You can use the bm-package
\documentclass[paper=a4, fontsize=12pt]{article} % A4 paper and 11pt
% font size
\usepackage[english]{babel} % English language/hyphenation
\usepackage{amsmath,amsfonts,...
17
votes
Small Caps and Bold Face
As an extension of accepted answer https://tex.stackexchange.com/a/27413/1340, I explain here how to use Latin Modern while taking serif bold small capitals from Computer Modern (= CM) Super. As ...
15
votes
Accepted
Command for both bold and colored text
Simply
\newcommand\boldblue[1]{\textcolor{blue}{\textbf{#1}}}
15
votes
Accepted
Cannot stop Latin character being emboldened after Greek character emboldened
There are two distinct issues with your code:
\bf is a switch and doesn't take an argument. Its scope extends to the end of the current group. (Same for \normalfont, which incidentally is a text-mode ...
14
votes
Accepted
italicization with \textit does not work
You'll notice the following warning in your .log file:
LaTeX Font Warning: Font shape `OT1/cmss/bx/it' undefined
(Font) using `OT1/cmss/bx/n' instead on input line 4.
It suggests that ...
14
votes
Accepted
Is it okay to do $\bf Text$?
LaTeX itself hasn't defined \bf in the format since LaTeX2e was introduced in 1993.
So depending on the document class you use
You may find that \bf is defined for compatibility with documents from ...
13
votes
Make specific author bold using biblatex
This is more or less a copy of my answer to Highlight an author in bibliography using biblatex allowing bibliography style to format it.
The following implements Audrey's solution for name hashes. The ...
13
votes
Accepted
How to perform keyboard shortcuts like Ctrl+I for italics or Ctrl+U for underlining in LyX?
By default Ctrl+I may be set to "inset-toggle" which in regular use doesn't apply, while Ctrl+U should be set to "font-underline" (as is Alt+C U).
You are able to change the key binding sequences to ...
13
votes
Accepted
boldsymbol badly modifies spacing
Load the bm package and the problem goes away, both using \bm and \boldsymbol (which gets redefined by bm to be the same as \bm).
This spacing issue is one of the reasons why \bm should be used for ...
13
votes
How to "unbold" this?
You can just type
\chapter*{\normalfont An Abstract of the Thesis of}
%\addcontentsline{toc}{chapter}{\protect\numberline{}Abstract}
\addcontentsline{toc}{chapter}{Abstract}
(Switch comments for ...
13
votes
Accepted
Issues with nesting \textbf and \textit
LaTeX warns to the terminal and log file
LaTeX Font Warning: Font shape `OT1/cmss/bx/it' undefined
(Font) using `OT1/cmss/bx/n' instead on input line 24.
which says that the computer ...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
bold × 854fonts × 188
math-mode × 150
italic × 75
formatting × 66
boldmath × 53
symbols × 42
tables × 38
table-of-contents × 35
small-caps × 35
xetex × 30
greek × 29
fontspec × 28
macros × 25
equations × 24
sectioning × 23
amsmath × 23
biblatex × 21
beamer × 20
bibliographies × 20
bm × 20
color × 19
enumerate × 19
siunitx × 19
sans-serif × 18