summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/latex/beamer/beamerug-compatibility.tex
blob: b57de26d828ce43dd8bc2d9eedda4459866b25b8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
% Copyright 2003--2007 by Till Tantau
% Copyright 2010 by Vedran Mileti\'c
% Copyright 2012,2015 by Vedran Mileti\'c, Joseph Wright
% Copyright 2016 by Joseph Wright
% Copyright 2018 by Louis Stuart, Joseph Wright
%
% This file may be distributed and/or modified
%
% 1. under the LaTeX Project Public License and/or
% 2. under the GNU Free Documentation License.
%
% See the file doc/licenses/LICENSE for more details.

\subsection{Compatibility with Other Packages and Classes}

When using certain packages or classes together with the |beamer| class, extra options or precautions may be necessary.

\begin{package}{{AlDraTex}}
  Graphics created using AlDraTex must be treated like verbatim text. The reason is that DraTex fiddles with catcodes and spaces much like verbatim does. So, in order to insert a picture, either add the |fragile| option to the frame or use the |\defverbatim| command to create a box containing the picture.
\end{package}

\begin{package}{{alltt}}
  Text in an |alltt| environment must be treated like verbatim text. So add the |fragile| option to frames containing this environment or use |\defverbatim|.
\end{package}

\begin{package}{{amsthm}}
  This package is automatically loaded since \beamer\ uses it for typesetting theorems. If you do not wish it to be loaded, which can be necessary especially in |article| mode if the package is incompatible with the document class, you can use the class option |noamsthm| to suppress its loading. See Section~\ref{section-theorems} for more details.
\end{package}

\begin{package}{{babel}|[|\declare{|french|}|]|}
  When using the |french| style, certain features that clash with the functionality of the \beamer\ class will be turned off. For example, enumerations are still produced the way the theme dictates, not the way the |french| style does.
\end{package}

\begin{package}{{babel}|[|\declare{|spanish|}|]|}
  \beamernote
  When using the |spanish| style, certain features that clash with the functionality of the \beamer\ class will be turned off. In particular, the special behavior of the pointed brackets |<| and |>| is deactivated.

  \articlenote
  To make the characters |<| and |>| active in |article| mode, pass the option |activeospeccharacters| to the package |beamerbasearticle|. This will lead to problems with overlay specifications.
\end{package}

\begin{package}{{color}}
  \beamernote
  The |color| package is automatically loaded by |beamer.cls|. This makes it impossible to pass options to |color| in the preamble of your document in the normal manner. To pass a \meta{list of options} to |color|, you can use the following class option:

  \begin{classoption}{color={\normalfont\meta{list of options}}}
  Causes the \meta{list of options} to be passed on to the |color| package. If the \meta{list of options} contains more than one option you must enclose it in curly brackets.
  \end{classoption}

  \articlenote
  The |color| package is not loaded automatically if |beamerarticle| is loaded with the |noxcolor| option.
\end{package}

\begin{package}{{colortbl}}
  \beamernote
  With newer versions of |xcolor.sty|, you need to pass the option |table| to |xcolor.sty| if you wish to use |colortbl|. See the notes on |xcolor| below, on how to do this.
\end{package}

\begin{package}{{CJK}}
  \beamernote
  When using the |CJK| package for using Asian fonts, you must use the class option \declare{|CJK|}.
\end{package}

\begin{package}{{deluxetable}}
  \beamernote
  The caption generation facilities of |deluxetable| are deactivated. Instead, the caption template is used.
\end{package}

\begin{package}{{DraTex}}
  See |AlDraTex|.
\end{package}

\begin{package}{{enumerate}}
  \articlenote
  This package is loaded automatically in the |presentation| modes, but not in the |article| mode. If you use its features, you have to load the package ``by hand'' in the |article| mode.
\end{package}

\begin{class}{{foils}}
  If you wish to emulate the |foils| class using \beamer, please see Section~\ref{section-foiltex}.
\end{class}

