Skyrmion
Skyrmion
Looking forward to my Ph.D. offer...

注册于 2年前

回答
10
文章
0
关注者
1

你只有 \begin,没有 \end,当然编译出不来啊...

image.png

\documentclass{ctexart}
\usepackage{mathtools}
\title{二队关于插值的理解(主要来源于司守奎老师)}
\author{二队\and 为啥\thanks{这次我了解到并知道怎么会用脚注了}
\and 就是
\and 就是就是}
\date{\today}
\begin{document}

\[
  l_0(x) =
  \begin{cases}
    \frac{(x - x_1)}{x_0 - x_1}, & x \in [x_0,x_1] \\
    0,                           & \text{其他}
  \end{cases}
\]    
    
\end{document}

Edit

或者你可以用 parabola 路径绘制抛物线,然后在同一条路径中绘制椭圆弧,然后再绘制抛物线返回原点,这样效果或许会更好些.

image.png

这个 solution 的方案见最下方代码的上半部分的 tikzpicture 环境


Original Answer

添加 line cap = round,然后根据你画的抛物线 1/16*pow(8, 2),那么切点坐标是 8^2/16 = 4,那么椭圆的半长州值我也给你改了改,拼合痕迹没了.

但是还是会相交一点,这个问题是数学问题,俾人数学能力有限,你可以请教下数学方面的同学(比如改用别的曲线)


\documentclass[tikz, border = 10pt]{standalone}

\begin{document}

\begin{tikzpicture}[scale = .5]
  \draw (8,0) ellipse (.4 and 4);
  \draw [ line join = round ] (0,0) parabola (8,4) arc (90:-90:.4 and 4) parabola bend (0,0) (0,0) -- cycle;
\end{tikzpicture}
      
\begin{tikzpicture}[scale = .5]
  \draw[domain=0:8, smooth, variable=\x, line cap = round]  plot ({\x}, {1/16*pow(\x, 2)});   
  \draw[domain=0:8, smooth, variable=\x, line cap = round]  plot ({\x}, {-1/16*pow(\x, 2)});
  \draw (8,0) ellipse (.4 and 4);
\end{tikzpicture}
  
\end{document}

只画一个,后面的你可以选择套用循环,或者复制粘贴

\documentclass{ctexart}

\usepackage{tikz}

\begin{document}

\begin{tikzpicture}
  \node [ circle, draw ] (a) {};
  \node [ circle, draw, fill, xshift = 1cm ] (b) at (a) {};
  \node [ circle, draw, fill, shift = {({sin(18)}, {cos(18)})} ] (c) at (b) {};
  \node [ circle, draw, fill, shift = {({-cos(36)}, {sin(36)})} ] (d) at (c) {};
  \node [ circle, draw, fill, shift = {({-cos(36)}, {-sin(36)})} ] (e) at (d) {};
  \draw (a) -- (b) -- (c) -- (d) -- (e) -- (a);
\end{tikzpicture}

\end{document}

可以像 xcolor 那样 $(B)!0.5!(D)$,当然由于需要运算模式 $$ 包裹,tikzcalc 库是需要被调用的

The following is an example:

\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{calc}

\begin{document}

\begin{tikzpicture}
  \coordinate [label = right: $B$] (B) at (1,3);
  \coordinate [label = right: $D$] (D) at (2,4);
  \coordinate [label = right: $E$] (E) at ($(B)!0.5!(D)$);
\end{tikzpicture}

\end{document}

这是2e的版本,请参考CTAN上的User's manual: notebeamer

截图中的 expl3 使用命令方式重制版暂未发布,请等待更新.

Update on 11:40, 15/10/2024: Version 4.1A已发布
Archive.zip

image.png

  1. 有些地方你在加粗中使用了换行 \textbf{...\\...},给你改过来了
  2. 你未提供插入的那个图像,我用 example-image 给你替代了,记得改过来
  3. 循环问题 我用 expl3int_step_inline 给你重写了 [其实 \foreach 貌似也可以,但这应该是我的职业病 :)] 里面 #1 代表变量,你可以自己在这个基础上改.
  4. geometry 给你改了,不然好几页表格都塞不下 :(

The following figure is a preview of the final effect

image.png

ask10122024.pdf
ask10122024.tex

  • 请正确使用markdown!

解答

你可以使用caption包设置长度,不过这里我给出一种钩子的方法:


\documentclass{article}
\usepackage{lipsum,mwe}
\begin{document}
\lipsum[1]

\begin{figure}[!htbp]
\begin{minipage}{.48\linewidth}
    \centering
    \includegraphics[width=0.5\linewidth]{example-image}
    \caption{Captiona}
\end{minipage}
\begin{minipage}{.48\linewidth}
    \centering
    \includegraphics[width=0.5\linewidth]{example-image}
    \caption{Captionb}
\end{minipage}
\end{figure}
\lipsum[2]

\clearpage
\AddToHook{cmd/endfigure/before}{\vspace{-2.5ex}}

\lipsum[1]

\setlength{\belowcaptionskip}{-10em}

\begin{figure}[!htbp]
\begin{minipage}{.48\linewidth}
    \centering
    \includegraphics[width=0.5\linewidth]{example-image}
    \caption{Captiona}
\end{minipage}
\begin{minipage}{.48\linewidth}
    \centering
    \includegraphics[width=0.5\linewidth]{example-image}
    \caption{Captionb}
\end{minipage}
\end{figure}
\lipsum[2]

\end{document} 

IMG_0744.png

粗略解释,因为方括号会和可选参数冲突,解决方法就是用花括号括起来


\documentclass{article}
\usepackage{enumitem} % 导入宏包
 
\begin{document}
 
\begin{enumerate}[label={[\arabic*]}] % 设置列表标签格式
  \item x
  \item y
  \item z
\end{enumerate}
 
\end{document}

Overleaf Screenshot

你所使用的verbatim环境内的代码字体为打字机等宽,在跨页时,会"误伤"到页脚等元素,你可以使用fancyvrb包的Verbatim环境(V大写)替代verbatim环境,"误伤"的问题便得以解决.

附件为修改后的代码,当然Verbatim环境的字体可能在字号、加粗等方面和默认的verbatim环境略有不同,你可以在终端机输入texdoc fancyvrb查看用户手册,更改代码样式
124004f7d259b29c9999367043c4f851.tex

发布
问题