summaryrefslogtreecommitdiff
path: root/macros/latex-dev/required/graphics/grfguide.tex
diff options
context:
space:
mode:
Diffstat (limited to 'macros/latex-dev/required/graphics/grfguide.tex')
-rw-r--r--macros/latex-dev/required/graphics/grfguide.tex80
1 files changed, 48 insertions, 32 deletions
diff --git a/macros/latex-dev/required/graphics/grfguide.tex b/macros/latex-dev/required/graphics/grfguide.tex
index 585e87adc7..959486c05c 100644
--- a/macros/latex-dev/required/graphics/grfguide.tex
+++ b/macros/latex-dev/required/graphics/grfguide.tex
@@ -1,5 +1,5 @@
%% grfguide.tex Copyright (C) 1994-1999 David Carlisle
-%% Copyright (C) 2005-2021
+%% Copyright (C) 2005-2024
%% The LaTeX Project and any individual authors listed elsewhere
%% in this file.
%%
@@ -62,7 +62,8 @@ stroke
\begin{document}
\title{Packages in the `graphics' bundle}
\author{D. P. Carlisle \and The \LaTeX\ Project}
-\date{2021-03-05}
+
+\date{2024-05-22}
\maketitle
@@ -95,8 +96,10 @@ For special requirements you may edit a copy of these |cfg| files
to set up a site default for these options. Suppose that you wish
the \package{color} package to always default to use specials for the
PostScript driver, |dvisvgm|. In that case, create a file |color.cfg|
-containing the line:\\
-|\ExecuteOptions{dvisvgm}|\\
+containing the line:
+\begin{quote}
+ |\ExecuteOptions{dvisvgm}|
+\end{quote}
Normally you will want an identical file |graphics.cfg| to set a similar
default for the graphics packages.
@@ -113,12 +116,12 @@ The following two options are also supported, they do not correspond
to separate definition files, but are essentially aliases for the
|dvips| option (and |monochrome| in the case of |xdvi|).
\begin{quote}\raggedright
- |xdvi|, |oztex|
+ |xdvi|, |oztex|
\end{quote}
The following set of options are supported by these packages
with associated driver files extracted from the |drivers.dtx|
-documented source in this bundle. These are now, mainly of historic
+documented source in this bundle. These are now mainly of historic
interest but the documented sources do contain some useful code
and advice if you need to produce a new definition file for a new
driver or \TeX\ system. |drivers.dtx| also contains documented
@@ -206,11 +209,11 @@ your own colours use the |\definecolor| command.
This defines \m{name} as a colour which can be used in later colour
-commands. For example
-\begin{verbatim}
-\definecolor{light-blue}{rgb}{0.8,0.85,1}
-\definecolor{mygrey}{gray}{0.75}
-\end{verbatim}
+commands. For example:
+\begin{quote}
+ |\definecolor{light-blue}{rgb}{0.8,0.85,1}| \\
+ |\definecolor{mygrey}{gray}{0.75}|
+\end{quote}
\definecolor{light-blue}{rgb}{0.8,0.85,1}
\definecolor{mygrey}{gray}{0.75}
@@ -227,7 +230,7 @@ The basic syntax is:
|\color|\arg{name}
\end{decl}
-This is a \emph{declaration}, like |\bfseries| It changes the current
+This is a \emph{declaration}, like |\bfseries|. It changes the current
colour to \m{name} until the end of the current group or
environment.
@@ -259,7 +262,6 @@ See \texttt{mathcolor.pdf} for details on this command.
\subsubsection{Using colour specifications directly}
-
\begin{decl}
|\color|\oarg{model}\arg{specification}\\
|\textcolor|\oarg{model}\arg{specification}\arg{text}\\
@@ -271,18 +273,23 @@ the document preamble, but sometimes it is convenient to directly use
a colour without naming it first. To achieve this |\color| (and all
the other colour commands) take an optional argument specifying the
model. If this is used then the mandatory argument takes a
-\m{colour specification} instead of a \m{name}. For example:\\
-|\color[rgb]{1,0.2,0.3}|\\
+\m{colour specification} instead of a \m{name}. For example:
+\begin{quote}
+ |\color[rgb]{1,0.2,0.3}|
+\end{quote}
would directly select that colour.
-This is particularly useful for accessing the \textbf{named} model:\\
-|\color[named]{BrickRed}| selects the |dvips| colour BrickRed.
+This is particularly useful for accessing the \textbf{named} model:
+\begin{quote}
+ |\color[named]{BrickRed}|
+\end{quote}
+selects the |dvips| colour BrickRed.
Rather than repeatedly use |[named]| you may use |\definecolor| to
-provide convenient aliases:\\
-|\definecolor{myred}{named}{WildStrawberry}|
- \ldots\ |\color{myred}|\ \ldots
-
+provide convenient aliases:
+\begin{quote}
+ |\definecolor{myred}{named}{WildStrawberry}|\ldots |\color{myred}|\kern-10pt
+\end{quote}
Alternatively if you are happy to use the existing names from the
\textbf{named} model, you may use the |usenames| package option, which
effectively calls |\definecolor| on every colour in the \textbf{named}
@@ -396,7 +403,7 @@ you should set up a site-default in a file,
The graphics packages have some other options for controlling how many
of the features to enable:
\begin{description}
-\item[draft] suppress all the `special' features. In particular
+\item[draft] Suppress all the `special' features. In particular
graphics files are not included (but they are still read for size
info) just the filename is printed in a box of the correct size.
\item[final] The opposite of |draft|. Useful to over-ride a global
@@ -480,18 +487,23 @@ An abbreviation for |\scalebox{-1}[1]|\arg{text}.
Scale \emph{text} so that the width is \emph{h-length}.
If |!| is used as either length argument, the other argument is used
to determine a scale factor that is used in both directions.
- Normally \emph{v-length} refers to the height of the box, but in the
- star form, it refers to the `height + depth'.
+
As normal for \LaTeXe\ box length arguments, |\height|,
|\width|, |\totalheight|, |\depth| may be used to refer to the
original size of the box.
+ Normally \emph{v-length} refers to the height of the box, but in the
+ star form, |\resizebox*|, it refers to the `height + depth'.
+
|\resizebox{1in}{\height}{Some text}|:
\resizebox{1in}{\height}{Some text}
|\resizebox{1in}{!}{Some text}|:
\resizebox{1in}{!}{Some text}
+|\resizebox{!}{20pt}{Q} \resizebox*{!}{20pt}{Q}|:
+\resizebox{!}{20pt}{Q} \resizebox*{!}{20pt}{Q}
+
\subsection{Including Graphics Files}
The functions for graphics inclusion try to give the same user syntax
for including any kind of graphics file that can be understood by the
@@ -568,7 +580,7 @@ otherwise it will not use one of the others,
with a driver-defined order of preference.
|MediaBox| is always present.
-The |pagebox| key may be used to specify which bounding box specification to use,
+The |pagebox| key may be used to specify which bounding box specification to use.
The value should be one of
|mediabox|, |cropbox|, |bleedbox|, |trimbox|, |artbox|.
\item[viewport]\NEWfeature{1995/06/01}
@@ -602,7 +614,7 @@ The value should be one of
\item[scale] Scale factor.
\item[clip] Either `true' or `false' (or no value, which is equivalent
to `true'). Clip the graphic to the bounding box.
-\item[draft] a boolean valued key, like `clip'. Locally switches to
+\item[draft] A boolean valued key, like `clip'. Locally switches to
draft mode.
\item[type] Specify the graphics type.
\item[ext] Specify the file extension. This should \emph{only} be
@@ -614,12 +626,16 @@ The value should be one of
\item[quiet]\NEWfeature{2017/06/01}
Skip writing information to the log.
\item[page]\NEWfeature{2017/06/01}
-Page of a multi-page PDF file. (by default the first page will be used.)
+Page of a multi-page PDF file. (By default the first page will be used.)
\item[interpolate]\NEWfeature{2017/06/01}
Enable/disable interpolation of bitmap images by the viewer.
+\item[alt]\NEWfeature{2021/09/16}
+ Alternative text for accessibility uses. By default this key is not used
+ but users are encouraged to add descriptive text here that may be used in
+ tagged PDF or as the |alt| attribute in conversions to HTML.
\end{description}
-For the keys specifying the original size (i.e,, the bounding box,
+For the keys specifying the original size (i.e., the bounding box,
trim and viewport keys) the units can be omitted, in
which case bp (i.e., PostScript points) are assumed.
@@ -710,7 +726,7 @@ the \LaTeXe\ primitive |\input@path|. A list of directories, each in a
as the directory separator, even on Windows.)
The default setting of this path is
- |\input@path| that is: graphics files will be found wherever \TeX\
+ |\input@path|, so that graphics files will be found wherever \TeX\
files are found.
\begin{decl}
@@ -748,7 +764,7 @@ must exist at the time \LaTeX\ is used.
extension from the \emph{ext-list} specified with
|\DeclareGraphicsExtensions|.)
-\emph{ext} the file extension for which this rule applies. As a special
+\emph{ext} is the file extension for which this rule applies. As a special
case, \emph{ext} may be given as |*| to denote the default behaviour for
all undeclared extensions (see the example below).
@@ -838,7 +854,7 @@ argument would change (and generate errors) if the user were to load
\section{Remaining packages in the graphics bundle}
\subsection{Epsfig}
-This is a small package essentially a `wrapper' around the
+This is a small package, essentially a `wrapper' around the
\package{graphicx} package, defining a command |\psfig| which has the
syntax\\
|\psfig{file=xxx,...}| rather than |\includegraphics[...]{xxx}|.\\
@@ -860,7 +876,7 @@ As well as being used as a \LaTeX\ package, the macros may be extracted
with the \package{docstrip} options \texttt{plain,package}. In this case
the \LaTeX\ package declarations are omitted from the file, and the
macros may be directly used as part of another macro file (they work
-with any format based on plain \TeX.)
+with any format based on plain \TeX).
\subsection{Keyval}
The \package{keyval} package is intended to be used by other