请问一下大家,怎么让tikz画的图,放在选择题选项的右边呢?https://paste.ubuntu.com/p/dr7nx5svzm/
提问于:
浏览数:
3554
2 回答
0
问题太多
- 宏包加载混乱
- 数学公式麻烦你就用 `$n_1$` 不行吗?
- 去看看这个《[到底什么是「内容与样式分离」](https://liam.page/2019/03/18/separation-of-content-and-presentation/)》,你简直就是在用 word
我勉强实现了,请你先去学习再使用
```tex
\documentclass[UTF8]{ctexart}
\usepackage[a4paper,left=25mm,right=25mm,top=15mm,bottom=12mm]{geometry}
\usepackage{color}
\usepackage{amssymb}
\usepackage{amsmath}
\usepackage{tikz}
\usetikzlibrary{arrows,shapes,positioning}
\usetikzlibrary{decorations.markings}
\tikzstyle arrowstyle=[scale=1]
\tikzstyle directed=[postaction={decorate,decoration={markings,
mark=at position .80 with {\arrow[arrowstyle]{stealth}}}}]
\tikzstyle reverse directed=[postaction={decorate,decoration={markings,
mark=at position .20 with {\arrowreversed[arrowstyle]{stealth};}}}]
\setCJKfamilyfont{lmm}{lmmono10-regular.otf}
\newcommand{\lmm}{\CJKfamily{lmm}}
\setCJKfamilyfont{song}{simsun.ttc}
\newcommand{\song}{\CJKfamily{song}}
\setCJKfamilyfont{xh}{STXIHEI.TTF}
\newcommand{\xh}{\CJKfamily{xh}}
\setCJKfamilyfont{kt}{STKAITI.TTF}
\newcommand{\kt}{\CJKfamily{kt}}
\setCJKfamilyfont{ht}{simhei.ttf}
\newcommand{\simhi}{\CJKfamily{ht}}
\newcommand{\chuhao}{\fontsize{42pt}{\baselineskip}\selectfont}
\newcommand{\xiaochuhao}{\fontsize{36pt}{\baselineskip}\selectfont}
\newcommand{\yihao}{\fontsize{28pt}{\baselineskip}\selectfont}
\newcommand{\erhao}{\fontsize{21pt}{\baselineskip}\selectfont}
\newcommand{\xiaoerhao}{\fontsize{18pt}{\baselineskip}\selectfont}
\newcommand{\sanhao}{\fontsize{15.75pt}{\baselineskip}\selectfont}
\newcommand{\sihao}{\fontsize{14pt}{\baselineskip}\selectfont}
\newcommand{\xiaosihao}{\fontsize{12pt}{\baselineskip}\selectfont}
\newcommand{\wuhao}{\fontsize{10.5pt}{\baselineskip}\selectfont}
\newcommand{\xiaowuhao}{\fontsize{9pt}{\baselineskip}\selectfont}
\newcommand{\liuhao}{\fontsize{7.875pt}{\baselineskip}\selectfont}
\newcommand{\qihao}{\fontsize{5.25pt}{\baselineskip}\selectfont}
\linespread{1.5}
\newcommand{\tabincell}[2]{\begin{tabular}{@{}#1@{}}#2\end{tabular}}
%------------
\usepackage{wrapfig}
%------------
\begin{document}
\section*{\simhi \xiaoerhao 第一章 \quad 光的干涉单元练习}
{\simhi \sanhao 一、\quad 选择题(每题{\lmm 3}分,共{\lmm 15}分)}\\
\begin{wrapfigure}{r}{6cm}
\hfill\begin{tikzpicture}
\coordinate[label=left: $S_{1}$] (S$_{1}$) at (0,1);
\coordinate[label=right: $P$] (P) at (5,1);
\coordinate[label=left: $S_{2}$] (S$_{2}$) at (0,-1);
\draw[black,reverse directed](P) -- (S$_{1}$) ;
\draw[black,directed] (S$_{2}$) -- (P);
\draw[black](0,2.5) -- (0,-2.5) ;
\coordinate[label=above: $t_{1}$] (t$_{1}$) at (1,1.3);
\coordinate[label=below: $n_{1}$] (n$_{1}$) at (0.8,0.7);
\draw[black] (0.8,1.3) -- (t$_{1}$) -- (1,0.7) -- (n$_{1}$) -- cycle;
\coordinate[label=above: $t_{2}$] (t$_{2}$) at (1.8,0);
\coordinate[label=right: $n_{2}$] (n$_{2}$) at (2.35,-0.55);
\draw[black] (t$_{2}$) -- (2,0.1) -- (n$_{2}$) -- (2.15,-0.65) -- cycle;
\node[above right] at (4.2,1) {r$_{1}$};
\node[below right] at (4,0.6) {r$_{2}$};
\end{tikzpicture}
\end{wrapfigure}
{\kt \xiaosihao
$\bullet$1.如图 S$_{1}$、S$_{2}$是两个相干光源,它们到P点的距离r$_{1}$和r$_{2}$。路径S$_{1}$P垂直穿过一块厚度为t$_{1}$ ,折射率为n$_{1}$的介质板,路径S$_{2}$P垂直穿过厚度为t$_{2}$,折射率为n$_{2}$的另一介质板,其余部分可看作真空,这两条路径的光程差等于\qquad $\left[\quad \right]$\\
{\lmm A}$\centerdot$\quad (r$_{2}$+n$_{2}$t$_{2}$)\ -\ (r$_{1}$+n$_{1}$t$_{1}$)\\
{\lmm B}$\centerdot$\quad (r$_{2}$+(n$_{2}$-1)t$_{2}$)\ -\ (r$_{1}$+(n$_{1}$-1)t$_{1}$)\\
{\lmm C}$\centerdot$\quad (r$_{2}$-n$_{2}$t$_{2}$)\ -\ (r$_{1}$-n$_{1}$t$_{1}$)\\
{\lmm D}$\centerdot$\quad n$_{2}$t$_{2}$\ -\ n$_{1}$t$_{1}$\\
$\bullet$2.如图,用单色光垂直照射在观察牛顿环的装置上。当平凸透镜垂直向上缓慢平移而远离平面玻璃时,可以观察到这些环状干涉条纹
}
\end{document}
```
参考《[讨论:图文混排与列表环境同时使用,怎样更好?](https://wenda.latexstudio.net/q-1958.html)》
自荐[https://gitee.com/sikouhjw/zhangyu1000](https://gitee.com/sikouhjw/zhangyu1000),虽然不是很好,我觉得你可以参考参考定理类、选择题是如何实现的
-
非常感谢! – gxyaqxt 2020-04-03 14:03 回复
0
用 `section*` 之后还自己手动写第一章,你真的该用 word,别把 latex 当成公式编辑器。
你的回答
请登录后回答
你的回答将会帮助更多人,请务必认真回答问题。