当我使用 Beamer 生成幻灯片时,积分符号没有显示,有谁知道如何解决这个问题吗?提前致谢,
最小代码
\documentclass{beamer}
\usepackage[capitalise]{cleveref}
\usepackage{textpos}
\usepackage{pbox}
\newcommand<>{\itemarrow}{\mbox{}\visible#1{\llap{\color{structure}$\rightarrow$\hspace{1.5em}}}}
\usepackage{xcolor}
\usepackage[english]{babel}
\usepackage[american voltages,siunitx]{circuitikz}
\newcommand*{\equal}{=}
\usepackage{multicol}
\newcommand{\tikzmark}[1]{\tikz[overlay,remember picture] \node (#1) {};}
\usepackage[latin1]{inputenc}
\usepackage{amsmath,amsthm, amssymb, latexsym}
\usepackage{makecell, multirow, booktabs}
\usepackage[libertine,cmintegrals,cmbraces,vvarbb]{newtxmath}
\usepackage[scaled=0.95]{inconsolata}
\usepackage{IEEEtrantools}
\usepackage{relsize}
\usepackage{smartdiagram}
\usepackage{booktabs}
\usepackage{graphicx}% http://ctan.org/pkg/graphicx
\usepackage{xcolor}
\usepackage{tcolorbox}
\usepackage{smartdiagram}
\definecolor{darkred}{rgb}{0.55, 0.0, 0.0}
\setbeamertemplate{navigation symbols}{}
\usepackage{relsize}
\definecolor{myblue}{rgb}{0.0, 0.18, 0.39}
\definecolor{lava}{rgb}{0.81, 0.06, 0.13}
\definecolor{mordantred19}{rgb}{0.68, 0.05, 0.0}
\usecolortheme[named=myblue]{structure}
\setbeamerfont{block body}{size=\scriptsize}
\newcommand\Fontvi{\scriptsize\selectfont}
\titlegraphic{}
\usepackage{xcolor,soul}
\definecolor{lightblue}{rgb}{.90,.95,1}
\sethlcolor{lava}
\renewcommand<>{\hl}[1]{\only#2{\beameroriginal{\hl}}{#1}}
\newenvironment{squareenv}{\only{\setbeamertemplate{items}[square]}}{}
% https://tex.stackexchange.com/questions/41683/why-is-it-that-coloring-in-soul-in-beamer-is-not-visible
\makeatletter
\newcommand\SoulColor{%
\let\set@color\beamerorig@set@color
\let\reset@color\beamerorig@reset@color}
\makeatother
\SoulColor
\mode<presentation>{\usetheme{Singapore}}
\useinnertheme{circles}
\usepackage{tikz}
\usepackage{pst-sigsys}
\usetikzlibrary{shapes,arrows,positioning,calc}
\usesmartdiagramlibrary{additions}
\usepackage{tikz}
\usetikzlibrary{overlay-beamer-styles}
\tikzset{
highlight on/.style={alt={#1{fill=red!80!black,color=red!80!black}{fill=gray!30!white,color=gray!30!white}}},
}
\usepackage[font=scriptsize, labelfont=bf]{caption}
\setbeamercolor{block title}{use=structure,fg=white,bg=myblue}
\setbeamercolor{block body}{use=structure,fg=black,bg=white}
\usefonttheme{serif}
\title{ENEC 250 ELECTRIC CIRCUITS II}
\author{Instructor: Dr. Diana Dawoud}
%\institute[ICS]{Institute of Communication Systems (ICS)}
\date{\today}
\setbeamertemplate{footline}{
\begin{beamercolorbox}[ht=4ex,leftskip=1.4cm,rightskip=.3cm]{author in head/foot}
\usebeamercolor{myblue}
\hrule
\vspace{0.1cm}
\insertframenumber
\end{beamercolorbox}
\vspace*{0.1cm}
}
\renewcommand{\familydefault}{\rmdefault}
\setbeamercolor{section number projected}{fg=}
\usetikzlibrary{chains}
\usepackage{animate}
\usepackage{multido}
\usetikzlibrary{calc,intersections}
\newsavebox\myAnim
\usepackage{ifthen}
\newcommand\layera{%
\begin{tikzpicture}[y=0.20pt,x=0.20pt,yscale=-1, inner sep=0pt, outer sep=0pt]
\path[cm={{0.8028232,-0.59621716,0.59621716,0.8028232,(0.0,0.0)}},draw=black,opacity=0.990,miter
limit=4.00,line width=0.943pt,rounded corners=0.0000cm] (-99.8372,584.6912)
rectangle (-30.7483,653.7801);
\end{tikzpicture}
}
\newcommand\layerb{%
\begin{tikzpicture}[y=0.20pt,x=0.20pt,yscale=-1, inner sep=0pt, outer sep=0pt]
\fill[blue!40] (0,0) circle (1);
\end{tikzpicture}
}
\newcommand\layerc{%
\begin{tikzpicture}[y=0.20pt,x=0.20pt,yscale=-1, inner sep=0pt, outer sep=0pt]
\fill[red!40] (0,0) circle (1);
\end{tikzpicture}
}
\usepackage{ifthen}
\usepackage{xcolor}
\definecolor{lava}{rgb}{0.81, 0.06, 0.13}
\definecolor{myblue}{rgb}{0.0, 0.30, 0.60}
\definecolor{myblue2}{rgb}{0, 0.1, 0.1}
\usepackage{tikz}
\usepgflibrary{shapes.symbols}
\usetikzlibrary{mindmap,trees,arrows,shapes.symbols,shapes.misc}
\usepackage[ampersand]{easylist}
\usepackage{lmodern}
\usetikzlibrary{shapes}
\usepackage{gensymb}
\usepackage{nccmath}
\usepackage{tikz-3dplot} %requires 3dplot.sty to be in same directory, or in your LaTeX installation
\usepackage[active,tightpage]{preview} %generates a tightly fitting border around the work
\setlength\PreviewBorder{2mm}
\makeatletter
\AtBeginPart{%
\beamer@tocsectionnumber=0\relax
\setcounter{section}{0}%
}
\usepackage{hyperref}
\hypersetup{pdfpagemode=FullScreen}
\usepackage{ifthen}
\usepackage{animate}
%
%
\usepackage{relsize}
\usepackage{amsmath,amsthm, amssymb, latexsym}
\begin{document}
\begin{frame}{RMS Value}
\onslide<1->{\begin{itemize}
\item Substitute Eq.1 to Eq.2:
\begin{align*}
V_{ms}&=\dfrac{1}{T} \int_{-\tfrac{T}{2}}^{\tfrac{T}{2}}v^2(t)dt \\
&=\dfrac{1}{T}\int_{-\tfrac{T}{2}}^{\tfrac{T}{2}} \dfrac{V^2_m}{2} dt+ \dfrac{1}{T} \int_{-\tfrac{T}{2}}^{\tfrac{T}{2}}v^2(t)dt \\
&=\dfrac{1}{T}\mathlarger{\int}_{-\tfrac{T}{2}}^{\tfrac{T}{2}}\dfrac{V^2_m}{2}\cos(2\omega+2\theta_v).
\end{align*}
\onslide<2->{
\item The root mean square (RMS) value is the square root of the mean square value. For sinusoids, we have
\begin{center}
$V_{rms}=\dfrac{V_m}{2}= 0.7071V_m$
\end{center}}
\onslide<3->{
\item Peak value $V_m$ from RMS value ($V_{rms}$)$\Rightarrow$ $V_m =\sqrt{2}V_{rms} = 1.4142 V_{rms}$
}
\end{itemize}
}
\end{frame}
\end{document}
结果
答案1
你是对的,这是导致问题的包
\usepackage[libertine,cmintegrals,cmbraces,vvarbb]{newtxmath}
答案2
很晚了,但希望我的回答仍然可以帮助你或其他人。
您的文档前言存在严重问题。它非常混乱,许多软件包被加载两次或更多次,一些软件包(如xcolor
、、、hyperref
) amsmath
已经被加载beamer
,一些软件包对加载顺序很敏感(例如,cleveref
必须是最后一个)。所以,请清理前言,并在每次加载软件包时问自己,您真的需要它吗(例如IEEEtrantools
)。
希望您针对问题提供 MWE(最小工作示例),即一个小但独立的文档,它可以重现您的问题,类似于我下面的回答(从序言开始只考虑与您的问题相关的包)。
lmodern
导致您出现问题(看不到积分符号)的原因是字体选择专用包的加载顺序。如果您使用所需选项向前移动newtxmath
,您将获得所需的结果。
无关:
- 如果你在显示模式下有方程式,那么分数也会在显示模式下,所以你不需要使用
\dfrac
,就\frac
足够了 - 我看不出任何理由,方程式最后一行的积分符号
align*
更大。 - 对我来说,最好让 LaTeX 来选择积分极限的正确分数大小
- 而不是
\onslide<1->{...}
, 等 更简单的使用机制,它由 beamer 中的 itemize 提供:\item<1->
,\item<2->
, 等
可能的 MWE:
\documentclass{beamer}
\usepackage{lmodern}
\usepackage[libertine,cmintegrals,cmbraces,vvarbb]{newtxmath}
\usepackage[scaled=0.95]{inconsolata}
\usepackage{nccmath} % not used in MWE
\usepackage{amsthm, amssymb, latexsym}
\DeclareMathOperator{\ms}{ms} % mean square
\DeclareMathOperator{\rms}{rms} % root mean square
\usepackage{relsize} % not used in MWE, do you really need it?
\begin{document}
\begin{frame}{RMS Value}
\begin{itemize}
\item<1-> Substitute Eq.1 to Eq.2:
\begin{align*}
V_{\ms} & = \frac{1}{T} \int_{-\frac{T}{2}}^{\frac{T}{2}}v^2(t)dt \\
& = \frac{1}{T} \int_{-\frac{T}{2}}^{\frac{T}{2}} \frac{V^2_m}{2} dt
+ \frac{1}{T} \int_{-\frac{T}{2}}^{\frac{T}{2}}v^2(t)dt \\
& = \frac{1}{T} \int_{-\frac{T}{2}}^{\frac{T}{2}}
\frac{V^2_m}{2}\cos(2\omega+2\theta_v).
\end{align*}
\item<2-> The root mean square (RMS) value is the square root of the mean square value. For sinusoids, we have
\[
V_{rms}=\frac{V_m}{2}= 0.7071V_m
\]
\item<3-> Peak value from RMS value is:
\[
V_m =\sqrt{2}V_{\rms} = 1.4142 V_{\rms}
\]
\end{itemize}
\end{frame}
\end{document}
最后一张幻灯片显示:
我擅自改动了你的方程式(我不确定它的有效性,其中的第二行align*
对我来说是可疑的)。