\begin{package}{{fontenc}|[|\declare{|T1,EU1,EU2|}|]|}
  Use the |T1| option \emph{only} with fonts that have outline fonts available in the T1 encoding like |times| or the |lmodern| fonts. In a standard installation standard Computer Modern fonts (the fonts Donald Knuth originally designed and which are used by default) are \emph{not} available in the T1 encoding. Using this option with them will result in very poor rendering of your presentation when viewed with \pdf\ viewer applications like Acrobat, |xpdf|, |evince| or |okular|. To use the Computer Modern fonts with the T1 encoding, use the package |lmodern|. See also Section~\ref{section-font-encoding}. This applies both to |latex|+|dvips| and |pdflatex|

  Use the |EU1| option with |xelatex|, and |EU2| option with |lualatex|. Note that |xelatex| and |luatex| support OpenType fonts, and font encodings work very different compared to |pdflatex|. Again, see Section~\ref{section-font-encoding} for more information.
\end{package}

\begin{package}{{fourier}}
  The package switches to a T1~encoding, but it does not redefine all fonts such that outline fonts (non-bitmapped fonts) are used by default. For example, the sans-serif text and the typewriter text are not replaced. To use outline fonts for these, write |\usepackage{lmodern}| \emph{before} including the |fourier| package.
\end{package}

\begin{package}{{HA-prosper}}
  You cannot use this package with \beamer. However, you might try to use the package |beamerprosper| instead, see Section~\ref{section-prosper}.
\end{package}

\begin{package}{{hyperref}}
  \beamernote
  The |hyperref| package is automatically loaded by |beamer.cls| and certain options are set up. In order to pass additional options to |hyperref| or to override options, you can use the following class option:

  \begin{classoption}{hyperref={\normalfont\meta{list of options}}}
    Causes the \meta{list of options} to be passed on to the |hyperref| package.

    \example |\documentclass[hyperref={bookmarks=false}]{beamer}|
  \end{classoption}

  Alternatively, you can also use the |\hypersetup| command.

  \articlenote
  In the |article| version, you must include |hyperref| manually if you want to use it. You can do so by passing option |hyperref| to |beamerarticle|. It is not included automatically.
\end{package}

\begin{package}{{inputenc}|[|\declare{|utf8,utf8x|}|]|}
  \beamernote
  When using Unicode, you may wish to use \emph{some} of the following class options:
  \begin{classoption}{ucs}
    Loads the package |ucs| and passes the correct Unicode options to |hyperref|. Also, it preloads the Unicode code pages zero and one.
  \end{classoption}

  \begin{classoption}{utf8x}
    Same as the option |ucs|, but also sets the input encoding to |utf8x|. You could also use the option |ucs| and say |\usepackage[utf8x]{inputenc}| in the preamble. This also automatically loads |ucs| package in most \TeX\ systems.
  \end{classoption}

  If you use a Unicode character outside the first two code pages (which includes the Latin alphabet and the extended Latin alphabet) in a section or subsection heading, you have to use the command |\PreloadUnicodePage{|\meta{code page}|}| to give |ucs| a chance to preload these code pages. You will know that a character has not been preloaded, if you get a message like ``Please insert into preamble.'' The code page of a character is given by the unicode number of the character divided by 256.

  \begin{classoption}{utf8}
    This option sets the input encoding to |utf8|. It's designed to be used \emph{without} |ucs|. It's the same as saying |\usepackage[utf8]{inputenc}| in the preamble.
  \end{classoption}

  Note that \emph{none} of these options apply to |lualatex| and |xelatex|, since both support Unicode natively without any extra packages. Most of the time using these options actually harms output quality, so be careful about what you use. If you want to have a document that allows compiling with multiple drivers, take a look at |iftex|, |ifxetex| and |ifluatex| packages.

  \articlenote
  Passing option |utf8| to |beamerarticle| has the same effect as saying |\usepackage[utf8]{inputenc}| in the preamble.

  Again, take care if you use |lualatex| or |xelatex|.
\end{package}

