我只想圈出第一个问题和第三个问题,或者我需要通过在上面加星号来将其标记为最喜欢的问题。我该怎么做呢??
\documentclass[]{exam}
\usepackage{amsmath,amsthm,amsfonts,amssymb,dsfont,tikz,mwe,caption,float}
\usepackage{pgf,tikz}
\usepgflibrary{arrows}
\begin{document}
\begin{questions}
\begin{minipage}{0.75\textwidth}
\question In the adjoining figure \ref{fig.3}.\thequestion, $\sin\theta=\frac{15}{17}$. Then $BC=$
%\choice {85m}\choice{65m}\choice{95m}\choice{75m}
\end{minipage} %
\begin{minipage}{.15\textwidth}
\begin{tikzpicture}[line cap=round,line join=round,>=triangle 45,x=.60cm,y=.60cm]
\clip(-5,-1) rectangle (1,5);
\draw[] (0,0.59) -- (-0.59,0.59) -- (-0.59,0) -- (0,0) -- cycle;
\draw (0,0)-- (0,4);
\draw (0,4)-- (-3.84,0);
\draw (0,0)-- (-3.84,0);
\draw [shift={(-3.84,0)}] plot[domain=0:0.81,variable=\t]({1*0.97*cos(\t r)+0*0.97*sin(\t r)},{0*0.97*cos(\t r)+1*0.97*sin(\t r)});
\draw (-2.82,1.02) node[anchor=north west] {$ \theta $};
\draw (-3.65,2.91) node[anchor=north west] {$ 85 m $};
\begin{scriptsize}
%\fill [] (0,0) circle (1.5pt);
\draw (0.34,-0.21) node {$B$};
% \fill [] (0,4) circle (1.5pt);
\draw (0.22,4.36) node {$C$};
%\fill [] (-3.84,0) circle (1.5pt);
\draw (-4.3,-0.29) node {$A$};
% \draw[] (-0.7,0.85) node {$90\textrm{\degre}$};
\end{scriptsize}
\end{tikzpicture}
\label{fig.3}
\end{minipage}
\begin{minipage}{.60\textwidth}
\question In the adjoining figure $\angle ABC=$
%\choice{$45\degre$}{$30\degre$}{$60\degre$}{$50\degre$}{}
\\ (a) fjdkjdjf \quad (b)j fjhijkf \quad (c)nifjdfd \quad (d)jnijffjdkj
\end{minipage} %
\begin{minipage}{.25\textwidth}
\begin{tikzpicture}[line cap=round,line join=round,>=triangle 45,x=.60cm,y=.60cm]
\clip(-3.2,-1) rectangle (5,4.5);
\draw[] (0.42,0) -- (0.42,0.42) -- (0,0.42) -- (0,0) -- cycle;
\draw (0,0)-- (0,4);
\draw (0,4)-- (4,0);
\draw (0,0)-- (4,0);
%\draw [shift={(4,0)}] plot[domain=2.36:π,variable=\t]({1*0.71*cos(\t r)+0*0.71*sin(\t r)},{0*0.71*cos(\t r)+1*0.71*sin(\t r)});
\draw (-3,2.26) node[anchor=north west] {$ 100\sqrt 3 \;m $};
\draw (1.52,0.08) node[anchor=north west] {$ 100\;m $};
\begin{scriptsize}
%\fill [color=xdxdff] (0,0) circle (1.5pt);
\draw[] (-0.5,0.26) node {$A$};
%\fill [color=xdxdff] (0,4) circle (1.5pt);
\draw[] (0.16,4.26) node {$C$};
%\fill [color=xdxdff] (4,0) circle (1.5pt);
\draw[] (4.42,0.48) node {$B$};
%\draw[] (0.78,0.5) node {$90\textrm{\degre}$};
\end{scriptsize}
\end{tikzpicture}
\end{minipage}
\question This is the third question...
\end{questions}
\end{document}
答案1
这里我创建\circlenum
并\starnum
重叠圆圈。我将其椭圆化以处理两位数的问题数字,但您可以对其进行调整。同样,您可以调整颜色和大小。已针对星星和圆圈进行编辑。
\documentclass[]{exam}
\usepackage{amsmath,amsthm,amsfonts,amssymb,dsfont,tikz,mwe,caption,float}
\usepackage{pgf,tikz}
\def\circlenum{\leavevmode\llap{\smash{\scalebox{5}[4]{%
\raisebox{-1.8pt}{\textcolor{red}{$\circ$}}}}}}
\def\starnum{\leavevmode\llap{\smash{\scalebox{4}{%
\raisebox{-1pt}{\textcolor{red}{$\star~$}}}}}}
\usepgflibrary{arrows}
\begin{document}
\begin{questions}
\begin{minipage}{0.75\textwidth}
\question \circlenum%
In the adjoining figure \ref{fig.3}.\thequestion, $\sin\theta=\frac{15}{17}$. Then $BC=$
%\choice {85m}\choice{65m}\choice{95m}\choice{75m}
\end{minipage} %
\begin{minipage}{.15\textwidth}
\begin{tikzpicture}[line cap=round,line join=round,>=triangle 45,x=.60cm,y=.60cm]
\clip(-5,-1) rectangle (1,5);
\draw[] (0,0.59) -- (-0.59,0.59) -- (-0.59,0) -- (0,0) -- cycle;
\draw (0,0)-- (0,4);
\draw (0,4)-- (-3.84,0);
\draw (0,0)-- (-3.84,0);
\draw [shift={(-3.84,0)}] plot[domain=0:0.81,variable=\t]({1*0.97*cos(\t r)+0*0.97*sin(\t r)},{0*0.97*cos(\t r)+1*0.97*sin(\t r)});
\draw (-2.82,1.02) node[anchor=north west] {$ \theta $};
\draw (-3.65,2.91) node[anchor=north west] {$ 85 m $};
\begin{scriptsize}
%\fill [] (0,0) circle (1.5pt);
\draw (0.34,-0.21) node {$B$};
% \fill [] (0,4) circle (1.5pt);
\draw (0.22,4.36) node {$C$};
%\fill [] (-3.84,0) circle (1.5pt);
\draw (-4.3,-0.29) node {$A$};
% \draw[] (-0.7,0.85) node {$90\textrm{\degre}$};
\end{scriptsize}
\end{tikzpicture}
\label{fig.3}
\end{minipage}
\begin{minipage}{.60\textwidth}
\question In the adjoining figure $\angle ABC=$
%\choice{$45\degre$}{$30\degre$}{$60\degre$}{$50\degre$}{}
\\ (a) fjdkjdjf \quad (b)j fjhijkf \quad (c)nifjdfd \quad (d)jnijffjdkj
\end{minipage} %
\begin{minipage}{.25\textwidth}
\begin{tikzpicture}[line cap=round,line join=round,>=triangle 45,x=.60cm,y=.60cm]
\clip(-3.2,-1) rectangle (5,4.5);
\draw[] (0.42,0) -- (0.42,0.42) -- (0,0.42) -- (0,0) -- cycle;
\draw (0,0)-- (0,4);
\draw (0,4)-- (4,0);
\draw (0,0)-- (4,0);
%\draw [shift={(4,0)}] plot[domain=2.36:π,variable=\t]({1*0.71*cos(\t r)+0*0.71*sin(\t r)},{0*0.71*cos(\t r)+1*0.71*sin(\t r)});
\draw (-3,2.26) node[anchor=north west] {$ 100\sqrt 3 \;m $};
\draw (1.52,0.08) node[anchor=north west] {$ 100\;m $};
\begin{scriptsize}
%\fill [color=xdxdff] (0,0) circle (1.5pt);
\draw[] (-0.5,0.26) node {$A$};
%\fill [color=xdxdff] (0,4) circle (1.5pt);
\draw[] (0.16,4.26) node {$C$};
%\fill [color=xdxdff] (4,0) circle (1.5pt);
\draw[] (4.42,0.48) node {$B$};
%\draw[] (0.78,0.5) node {$90\textrm{\degre}$};
\end{scriptsize}
\end{tikzpicture}
\end{minipage}
\question \starnum This is the third question...
\end{questions}
\end{document}
后记:
这是一个更通用的定义
\newcommand\shapenum[2][2]{\leavevmode\llap{\smash{\scalebox{#1}{%
\raisebox{-1pt}{\textcolor{red}{$#2$}}}}\hspace{6mm}}}
它以比例因子作为可选参数,以数学模式符号作为主要参数。示例如下:
\question\shapenum[2]{\bullet} ...
或者
\question\shapenum{\square} ...
当然,颜色在这里是固定的,但可以向宏中添加更多参数来将其作为设置来处理。