3.4 Varias formas de resaltar y citar texto

For highlighting text you can customize the font shape, weight, or size (see Section 9.3.1 on page 659). Text can also be uppercased, underlined, or the spacing between letters can be varied. Ways for performing such operations are offered by the four packages textcase, ulem, soul, and microtype discussed here.

General mechanisms for intelligent and context-dependent quoting are provided by the csquotes package, and for typesetting web resources we look at the packages url and uri.

We also cover a few more specialized packages, i.e., dashundergaps (for producing simple forms as an application of the ulem package) and embrac for producing upright parentheses or brackets while emphasizing text using italic font shapes.

3.4.1 Cambiar caso de texto de forma inteligente (anteriormente textcase)

The standard LaTEX commands nd hange the characters in their arguments to uppercase or lowercase, respectively, thereby expanding macros as needed. For example,

3.4.2 csquotes - Comillas sensibles al contexto

Correctly quoting textual material usually depends on the context and requires some care. Not only do the quote characters change, for example, if the quote text itself contains quoted material, but one also has to ensure consistent attributions, etc.

LaTEX itself offers rudimentary support for quotes in the English language, but not much else. For display quotes it has the quote environment, and for longer quotations it offers the quotation environment, but neither adds quote characters. In most classes these environments indent the text from both sides, and quotation typically also indents each paragraph. For in-line quotes, single or double quotation marks are used, but it is up to the user to select the correct pairs depending on the circumstances. People sometimes use straight marks (“), but this gives incorrect results.

3.4.3 embrac - Corchetes verticales y paréntesis

In his book “The Elements of Typographic Style” Robert Bringhurst writes, “Use upright (i.e., ‘roman’) rather than sloped parentheses, square brackets and braces, even if the context is italic”, and explains this further with

3.4.4 ulem - Enfatizar y copiar y editar mediante subrayado

LaTEX encourages the use of the ommand and the

If problems occur, you might try enclosing the offending command in braces, because everything inside braces is internally put inside an . Thus, braces suppress stretching and line breaks in the text they enclose. That is one of the reasons that nested emphasis constructs are not always treated correctly by this package if the inner one contains more than a single word.

3.4.5 dashundergaps - Producir formularios para completar

An interesting application of ulem is the package dashundergaps, originally written by Luca Merciadri and reimplemented by Frank Mittelbach. Its main purpose is to provide “underlined” gaps (possibly numbered) for use in fill-in tests and similar forms. The main command it provides is .

3.4.6 microtype & soul - Espaciado de letras o robo de ovejas

Frederic Goudy (1865–1947) supposedly said, “Anyone who would letterspace lower case would steal sheep” and Erik Spiekermann used this quote in a title for one of his books on typography [181]. Whether true or a myth, the topic of letterspacing clearly provokes heated discussions among typographers and is considered bad practice in most situations because it changes the “gray” level of the text and thus disturbs the flow of reading. Nevertheless, there are legitimate reasons for undertaking letterspacing. For example, display type often needs a looser setting, and in most fonts uppercased text is improved this way. You may also find letterspacing being used to indicate emphasis, although this exhibits the gray-level problem.

Until fairly recently the TEX engines were fairly ill equipped when it came to supporting letterspacing. In theory, the best solution is to use specially designed fonts rather than trying to solve the problem with a macro package. Because this requires the availability of such fonts, it is not an option for most users. Thus, for several decades the only practical solution was a macro-based approach implemented by Melchior Franz with his soul package, even though that means dealing with a number of restrictions.

With the event of pdfTEX version 1.4 or alternatively the LuaTEX engine, this situation changed because these engines1 provide facilities for letterspacing (also known as tracking) as part of the font machinery. This is explored by the microtype package that we already introduced in Section 3.1.3. In the remainder of this section we now compare the two packages with respect to their letterspacing features and also show some of the other aspects of soul that make it worthwhile to consider, even though for font tracking microtype should probably be the first choice.2 The microtype package provides two methods for tracking: ad hoc tracking through special commands and general tracking set up for individual (groups of) fonts. Figure 3.1 shows a sentence typeset at different tracking levels for comparison.

3.4.7 url - Composición tipográfica de URL, nombres de rutas y similares

E-mail addresses, URLs, path or directory names, and similar objects usually require some attention to detail when typeset. For one thing, they often contain characters with special significance to LaTEX, such as the characters ~, #, &, %, {, or }. In addition, breaking them across lines should be avoided or at least done with special care. For example, it is usually not wise to break at a hyphen, because then it is not clear whether the hyphen was inserted because of the break (as it would be the case with normal words) or was already present. Similar reasons make breaks at a space undesirable. To help with these issues, Donald Arseneau wrote the url package, which attempts to solve most of these problems.

The package does not explicitly1 provide links from URLs to external resources.

3.4.8 uri - Composición tipográfica de varios tipos de URI

A Uniform Resource Identifier (URI) is a string of characters that unambiguously identifies a resource across a network, typically the World Wide Web. The most common type of a URI is a URL, natively understood by any Web browser, but many other types of URIs with associated protocols exist. For example, Digital Object Identifiers (DOIs) are widely used to identify academic information, such as journal articles or research reports or arXiv URIs (pronounced “archive”) that refer to electronic preprints in a huge repository holding roughly 2.0 million entries. However, without suitable plugins few browsers know how to deal with DOI:10.1111/coin.12165 or can handle a request for arXiv:math/9201303 (Donald Knuth’s paper on “Stable husbands”).

The uri package by Martin Münch helps you to format such URIs uniformly in your document and — if used together with hyperref — provide clickable links in your PDF that resolve to the document location, e.g., to https://arxiv.org/abs/math/ 9201303 given the above input.

The main URI types1 supported by the package are shown in the next example: