有人能检查一下下面的代码并告诉我为什么页面中的页面样式不同吗?事实上,我想让整个页面都像第三页一样,但我不知道为什么第一页和第二页中的框更窄。
\documentclass[12pt,a4paper]{article}
\usepackage{graphicx}
\usepackage{comment}
\usepackage{setspace}
\doublespacing
%\usepackage{amsthm,amssymb,amsmath}
\usepackage{marvosym}
\usepackage{MnSymbol,wasysym,boldline}
\usepackage{roundbox,graphicx,framed}
\usepackage{fontspec}
\usepackage{fancybox}
\usepackage[top=10mm, bottom=30mm, left=15mm, right=15mm,nohead]{geometry}
\usepackage{array}
\usepackage[font=footnotesize, labelfont=bf]{caption}
\usepackage{pgfplots}
\usepackage{lipsum}
\usepackage{xifthen}
\usepackage{tikz}
\usetikzlibrary{arrows,shapes.gates.logic.US,shapes.gates.logic.IEC,calc,shapes,snakes,automata,shapes.geometric}
\usepackage{xepersian}
\DeclareMathSizes{14}{10}{9}{7}
\settextfont[Scale=1]{XB Niloofar.ttf}
%\settextfont[Scale=1.1]{B_Nazanin.TTF}
\setdigitfont[Scale=1]{Yas.TTF}
\defpersianfont\titr[Scale=1]{XB Titre.ttf}
\begin{document}
\fancypage{}{%
\setlength{\fboxrule}{2pt}%
\fbox}
\vspace{0.3cm}
%\vspace{0.2cm}
\begin{enumerate}
\item
\begin{align*}
y(t)&=2(A cos\omega_ot-3(Acos\omega_ot)^3= 2Acos \omega_ot-3A^3cos^3\omega_ot\\
&=2Acos \omega_ot-3A^3(\frac{3}{4}cos \omega_ot+\frac{1}{4}cos3\omega_ot)\\
&=2Acos\omega_ot-\frac{9}{4}A^3cos\omega_ot-\frac{3}{4}A^3cos3\omega_ot\\
&= \left(2A-\frac{9}{4}A^3\right)cos\omega_ot-\frac{3}{4}A^3cos3\omega_ot\\
Second-Harmonic &Distortion= 0\%\\
Third-Harmonic &Distortion=\left|\frac{2A-\dfrac{9A^3}{4}}{\dfrac{3A^3}{4}}\right|=
\begin{cases}
300\%, & \text{if}\ A=1 \\
42\%, & \text{if}\ A=2
\end{cases}
\end{align*}
\item
\begin{tabular}{ c | c}
\parbox{0.5\textwidth}{
\begin{align*}
P_{in}&=500 mW=10 log 500=27 dBm\\
P_{out}&=50 mW=10 log 50= 17 dBm\\
P_{g_{in}}&=20 \mu W=10 log (0/02)= -17 dBm\\
L_T&= \alpha l= 2X500 Km= 1000 dB
\end{align*}
}
&
\parbox{0.5\textwidth}{
\begin{align*}
P_{out}&=P_{out}+G_{T}+L_{T}\\
G_{T}&=G_1+G_2\\
L_T&=L_1+L_2+L_3
\end{align*}
}
\end{tabular}
\begin{tabular}{ c | c}
\parbox{0.5\textwidth}{
\begin{align*}
&Section B\\
&P_{g_{in}}=P_{in}+0-L_1\\
&-17=27-L_1 \xrightarrow{~} L_1=44\\
&l_1=\frac{L_1}{\alpha}=22 Km\\
&Section D\\
&l_3=500-(l_1+l_2)=230/5\\
Or\\
&P_{out}=P_{g_{2out}}+0-L_3\\
&P_{g_{2out}}=P_{g_{2in}}+G_1=478 dBm\\
&17=478-L_3 \xrightarrow{~} L_1=461 dB\\
&l_3=\frac{L_3}{\alpha}=230/5 Km
\end{align*}
}
&
\parbox{0.5\textwidth}{
\begin{align*}
&Section A\\
&P_{out}=P_{out}+G_{T}+L_{T}\\
&17=27-1000+G_T\\
&G_T=990 \xrightarrow{so} G_1=G_2=495\\
&Section C\\
&P_{g_{2in}}=P_{g_{1out}}+0-L_2\\
&P_{g_{1out}}=P_{g_{2in}}+G_1=478 dBm\\
&-17=478-L_2 \xrightarrow{~} L_1=495 dB\\
&l_2=\frac{L_2}{\alpha}=247 Km
\end{align*}
}
\end{tabular}
\item
\begin{tikzpicture}
\draw[step=0.5, gray, very thin](-8.99,-5.99) grid (8.99,-1.03);
\draw[thick,->] (-8.5,-3.5) -- (-3,-3.5) node[anchor=south west] {t};
\draw[thick,->] (-8.5,-6) -- (-8.5,-1) node[anchor=south west] {$x_c(t)_{DSB}$};
\draw[thick,->] (-2.5,-3.5) -- (3,-3.5) node[anchor=south west] {t};
\draw[thick,->] (-2.5,-6) -- (-2.5,-1) node[anchor=south west] {$x_c(t)_{AM_{\mu=0/5}}$};
\draw[thick,->] (3.5,-3.5) -- (8.5,-3.5) node[anchor=south west] {t};
\draw[thick,->] (3.5,-6) -- (3.5,-1) node[anchor=south west] {$x_c(t)_{AM_{\mu=1}}$};
\end{tikzpicture}
\item
\begin{tikzpicture}
\draw[dotted] (0,0) node[anchor=south west]{DSB} -- (0,5) ;
\path (-8,0) node[anchor=south east]{AM} -- (-8,5) ;
\end{tikzpicture}
\item
سیگنال $x(t)$ در شکل زیر نشان داده شده است. از این سیگنال یکبار برای مدولاسیون فرکانس حامل و بار دیگر برای مدولاسیون فاز همان حامل استفاده شده است.
\begin{figure}[h]
\begin{tabular}{*{2}{>{\centering\arraybackslash}b{\dimexpr0.5\linewidth-2\tabcolsep\relax}}}
\captionof*{×}{}
الف) رابطه بین $f_\Delta$ و $ \phi_\Delta $ را طوری تعیین کنید که حداکثر فاز سیگنال مدوله شده در هر دو حالت برابر باشد. \\
\\
\\
ب) اگر $f_\Delta=\phi_\Delta=1 $ باشد، حداکثر فرکانس لحظه ایی در هر حالت چقدر است ؟
&
\begin{tikzpicture}
\draw[thick,->] (0,0) -- (4.5,0) node[anchor=north west] {$t$};
\draw[thick,->] (0,-2) -- (0,2) node[anchor=south east] {$x(t)$};
\coordinate (a) at (1,1);
\coordinate (b) at (2,1);
\coordinate (c) at (2, -1);
\coordinate (d) at (3, -1);
\coordinate (e) at (3,0);
\draw[thick] (0,0) -- (a);
\draw[thick] (a) -- (b);
\draw[thick] (b)-- (c);
\draw[thick] (c) --(d);
\draw[thick] (d) -- (e);
\draw[dotted] (a) -- (1,0);
\draw[dotted] (0,-1)--(2,-1);
\draw[dotted] (0, 1) -- (1,1);
\foreach \x in {0,1,2,3,4}
\draw (\x cm,1pt) -- (\x cm,-1pt) node[anchor=north] {$\x$};
\foreach \y in {-1,0,1}
\draw (1pt,\y cm) -- (-1pt,\y cm) node[anchor=east] {$\y$};
\end{tikzpicture}
%\caption*{Weighted, complete graph $K_H$}
\end{tabular}
\end{figure}
\end{enumerate}
\begin{center}
\titr
\end{center}
\end{document}
答案1
让我解释一下我的评论。修复您的代码后(据我猜测您想要获得什么),用 替换tabular
环境tabularx
,删除使用\parbox
(这可能是导致您出现问题的原因:对于宽度您应该使用\linewidth
而不是\textwidth
),更正tizpicture
大小(它太大),使用siunitx
单位我获得以下结果等,我得到以下结果:
(灰线表示页面布局)
母语:
\documentclass[12pt,a4paper]{article}
%\usepackage{comment}
%\usepackage{setspace}
%\doublespacing
%\usepackage{amsthm,amssymb,amsmath}
%\usepackage{marvosym}
%\usepackage{MnSymbol,wasysym,boldline}
%\usepackage{roundbox,graphicx,framed}
%\usepackage{fontspec}
%\usepackage{fancybox}
\usepackage[top=10mm, bottom=30mm,
hmargin=15mm,
nohead,
showframe]{geometry}
\usepackage{array, tabularx}
\usepackage[font=footnotesize, labelfont=bf]{caption}
\usepackage{lipsum}
%\usepackage{xifthen}
%\usepackage{tikz}
\usepackage{pgfplots}
\usetikzlibrary{arrows,shapes.gates.logic.US,shapes.gates.logic.IEC,calc,shapes,snakes,automata,shapes.geometric}
%\usepackage{xepersian}
%\DeclareMathSizes{14}{10}{9}{7}
%\settextfont[Scale=1]{XB Niloofar.ttf}
%\settextfont[Scale=1.1]{B_Nazanin.TTF}
%\setdigitfont[Scale=1]{Yas.TTF}
%\defpersianfont\titr[Scale=1]{XB Titre.ttf}
\usepackage{amsmath} % missed
\newcolumntype{C}{>{\centering\arraybackslash}X}
\usepackage{siunitx} % new
\begin{document}
%\fancypage{}{%
% \setlength{\fboxrule}{2pt}%
% \fbox}
%\vspace{0.3cm}
%\vspace{0.2cm}
\begin{enumerate}
\item
\begin{align*}
y(t) &=2(A cos\omega_ot-3(Acos\omega_ot)^3= 2Acos \omega_ot-3A^3cos^3\omega_ot\\
&=2Acos \omega_ot-3A^3(\frac{3}{4}cos \omega_ot+\frac{1}{4}cos3\omega_ot)\\
&=2Acos\omega_ot-\frac{9}{4}A^3cos\omega_ot-\frac{3}{4}A^3cos3\omega_ot\\
&= \left(2A-\frac{9}{4}A^3\right)cos\omega_ot-\frac{3}{4}A^3cos3\omega_ot
\text{Second-Harmonic}
& \text{Distortion} = \SI{0}{\%} \\
\text{Third-Harmonic}
& Distortion = \left|\frac{2A-\dfrac{9A^3}{4}}{\dfrac{3A^3}{4}}\right| =
\begin{cases}
\SI{300}{\%}, & \text{if}\ A=1 \\
\SI{42}{\%}, & \text{if}\ A=2
\end{cases}
\end{align*}
\item \SI{500}{\watt}
\begin{tabularx}{\linewidth}{ C | C }
$\begin{aligned}
P_{in} & = \SI{500}{\milli\watt}=10 \log 500=\SI{27}{dBm}\\
P_{out} & = \SI{50}{\milli\watt} =10 \log 50= \SI{17}{dBm}\\
P_{g_{in}} & = \SI{20}{\micro\watt} =10 \log (0/02)= \SI{-17}{dBm}\\
L_T & = \alpha l = 2\times\SI{500}{\kilo\metre}= \SI{1000}{dB}
\end{aligned}$
&
$\begin{aligned}
P_{out}&=P_{out}+G_{T}+L_{T}\\
G_{T}&=G_1+G_2\\
L_T&=L_1+L_2+L_3
\end{aligned}$
\end{tabularx}
\begin{tabularx}{\linewidth}{ C | C }
$\begin{aligned}
& \text{Section B} \\
& P_{g_{in}}=P_{in}+0-L_1\\
& -17=27-L_1 \xrightarrow{~} L_1=44\\
& l_1=\frac{L_1}{\alpha}=\SI{22}{\kilo\metre}\\
& \text{Section D} \\
& l_3=500-(l_1+l_2)=230/5\\
\text{Or} & \\
& P_{out}=P_{g_{2out}}+0-L_3\\
& P_{g_{2out}}=P_{g_{2in}}+G_1= \SI{478}{dBm}\\
& 17=478-L_3 \xrightarrow{~} L_1=\SI{461}{dB}\\
& l_3=\frac{L_3}{\alpha}=\SI{230/5}{\kilo\metre}
\end{aligned}$
& $\begin{aligned}
& \text{Section A} \\
& P_{out}=P_{out}+G_{T}+L_{T}\\
& 17=27-1000+G_T\\
& G_T=990 \xrightarrow{so} G_1=G_2=495\\
& \text{Section C}\\
& P_{g_{2in}}=P_{g_{1out}}+0-L_2\\
& P_{g_{1out}}=P_{g_{2in}}+G_1= \SI{478}{dB}\\
& -17=478-L_2 \xrightarrow{~} L_1= \SI{495}{dB}\\
& l_2=\frac{L_2}{\alpha}= \SI{247}{\kilo\metre}
\end{aligned}$
\end{tabularx}
\item
\begin{tikzpicture}
\draw[step=0.5, gray, very thin] (-7.99,-5.99) grid (8.49,-1.03);
\draw[thick,->] (-7.5,-3.5) -- (-3.0,-3.5) node[anchor=south west] {t};
\draw[thick,->] (-7.5,-6) -- (-7.5,-1) node[anchor=south west] {$x_c(t)_{DSB}$};
\draw[thick,->] (-2.5,-3.5) -- (3,-3.5) node[anchor=south west] {t};
\draw[thick,->] (-2.5,-6.0) -- (-2.5,-1) node[anchor=south west] {$x_c(t)_{AM_{\mu=0/5}}$};
\draw[thick,->] (3.5,-3.5) -- (8.5,-3.5) node[anchor=south west] {t};
\draw[thick,->] (3.5,-6.0) -- (3.5,-1) node[anchor=south west] {$x_c(t)_{AM_{\mu=1}}$};
\end{tikzpicture}
\item
\begin{tikzpicture}
\draw[dotted] ( 0,0) node[anchor=south west]{DSB} -- (0,5) ;
\draw[dotted] (-8,0) node[anchor=south west]{AM} -- (-8,5) ;
\end{tikzpicture}
\item $x(t)$
%سیگنال $x(t)$ در شکل زیر نشان داده شده است. از این سیگنال یکبار برای مدولاسیون فرکانس حامل و بار دیگر برای مدولاسیون فاز همان حامل استفاده شده است.
\begin{figure}[htb]
\begin{tabular}{*{2}{>{\centering\arraybackslash}b{\dimexpr0.5\linewidth-2\tabcolsep\relax}}}
\caption{?}% not clear
% الف) رابطه بین $f_\Delta$ و $ \phi_\Delta $ را طوری تعیین کنید که حداکثر فاز سیگنال مدوله شده در هر دو حالت برابر باشد. \\
% \\
% \\
% ب) اگر $f_\Delta=\phi_\Delta=1 $ باشد، حداکثر فرکانس لحظه ایی در هر حالت چقدر است ؟
&
\begin{tikzpicture}
\draw[thick,->] (0,0) -- (4.5,0) node[anchor=north west] {$t$};
\draw[thick,->] (0,-2) -- (0,2) node[anchor=south east] {$x(t)$};
\coordinate (a) at (1,1);
\coordinate (b) at (2,1);
\coordinate (c) at (2, -1);
\coordinate (d) at (3, -1);
\coordinate (e) at (3,0);
\draw[thick] (0,0) -- (a);
\draw[thick] (a) -- (b);
\draw[thick] (b)-- (c);
\draw[thick] (c) --(d);
\draw[thick] (d) -- (e);
\draw[dotted] (a) -- (1,0);
\draw[dotted] (0,-1)--(2,-1);
\draw[dotted] (0, 1) -- (1,1);
\foreach \x in {0,1,2,3,4}
\draw (\x cm,1pt) -- (\x cm,-1pt) node[anchor=north] {$\x$};
\foreach \y in {-1,0,1}
\draw (1pt,\y cm) -- (-1pt,\y cm) node[anchor=east] {$\y$};
\end{tikzpicture}
\caption*{Weighted, complete graph $K_H$}
\end{tabular}
\end{figure}
\end{enumerate}
% \begin{center}
%\titr
%\end{center}
\end{document}
请检查引入的更改是否对您有帮助。至少在此代码上尝试编写新的 mwe,我们将能够测试并进一步帮助您。
离题:在我看来,您的文档结构不清楚。您应该重新考虑一下。