我有以下文件:
\documentclass[12pt,a4paper,fleqn]{article}
\usepackage[utf8]{inputenc}
\usepackage{tikz,amsmath}
\usepackage{amsfonts}
\usepackage[left=2cm,right=1.7cm,top=2cm,bottom=2cm,headheight=1cm, headsep=1cm]{geometry}
\pagestyle{empty}
\setlength{\parindent}{10ex}
\usepackage{lipsum}
%~~~~~~~~~~~~~~~
\usepackage[default]{frcursive}
\usepackage[eulergreek,noplusnominus,noequal,nohbar,nolessnomore,noasterisk]{mathastext}
\usepackage{atbegshi} % added
\usepackage{enumitem} % added
\usepackage{tikz,tkz-euclide}
\usepackage{setspace}
\usetkzobj{all}
\usetikzlibrary{arrows}
\usepackage{amsmath}
\usetikzlibrary{quotes,angles}
\usepackage{pgfplots}
\usepgfplotslibrary{fillbetween}
\usetikzlibrary{shapes,shadings}
\usetikzlibrary{arrows.meta}
\usepgfplotslibrary{polar}
\AtBeginShipout{\AtBeginShipoutUpperLeft{%
\begin{tikzpicture}[remember picture,overlay]
%\foreach \i in{2.1,2.2,...,28} % not needed
\foreach \x in{2,3,...,28}
\draw[line width=1pt,gray!40!white]([shift={(-1,\x)}]current page.south west)--([shift={(0,\x)}]current page.south east);
\foreach \t in{4,5,...,25}
\draw[line width=1pt,red!80!black]([shift={(1.8,-1)}]current page.south west)--([shift={(1.8,1)}]current page.north west);
\end{tikzpicture}
}}
\setlength{\topmargin}{-81pt} % needed to set right every page
\begin{document}
\setlength{\baselineskip}{1cm}
\setlength{\topskip}{\baselineskip}
\color{blue}
\textbf{ Nome: Rafael Pinheiro } \\
\vspace*{\baselineskip}
Exercício: Encontre a área do plano $r\theta$ tal que $\theta^2 \leq r \leq \theta$.
\underline{Resolução:} \\
A área procurada é a hachurada a seguir.
Note que, $\theta = \theta^2$ se e somente se $\theta=0$ ou $\theta=1$. Ou seja, os pontos de intersecção destas duas curvas se dão nestes ângulos ($\alpha = \theta=0$ e $\beta = \theta=1$). Este é o limite de integração a ser considerado.
Agora, sabemos da teoria que a área entre duas curvas polares de equações $r=f_1(\theta)$ e $r=f_2(\theta)$ é dada por:
$$\boxed{A = \frac{1}{2} \int_{\alpha}^\beta \left[ f_2(\theta)\right]^2 - \left[ f_1(\theta)\right]^2 \, d\theta}$$
Aplicando em nosso exemplo, temos que $f_1(\theta) = \theta^2$ e $f_2(\theta) = \theta$ (pois $\theta \geq \theta^2$ para $0 \leq \theta \leq 1$), e assim:
\end{document}
我的问题是:在方程之后,文本不在基线中。我需要不断调整\vspace{}
,不断尝试。我该如何解决这个问题?
答案1
定义
\newcount\lnum
\long\def\fittolines#1{\par
\vskip-\prevdepth
\setbox0=\vbox{#1}
\lnum=\ht0 \divide\lnum by\baselineskip \advance\lnum by1
\nointerlineskip
\vbox to\the\lnum\baselineskip{\vskip.5\baselineskip\vss\box0\vss}
}
并使用
\fittolines{
$$\boxed{A = \frac{1}{2} ... }$$
}