Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

In HTML, there's the distinction between <em> as semantic markup and <i> as its pure-formatting equivalent. LaTeX has the same distinction: \emph is semantic markup, rendered using \textit.

HTML also includes an analogous distinction between <strong> and <b>. Does LaTeX define a semantic command (e.g. \strong{...}, but that doesn't exist) that gets rendered using \textbf?

EDIT: on very similar lines, does LaTeX define a semantic command like \quote{...} that will render using quotation marks (of some preferred type)? (HTML has <q>.)

share|improve this question
1  
For the quote macro see the csquotes package. –  Martin Scharrer Feb 2 '13 at 10:13

5 Answers 5

up vote 18 down vote accepted

You can define your own \strong command which switches between strong and normal text like \emph does with italic:

\documentclass{article}

\makeatletter
\newcommand{\strong}[1]{\@strong{#1}}
\newcommand{\@@strong}[1]{\textbf{\let\@strong\@@@strong#1}}
\newcommand{\@@@strong}[1]{\textnormal{\let\@strong\@@strong#1}}
\let\@strong\@@strong
\makeatother

\begin{document}

Text \strong{strong text \strong{strong2 \strong{st-\strong{st}-st}  yyy } xxxx} after

\end{document}

Result1


Or you can define different levels of "strong" using a counter:

\documentclass{article}
\usepackage{xcolor}

\newcounter{stronglevel}
\setcounter{stronglevel}{1}
\newcommand{\strong}[1]{%
    \csname strong\roman{stronglevel}\endcsname{{%
        \advance\value{stronglevel} by 1\relax
        #1%
    }}%
}
\newcommand{\strongi}[1]{\textbf{#1}}
\newcommand{\strongii}[1]{{\blendcolors*{!50!red}\color{.}#1}}
\newcommand{\strongiii}[1]{\textsf{#1}}
\newcommand{\strongiv}[1]{{\blendcolors*{!50!red}\color{.}#1}}

\begin{document}

Text \strong{strong text \strong{strong2 \strong{st-\strong{st}-st}  yyy } xxxx} after \strong{next}.

\end{document}

Result2

share|improve this answer
10  
Now you're just showing off... :-) –  Matthew Leingang Mar 31 '11 at 16:23
3  
@Matthew: Originally I had \strongiv which included \blink and a \strongv which used \smellbad. :-) Both require of course ePaper. –  Martin Scharrer Apr 2 '11 at 10:25

\emph doesn't render always as \textit. It switches between upright and italic as you can see if you nest \emphcommands:

\documentclass{article}
\begin{document}
abc \emph{some text \emph{emph} some text}
\end{document}

And there is no similar command which switches between bold and normal, but it would be easy to define. Simply copy the definition of \em and \emph from latex.ltx.

share|improve this answer
    
How would that definition work for strong? What would be the conditional you would check? Something like \iftextisbold? \em checks for positive \fontdimen1 What would be the analogue for bold? –  Seamus Mar 31 '11 at 11:56
5  
I would check if \f@series is equal to \bfdefault. –  Ulrike Fischer Mar 31 '11 at 12:05
3  
Should strong within strong be normal? Or maybe it should be more strong!!!: coloured text, or rendered in a caligraphic font or both. Or increased text size... The possibilities are endless... –  Seamus Mar 31 '11 at 12:16
8  
strong is not semantic in the same way that emph is: there is no typographical convention on using boldface in the way that there is for using italics. So the lack of a \strong command isn't surprising. –  Alan Munn Mar 31 '11 at 12:49
    
A good point WRT to switching in nesting. It turns out that standard HTML rendering doesn't do any switching in <em>, <strong>, <i> or <em>. –  eegg Apr 2 '11 at 10:35

The answer to your first question is "no, but it's easy to do it". Just add \let\strong\textbf to your preamble.

The second question's answer is "no, but there's a package that does it in a very clever way". The csquotes defines \enquote which does what you want.

share|improve this answer

I believe the absence of \strong (or the decision to use italic font for \emph) is a conscious one to discourage writers from using bold font in running text. The reason for this is that LaTeX tries to set paragraphs in such a way to obtain an equal level of 'grey', which looks better, and is easier on the eyes. For the same reason, underlining and letterspacing are not implemented by default, since they too affect text greyness.

Note that this of course raises a somewhat philosophical point: should a typesetting engine 'protect' its users from making a (typographically speaking) bad decision, or should they allow the user to do most anything they would want, up to the typographical equivalent of shooting oneself in the foot? I have the feeling that LaTeX mostly adheres to the philosophy of protecting the user---just look at how difficult it is (by default) to change all the typographical settings.

Of course this is essentially a non-answer ;) but I still wanted to make the point.

share|improve this answer
6  
Another thing LaTeX does in this vein is to make changing font face a little tricky: good typography practice suggests using the same font throughout. –  Seamus Mar 31 '11 at 13:31
1  
@Seamus: it would be best if it was easy to set any font at the start of the document, and then hard to change. Right now, my impression is that it is hard to do anything else than the standard fonts :). –  Bruno Le Floch Mar 31 '11 at 23:56
1  
@BrunoLeFloch Changing fonts is made significantly easier with the fontspec package, which works well with XeTeX and LuaTeX, at the very least. Adding arbitrary TTF or OTF fonts becomes a one-liner per font with fontspec. –  Elliott Slaughter Aug 30 '12 at 4:46

As Seamus and Ulrike have pointed out, the LaTeX core does not define \strong or another semantic command that uses \textbf. The beamer class, however, does something that comes close: In addition to \emph, it defines \alert which displays its argument in red color.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.