如何在 LaTeX 中实现这种文本格式:标题的文本居中,旁边是一张图片。在 Microsoft Word 中,它看起来像这样:
当我使用 时wrapfig
,图像会移到底部,而当我使用 时\begin{figure}
,图像不会与文本对齐。请注意,第一组文本与图像居中,其他文本与页面居中。
代码:
\documentclass{article}
\usepackage{polynom,array}
\usepackage[table]{xcolor}
\usepackage{graphicx}
\usepackage{pgf,tikz}
\usepackage{mathrsfs}
\usetikzlibrary{arrows}
\usepackage{setspace}
\usepackage{wrapfig}
\usepackage[margin=1in, paperheight=11in, paperwidth=8.5in]{geometry}
\def\labelitemi{---}
\begin{document}
\includegraphics[scale=0.15]{pshs}
\begin{center}
Republic of the Philippines
\linebreak Department of Science and Technology
\linebreak Philippine Science High School - Central Visayas Campus
\linebreak Talaytay, Argao, Cebu
\end{center}
\begin{center}
\textbf{Problem Set in Mathematics 3}
\end{center}
\begin{enumerate}
\item Consider the function $f(x)=-x^5+4x^4-x^3-10x^2+4x+8$.
\begin{enumerate}
\item Precisely how many zeros does $f(x)$ have? (\texttt{1 pt.})
\begin{itemize}
\item By Theorem 1.3, $f(x)$ has precisely five zeros since the degree of $f(x)$ is 5.
\end{itemize}
\item Using Theorem 1.4, tabulate the possible number of positive real, negative real, and imaginary zeros of $f(x)$. (\texttt{2 pts.})
\begin{itemize}
\item By Theorem 1.4, $f(x)$ has three sign variations and $f(-x)$ has two sign variations. Thus $f(x)$ can have either one or three positive real zeros and zero or two negative real zeros.
\singlespacing
\begin{center}
\begin{tabular}{|c|c|c|c|c|} \hline
No. of positive real solutions & 3 & 3 & 1 & 1 \\ \hline
No. of negative real solutions & 2 & 0 & 2 & 0 \\ \hline
No. of imaginary solutions & 0 & 2 & 2 & 4 \\ \hline
Total number of solutions & 5 & 5 & 5 & 5 \\ \hline
\end{tabular}
\end{center}
\singlespacing
\end{itemize}
\item Use Theorem 1.6 to determine the interval at which the real zeros of $f(x)$ are contained. (\texttt{1 pt.})
\begin{itemize}
\item By Theorem 1.6, the magnitude of the coefficient with the largest magnitude is 10, and the magnitude of the leading coefficient is 1, thus $M=\frac{10}{1}+1=11$. This means that all the real zeros are in the interval (-11, 11).
\end{itemize}
\item What are the possible rational zeros of $f(x)$ according to Theorem 1.8? (\texttt{2 pts.})
\begin{itemize}
\item The constant term of $f(x)$ is 8 and the leading coefficient of $f(x)$ is 1. By Theorem 1.8, the rational zeros are $\pm 1, \pm 2, \pm 4$, and $\pm 8$.
\end{itemize}
\item Give a lower bound of the real zeros of $f(x)$. Justify your answer using Theorem 1.5. (\texttt{2 pts.})
\begin{itemize}
\item We try -2:
\begin{center}
$\begin{array}{*{20}{c}}{\left. {\underline {\, { - 2} \,}}\! \right| }&{ - 1}&4&{ - 1}&{ - 10}&4&8\\{}&{}&2&{ - 12}&{26}&{ - 32}&{56} \\ \hline {}&{ - 1}&6&{ - 13}&{16}&{ - 28}&{64}\end{array}$
\end{center}
Since $(-1, 6, -13, 16, -28, 64)$ have alternating signs, then -2 is a lower bound of $f(x)$.
\end{itemize}
\item What are the zeros of $f(x)$? (\texttt{4 pts.})
\begin{itemize}
\item We try 2:
\begin{center}
$\begin{array}{*{20}{c}}{\left. {\underline {\, 2 \,}}\! \right| }&{ - 1}&4&{ - 1}&{ - 10}&4&8\\ {}&{}&{ - 2}&4&6&{ - 8}&{ - 8}\\ \hline {}&{ - 1}&2&3&{ - 4}&{ - 4}&0 \end{array}$
\end{center}
We try 2 the second time:
\begin{center}
$\begin{array}{*{20}{c}} {\left. {\underline {\, 2 \,}}\! \right| }&{ - 1}&2&3&{ - 4}&{ - 4}\\ {}&{}&{ - 2}&0&6&4\\ \hline {}&{ - 1}&0&3&2&0 \end{array}$
\end{center}
We try 2 the third time:
\begin{center}
$\begin{array}{*{20}{c}}{\left. {\underline {\, 2 \,}}\! \right| }&{ - 1}&0&3&2\\ {}&{}&{ - 2}&{ - 4}&{ - 2}\\ \hline {}&{ - 1}&{ - 2}&{ - 1}&0 \end{array}$
\end{center}
At this point, we factor $-x^2-2x-1$ and we get $-(x+1)(x+1)$. Thus, the zeros of $f(x)$ are 2 of multiplicity 3 and -1 of multiplicity 2.
\end{itemize}
\newpage
\item Write the complete factored form of $f(x)$. (\texttt{2 pts.})
\begin{itemize}
\item We had roots 2 of multiplicity 3 and -1 of multiplicity 2. With that, we have $(x-2)^3(x+1)^2$. But we should remember that after the third synthetic division process, we got $-(x+1)^2$ and not $(x+1)^2$. Thus, we must multiply -1 to our initial factored form. Thus the complete factored form of $f(x)$ is $-(x-2)^3(x+1)^2$.
\end{itemize}
\item Solve for the $y$-intercept of $f(x)$. (\texttt{1 pt.})
\begin{itemize}
\item The $y$-intercept of $f(x)$ is the constant term: 8.
\end{itemize}
\item Approximate\footnote{I did not use Newton's method; instead I used the first derivative test.} the turning point of $f(x)$ in the interval (-1, 2) up to 2 decimal places. (\texttt{2 pts.})
\begin{itemize}
\item We skip\footnote{This is so scripted.} to $f(0.25)=8.374$ and $f(0.15)=8.373$. We get closer: $f(0.18)$ and $f(0.22)$ both 8.394. So we must settle in the middle: $f(0.20)=8.398$. Thus the turning point between the interval (-1,2) is at $(0.20, 8.40)$.
\end{itemize}
\item Sketch the graph\footnote{Made with Geogebra} of $f(x)$. (\texttt{3 pts.})
\begin{itemize}
\item Note the axes' labels:
\begin{figure}[h]
\definecolor{uuuuuu}{rgb}{0.26666666666666666,0.26666666666666666,0.26666666666666666}
\definecolor{qqwuqq}{rgb}{0.,0.39215686274509803,0.}
\begin{center}
\begin{tikzpicture}[line cap=round,line join=round,>=triangle 45,x=2.0cm,y=0.5cm]
\draw [color=black,, xstep=2.0cm,ystep=0.5cm] (-2.,-9.) grid (3.,11.);
\draw[<->,color=black] (-2.,0.) -- (3.,0.);
\foreach \x in {-2.,-1.5,-1.,-0.5,0.5,1.,1.5,2.,2.5}
\draw[shift={(\x,0)},color=black] (0pt,2pt) -- (0pt,-2pt) node[below] {\footnotesize $\x$};
\draw[<->,color=black] (0.,-9.) -- (0.,11.);
\foreach \y in {-8.,-6.,-4.,-2.,2.,4.,6.,8.,10.}
\draw[shift={(0,\y)},color=black] (2pt,0pt) -- (-2pt,0pt) node[left] {\footnotesize $\y$};
\draw[color=black] (0pt,-10pt) node[right] {\footnotesize $0$};
\clip(-2.,-9.) rectangle (3.,11.);
\draw[line width=1.2pt,color=qqwuqq,smooth,samples=100,domain=-2.0:3.0] plot(\x,{0-(\x)^(5.0)+4.0*(\x)^(4.0)-(\x)^(3.0)-10.0*(\x)^(2.0)+4.0*(\x)+8.0});
\begin{scriptsize}
\draw [fill=uuuuuu] (0.2,8.39808) circle (1.5pt);
\draw [fill=uuuuuu] (-1.,0.) circle (1.5pt);
\draw [fill=uuuuuu] (2.,0.) circle (1.5pt);
\draw [fill=uuuuuu] (0.,8.) circle (1.5pt);
\end{scriptsize}
\end{tikzpicture}
\end{center}
\end{figure}
\end{itemize}
\end{enumerate}
\newpage
\item Find a polynomial function, in factored form that is represented by the graph in Figure 1. Explain in 4 to 7 sentences in bullet format. Note that the leading coefficient is not 1. (\texttt{5pts.})
\begin{itemize}
\renewcommand\labelitemi{\bullet}
\item Figure 1:
\begin{figure}[h]
\begin{center}
\definecolor{tetete}{rgb}{0.,0.39215686274509803,0.}
\begin{tikzpicture}[line cap=round,line join=round,>=triangle 45,x=1.0cm,y=1.0cm]
\draw [color=black,, xstep=1.0cm,ystep=1.0cm] (-4.,-6.) grid (5.,3.);
\draw[<->,color=black] (-4.,0.) -- (5.,0.);
\foreach \x in {-4.,-3.,-2.,-1.,1.,2.,3.,4.}
\draw[shift={(\x,0)},color=black] (0pt,2pt) -- (0pt,-2pt) node[below] {\footnotesize $\x$};
\draw[<->,color=black] (0.,-6.) -- (0.,3.);
\foreach \y in {-6.,-5.,-4.,-3.,-2.,-1.,1.,2.}
\draw[shift={(0,\y)},color=black] (2pt,0pt) -- (-2pt,0pt) node[left] {\footnotesize $\y$};
\draw[color=black] (0pt,-10pt) node[right] {\footnotesize $0$};
\clip(-4.,-6.) rectangle (5.,3.);
\draw[line width=1.2pt,color=tetete,smooth,samples=100,domain=-4.0:5.0] plot(\x,{0.25*((\x)+1.0)^(3.0)*((\x)-2.0)^(2.0)*((\x)-3.0)});
\end{tikzpicture}
\end{center}
\end{figure}
\item The name of the function described in Figure 1 will be named $g_n(x)$.
\item At (1,0), $g_n(x)$ sways \textbf{a little bit}\footnote{Does qualify the 2nd derivative test} which may indicate that it has a factor of $(x+1)^3$.
\item At (2,0), $g_n(x)$ bounces \textbf{a little bit}\footnote{Does qualify the 1st derivative test} which may indicate that it has a factor of $(x-2)^2$.
\item At (3,0), $g_n(x)$ goes \textbf{straight up}\footnote{Does not qualify the $n$th derivative tests} which may indicate that it has a factor of $(x-3)$.
\item We would call our new function $g_1(x)$ with the factored form $(x+1)^3(x-2)^2(x-3)$ and we would also establish the functional equation $g_n(x)=n \times g_1(x)$. Finding the value of $n$: $g_n(0)=3$ and $g_1(0)=12$; $n=\frac{1}{4}$.
\item Thus $g_n(x)=\frac{1}{4}(x+1)^3(x-2)^2(x-3)$
\end{itemize}
\hrule
\item Determine \textbf{all the values}\footnote{There is only one value.} of $k$ such that $3x+2$ is a factor of the polynomial function $h(x)=6x^3-5x^2-12x+k$. (\texttt{5 pts.})
\begin{itemize}
\item $3x+2=0$ becomes $x+\frac{2}{3}=0$, and thus $-\frac{2}{3}$ is a root of $h(x)$. We do synthetic division to get the value of $k$:
\begin{center}
$\begin{array}{*{20}{c}}{\left. {\underline {\, { - {\textstyle{2 \over 3}}} \,}}\! \right| }&6&{ - 5}&{ - 12}&k\\{}&{}&{ - 4}&6&4\\\hline{}&6&{ - 9}&{ - 6}&0\end{array}$
\end{center}
This gives us the equation $k+4=0$, so $k=-4$.
\end{itemize}
\end{enumerate}
\end{document}
图片:
答案1
确实没有换行。只需将文本放在徽标旁边,将每个文本放在一个迷你页面中(默认情况下,它们在垂直中心对齐)。我将徽标放在 0pt 宽度的框中,这样文本就会在整个文本宽度上保持水平居中。
\begin{minipage}{0pt}
\makebox[0pt][l]{\includegraphics[scale=0.15]{pshs}}%
\end{minipage}%
\begin{minipage}{\linewidth}
\centering
Republic of the Philippines \linebreak Department of Science and
Technology \linebreak Philippine Science High School - Central
Visayas Campus \linebreak Talaytay, Argao, Cebu
\end{minipage}
答案2
只需将图像和标题文本放在一个tabularx
环境中,然后使用\adjustimage
fromadjustbox
进行缩放和垂直居中即可。无关:在figure
或table
环境中,不要使用center
环境,因为它会增加一些不必要的垂直间距。改用\centering
。此外,在第二个图中,我不得不评论最后一行——我收到了“尺寸太大”的错误消息。
\documentclass{article}
\usepackage{polynom,array}
\usepackage[table]{xcolor}
\usepackage{graphicx}
\usepackage{pgf,tikz}
\usepackage{mathrsfs}
\usetikzlibrary{arrows}
\usepackage{setspace}
\usepackage{wrapfig}
\usepackage[margin=1in, paperheight=11in, paperwidth=8.5in]{geometry}
\def\labelitemi{---}
\usepackage{tabularx, adjustbox} %
\begin{document}
\begin{tabularx}{\linewidth}{@{}l>{\centering}X@{}}
\adjustimage{scale=0.15, valign=T}{pshs} & Republic of the Philippines
\linebreak Department of Science and Technology
\linebreak Philippine Science High School - Central Visayas Campus
\linebreak Talaytay, Argao, Cebu
\end{tabularx}
\bigskip
\begin{center}
\textbf{Problem Set in Mathematics 3}
\end{center}
\begin{enumerate}
\item Consider the function $f(x)=-x^5+4x^4-x^3-10x^2+4x+8$.
\begin{enumerate}
\item Precisely how many zeros does $f(x)$ have? (\texttt{1 pt.})
\begin{itemize}
\item By Theorem 1.3, $f(x)$ has precisely five zeros since the degree of $f(x)$ is 5.
\end{itemize}
\item Using Theorem 1.4, tabulate the possible number of positive real, negative real, and imaginary zeros of $f(x)$. (\texttt{2 pts.})
\begin{itemize}
\item By Theorem 1.4, $f(x)$ has three sign variations and $f(-x)$ has two sign variations. Thus $f(x)$ can have either one or three positive real zeros and zero or two negative real zeros.
\singlespacing
\begin{center}
\begin{tabular}{|c|c|c|c|c|} \hline
No. of positive real solutions & 3 & 3 & 1 & 1 \\ \hline
No. of negative real solutions & 2 & 0 & 2 & 0 \\ \hline
No. of imaginary solutions & 0 & 2 & 2 & 4 \\ \hline
Total number of solutions & 5 & 5 & 5 & 5 \\ \hline
\end{tabular}
\end{center}
\singlespacing
\end{itemize}
\item Use Theorem 1.6 to determine the interval at which the real zeros of $f(x)$ are contained. (\texttt{1 pt.})
\begin{itemize}
\item By Theorem 1.6, the magnitude of the coefficient with the largest magnitude is 10, and the magnitude of the leading coefficient is 1, thus $M=\frac{10}{1}+1=11$. This means that all the real zeros are in the interval (-11, 11).
\end{itemize}
\item What are the possible rational zeros of $f(x)$ according to Theorem 1.8? (\texttt{2 pts.})
\begin{itemize}
\item The constant term of $f(x)$ is 8 and the leading coefficient of $f(x)$ is 1. By Theorem 1.8, the rational zeros are $\pm 1, \pm 2, \pm 4$, and $\pm 8$.
\end{itemize}
\item Give a lower bound of the real zeros of $f(x)$. Justify your answer using Theorem 1.5. (\texttt{2 pts.})
\begin{itemize}
\item We try -2:
\begin{center}
$\begin{array}{*{20}{c}}{\left. {\underline {\, { - 2} \,}}\! \right| }&{ - 1}&4&{ - 1}&{ - 10}&4&8\\{}&{}&2&{ - 12}&{26}&{ - 32}&{56} \\ \hline {}&{ - 1}&6&{ - 13}&{16}&{ - 28}&{64}\end{array}$
\end{center}
Since $(-1, 6, -13, 16, -28, 64)$ have alternating signs, then -2 is a lower bound of $f(x)$.
\end{itemize}
\item What are the zeros of $f(x)$? (\texttt{4 pts.})
\begin{itemize}
\item We try 2:
\begin{center}
$\begin{array}{*{20}{c}}{\left. {\underline {\, 2 \,}}\! \right| }&{ - 1}&4&{ - 1}&{ - 10}&4&8\\ {}&{}&{ - 2}&4&6&{ - 8}&{ - 8}\\ \hline {}&{ - 1}&2&3&{ - 4}&{ - 4}&0 \end{array}$
\end{center}
We try 2 the second time:
\begin{center}
$\begin{array}{*{20}{c}} {\left. {\underline {\, 2 \,}}\! \right| }&{ - 1}&2&3&{ - 4}&{ - 4}\\ {}&{}&{ - 2}&0&6&4\\ \hline {}&{ - 1}&0&3&2&0 \end{array}$
\end{center}
We try 2 the third time:
\begin{center}
$\begin{array}{*{20}{c}}{\left. {\underline {\, 2 \,}}\! \right| }&{ - 1}&0&3&2\\ {}&{}&{ - 2}&{ - 4}&{ - 2}\\ \hline {}&{ - 1}&{ - 2}&{ - 1}&0 \end{array}$
\end{center}
At this point, we factor $-x^2-2x-1$ and we get $-(x+1)(x+1)$. Thus, the zeros of $f(x)$ are 2 of multiplicity 3 and -1 of multiplicity 2.
\end{itemize}
\newpage
\item Write the complete factored form of $f(x)$. (\texttt{2 pts.})
\begin{itemize}
\item We had roots 2 of multiplicity 3 and -1 of multiplicity 2. With that, we have $(x-2)^3(x+1)^2$. But we should remember that after the third synthetic division process, we got $-(x+1)^2$ and not $(x+1)^2$. Thus, we must multiply -1 to our initial factored form. Thus the complete factored form of $f(x)$ is $-(x-2)^3(x+1)^2$.
\end{itemize}
\item Solve for the $y$-intercept of $f(x)$. (\texttt{1 pt.})
\begin{itemize}
\item The $y$-intercept of $f(x)$ is the constant term: 8.
\end{itemize}
\item Approximate\footnote{I did not use Newton's method; instead I used the first derivative test.} the turning point of $f(x)$ in the interval (-1, 2) up to 2 decimal places. (\texttt{2 pts.})
\begin{itemize}
\item We skip\footnote{This is so scripted.} to $f(0.25)=8.374$ and $f(0.15)=8.373$. We get closer: $f(0.18)$ and $f(0.22)$ both 8.394. So we must settle in the middle: $f(0.20)=8.398$. Thus the turning point between the interval (-1,2) is at $(0.20, 8.40)$.
\end{itemize}
\item Sketch the graph\footnote{Made with Geogebra} of $f(x)$. (\texttt{3 pts.})
\begin{itemize}
\item Note the axes' labels:
\begin{figure}[h]
\definecolor{uuuuuu}{rgb}{0.26666666666666666,0.26666666666666666,0.26666666666666666}
\definecolor{qqwuqq}{rgb}{0.,0.39215686274509803,0.}
\begin{center}
\begin{tikzpicture}[line cap=round,line join=round,>=triangle 45,x=2.0cm,y=0.5cm]
\draw [color=black,, xstep=2.0cm,ystep=0.5cm] (-2.,-9.) grid (3.,11.);
\draw[<->,color=black] (-2.,0.) -- (3.,0.);
\foreach \x in {-2.,-1.5,-1.,-0.5,0.5,1.,1.5,2.,2.5}
\draw[shift={(\x,0)},color=black] (0pt,2pt) -- (0pt,-2pt) node[below] {\footnotesize $\x$};
\draw[<->,color=black] (0.,-9.) -- (0.,11.);
\foreach \y in {-8.,-6.,-4.,-2.,2.,4.,6.,8.,10.}
\draw[shift={(0,\y)},color=black] (2pt,0pt) -- (-2pt,0pt) node[left] {\footnotesize $\y$};
\draw[color=black] (0pt,-10pt) node[right] {\footnotesize $0$};
\clip(-2.,-9.) rectangle (3.,11.);
\draw[line width=1.2pt,color=qqwuqq,smooth,samples=100,domain=-2.0:3.0] plot(\x,{0-(\x)^(5.0)+4.0*(\x)^(4.0)-(\x)^(3.0)-10.0*(\x)^(2.0)+4.0*(\x)+8.0});
\begin{scriptsize}
\draw [fill=uuuuuu] (0.2,8.39808) circle (1.5pt);
\draw [fill=uuuuuu] (-1.,0.) circle (1.5pt);
\draw [fill=uuuuuu] (2.,0.) circle (1.5pt);
\draw [fill=uuuuuu] (0.,8.) circle (1.5pt);
\end{scriptsize}
\end{tikzpicture}
\end{center}
\end{figure}
\end{itemize}
\end{enumerate}
\newpage
\item Find a polynomial function, in factored form that is represented by the graph in Figure 1. Explain in 4 to 7 sentences in bullet format. Note that the leading coefficient is not 1. (\texttt{5pts.})
\begin{itemize}
\renewcommand\labelitemi{\textbullet}
\item Figure 1:
\begin{figure}[h]
\centering
\definecolor{tetete}{rgb}{0.,0.39215686274509803,0.}
\begin{tikzpicture}[line cap=round,line join=round,>=triangle 45,x=1.0cm,y=1.0cm]
\draw [color=black,, xstep=1.0cm,ystep=1.0cm] (-4.,-6.) grid (5.,3.);
\draw[<->,color=black] (-4.,0.) -- (5.,0.);
\foreach \x in {-4.,-3.,-2.,-1.,1.,2.,3.,4.}
\draw[shift={(\x,0)},color=black] (0pt,2pt) -- (0pt,-2pt) node[below] {\footnotesize $\x$};
\draw[<->,color=black] (0.,-6.) -- (0.,3.);
\foreach \y in {-6.,-5.,-4.,-3.,-2.,-1.,1.,2.}
\draw[shift={(0,\y)},color=black] (2pt,0pt) -- (-2pt,0pt) node[left] {\footnotesize $\y$};
\draw[color=black] (0pt,-10pt) node[right] {\footnotesize $0$};
\clip(-4.,-6.) rectangle (5.,3.);
%\draw[line width=1.2pt,color=tetete,smooth,samples=100,domain=-4.0:5.0] plot(\x,{0.25*((\x)+1.0)^(3.0)*((\x)-2.0)^(2.0)});
\end{tikzpicture}
\end{figure}
\item The name of the function described in Figure 1 will be named $g_n(x)$.
\item At (1,0), $g_n(x)$ sways \textbf{a little bit}\footnote{Does qualify the 2nd derivative test} which may indicate that it has a factor of $(x+1)^3$.
\item At (2,0), $g_n(x)$ bounces \textbf{a little bit}\footnote{Does qualify the 1st derivative test} which may indicate that it has a factor of $(x-2)^2$.
\item At (3,0), $g_n(x)$ goes \textbf{straight up}\footnote{Does not qualify the $n$th derivative tests} which may indicate that it has a factor of $(x-3)$.
\item We would call our new function $g_1(x)$ with the factored form $(x+1)^3(x-2)^2(x-3)$ and we would also establish the functional equation $g_n(x)=n \times g_1(x)$. Finding the value of $n$: $g_n(0)=3$ and $g_1(0)=12$; $n=\frac{1}{4}$.
\item Thus $g_n(x)=\frac{1}{4}(x+1)^3(x-2)^2(x-3)$
\end{itemize}
\hrule
\item Determine \textbf{all the values}\footnote{There is only one value.} of $k$ such that $3x+2$ is a factor of the polynomial function $h(x)=6x^3-5x^2-12x+k$. (\texttt{5 pts.})
\begin{itemize}
\item $3x+2=0$ becomes $x+\frac{2}{3}=0$, and thus $-\frac{2}{3}$ is a root of $h(x)$. We do synthetic division to get the value of $k$:
\begin{center}
$\begin{array}{*{20}{c}}{\left. {\underline {\, { - {\textstyle{2 \over 3}}} \,}}\! \right| }&6&{ - 5}&{ - 12}&k\\{}&{}&{ - 4}&6&4\\\hline{}&6&{ - 9}&{ - 6}&0\end{array}$
\end{center}
This gives us the equation $k+4=0$, so $k=-4$.
\end{itemize}
\end{enumerate}
\end{document}