\begin{package}{{listings}}
  \beamernote
  Note that you must treat |lstlisting| environments exactly the same way as you would treat |verbatim| environments. When using |\defverbatim| that contains a colored |lstlisting|, use the |colored| option of |\defverbatim|.
  \example
\begin{verbatim}
\usepackage{listings}

\begin{document}
\defverbatim[colored]\mycode{%
  \begin{lstlisting}[frame=single, emph={cout}, emphstyle={\color{blue}}]
    cout << "Hello world!";
  \end{lstlisting}
  }

\begin{frame}
  \mycode
\end{frame}
\end{document}
\end{verbatim}
\end{package}

\begin{package}{{msc}}
  \beamernote
  Since this package uses |pstricks| internally, everything that applies to pstricks also applies to |msc|.
\end{package}

\begin{package}{{musixtex}}
  When using MusiX\TeX\ to typeset musical scores, you have to have $\varepsilon$-\TeX extensions enabled. Most modern distributions enable that by default both in |pdflatex| and |latex|. However, if you have an older distribution, the document must be compiled with |pdfelatex| or |elatex| instead of |pdflatex| or |latex|.

  Inside a |music| environment, the |\pause| is redefined to match MusiX\TeX's definition (a rest during one quarter of a whole). You can use the |\beamerpause| command to create overlays in this environment.
\end{package}

\begin{package}{{pdfpages}}
  Commands like |\includepdf| only work \emph{outside} frames as they produce pages ``by themselves.'' You may also wish to say
\begin{verbatim}
\setbeamercolor{background canvas}{bg=}
\end{verbatim}
  when you use such a command since the background (even a white background) will otherwise be printed over the image you try to include.

  \example
\begin{verbatim}
\begin{document}
\begin{frame}
  \titlepage
\end{frame}

{
  \setbeamercolor{background canvas}{bg=}
  \includepdf{somepdfimages.pdf}
}

\begin{frame}
  A normal frame.
\end{frame}
\end{document}
\end{verbatim}
\end{package}

\begin{package}{{\normalfont\meta{professional font package}}}
  \beamernote
  If you use a professional font package, \beamer's internal redefinition of how variables are typeset may interfere with the font package's superior way of typesetting them. In this case, you should use the class option |professionalfonts| to suppress any font substitution. See Section~\ref{section-substition} for details.
\end{package}

\begin{class}{{prosper}}
  If you wish to (partly) emulate the |prosper| class using \beamer, please see Section~\ref{section-prosper}.
\end{class}

\begin{package}{{pstricks}}
  You should add the option |xcolor=pst| to make |xcolor| aware of the fact that you are using |pstricks|.
\end{package}

\begin{class}{{seminar}}
  If you wish to emulate the |seminar| class using \beamer, please see Section~\ref{section-seminar}.
\end{class}

\begin{package}{{texpower}}
  You cannot use this package with \beamer. However, you might try to use the package |beamertexpower| instead, see Section~\ref{section-texpower}.
\end{package}

\begin{package}{{textpos}}
  \beamernote
  \beamer\ automatically installs a white background behind everything, unless you install a different background template. Because of this, you must use the |overlay| option when using |textpos|, so that it will place boxes \emph{in front of} everything. Alternatively, you can install an empty background template, but this may result in an incorrect display in certain situtations with older versions of the Acrobat Reader.
\end{package}

\begin{package}{{ucs}}
  See |\usepackage[utf8,utf8x]{inputenc}|.
\end{package}

\begin{package}{{xcolor}}
  \beamernote
  The |xcolor| package is automatically loaded by |beamer.cls|. The same applies as to |color|.

  \begin{classoption}{xcolor={\normalfont\meta{list of options}}}
    Causes the \meta{list of options} to be passed on to the |xcolor| package.
  \end{classoption}

  When using \beamer\ together with the |pstricks| package, be sure to pass the |xcolor=pst| option to \beamer\ (and hence to |xcolor|).

  \articlenote
  The |color| package is not loaded automatically if |beamerarticle| is loaded with the |noxcolor| option.
\end{package}