Guest User

Untitled

a guest
Sep 25th, 2018
103
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 9.09 KB | None | 0 0
  1. ! Extra }, or forgotten endgroup.
  2. endmulticols ->par if@boxedmulticols egroup
  3. balance@columns return@non...
  4. l.24 end{multicols}
  5.  
  6. ?
  7.  
  8. pointsinrightmargin
  9. bracketedpoints
  10.  
  11. usepackage{tikz}
  12. usetikzlibrary{arrows, circuits.ee.IEC,positioning, decorations.markings}
  13. usepackage[american voltages, american currents, siunitx]{circuitikz}
  14. usepackage[labelfont=,textfont={it}]{caption}
  15. captionsetup[figure]{name=Fig.,font=footnotesize}
  16.  
  17. usepackage{graphicx}
  18. usepackage{multicol}
  19. usepackage{adjustbox}
  20.  
  21. makeatletter
  22. newenvironment{multichoices}[1][2]{%
  23. begin{multicols}{#1}}{%
  24. if@correctchoice endgroup fi
  25. end{multicols}}
  26. makeatother
  27.  
  28. begin{document}
  29. begin{questions}
  30. question
  31. begin{minipage}[t]{0.65linewidth}
  32. Consider the graph shown in the Fig.~ref{fig:Q1}, which of the following is NOT textit{a tree} of this graph?
  33. begin{choices}
  34. begin{multichoices}
  35. choice
  36. adjustbox{valign=t}{%
  37. scalebox{0.5}{%
  38. begin{tikzpicture}[anchor=center, x=4cm, y=4cm]
  39. coordinate [label=below left:textcolor{blue}{}] (A) at (0.0,0.0);
  40. coordinate [label=above left:textcolor{blue}{}] (B) at (0.0,0.8);
  41. coordinate [label=above right:textcolor{blue}{}] (C) at (0.8,0.8);
  42. coordinate [label=below right:textcolor{blue}{}] (D) at (0.8,0.0);
  43. draw (C) to (B);
  44. draw (D) to [bend right=55] (1.1,0.9) to (1.1,0.9)
  45. to [bend right=55] (B);
  46. draw (B) to [bend right=40] (-0.4,0.45) to (-0.4,0.35)
  47. to [bend right=40] (A);
  48. fill (B) circle(2pt);
  49. fill (D) circle(2pt);
  50. fill (A) circle(2pt);
  51. fill (C) circle(2pt);
  52. end{tikzpicture}
  53. } %EOS
  54. }% adjustbox
  55. choice
  56. adjustbox{valign=t}{%
  57. scalebox{0.5}{%
  58. begin{tikzpicture}[anchor=center, x=4cm, y=4cm]
  59. coordinate [label=below left:textcolor{blue}{}] (A) at (0.0,0.0);
  60. coordinate [label=above left:textcolor{blue}{}] (B) at (0.0,0.8);
  61. coordinate [label=above right:textcolor{blue}{}] (C) at (0.8,0.8);
  62. coordinate [label=below right:textcolor{blue}{}] (D) at (0.8,0.0);
  63. draw (A) to (C);
  64. draw (D) to [bend right=55] (1.1,0.9) to (1.1,0.9)
  65. to [bend right=55] (B);
  66. draw (B) to [bend right=40] (-0.4,0.45) to (-0.4,0.35)
  67. to [bend right=40] (A);
  68. fill (B) circle(2pt);
  69. fill (D) circle(2pt);
  70. fill (A) circle(2pt);
  71. fill (C) circle(2pt);
  72. end{tikzpicture}
  73. } %EOS
  74. }% adjustbox
  75. end{multichoices}par
  76. begin{multichoices}
  77. CorrectChoice
  78. adjustbox{valign=t}{%
  79. scalebox{0.5}{%
  80. begin{tikzpicture}[anchor=center, x=4cm, y=4cm]
  81. coordinate [label=below left:textcolor{blue}{}] (A) at (0.0,0.0);
  82. coordinate [label=above left:textcolor{blue}{}] (B) at (0.0,0.8);
  83. coordinate [label=above right:textcolor{blue}{}] (C) at (0.8,0.8);
  84. coordinate [label=below right:textcolor{blue}{}] (D) at (0.8,0.0);
  85. draw (A) to (B);
  86. draw (C) to (B);
  87. draw (D) to [bend right=55] (1.1,0.9) to (1.1,0.9)
  88. to [bend right=55] (B);
  89. draw (B) to [bend right=40] (-0.4,0.45) to (-0.4,0.35)
  90. to [bend right=40] (A);
  91. fill (B) circle(2pt);
  92. fill (D) circle(2pt);
  93. fill (A) circle(2pt);
  94. fill (C) circle(2pt);
  95. end{tikzpicture}
  96. } %EOS
  97. }% adjustbox
  98. choice
  99. adjustbox{valign=t}{%
  100. scalebox{0.5}{%
  101. begin{tikzpicture}[anchor=center, x=4cm, y=4cm]
  102. coordinate [label=below left:textcolor{blue}{}] (A) at (0.0,0.0);
  103. coordinate [label=above left:textcolor{blue}{}] (B) at (0.0,0.8);
  104. coordinate [label=above right:textcolor{blue}{}] (C) at (0.8,0.8);
  105. coordinate [label=below right:textcolor{blue}{}] (D) at (0.8,0.0);
  106. draw (D) to (C);
  107. draw (D) to [bend right=55] (1.1,0.9) to (1.1,0.9)
  108. to [bend right=55] (B);
  109. draw (B) to [bend right=40] (-0.4,0.45) to (-0.4,0.35)
  110. to [bend right=40] (A);
  111. fill (B) circle(2pt);
  112. fill (D) circle(2pt);
  113. fill (A) circle(2pt);
  114. fill (C) circle(2pt);
  115. end{tikzpicture}
  116. } %EOS
  117. }% adjustbox
  118. end{multichoices}
  119. end{choices}
  120. end{minipage}hfill%
  121. begin{adjustbox}{minipage={0.30linewidth},valign=t}
  122. centering%
  123. scalebox{0.68}{%
  124. begin{tikzpicture}[anchor=center, x=4cm, y=4cm]
  125. coordinate [label=below left:textcolor{blue}{}] (A) at (0.0,0.0);
  126. coordinate [label=above left:textcolor{blue}{}] (B) at (0.0,0.8);
  127. coordinate [label=above right:textcolor{blue}{}] (C) at (0.8,0.8);
  128. coordinate [label=below right:textcolor{blue}{}] (D) at (0.8,0.0);
  129. draw (A) to (B);
  130. draw (C) to (B);
  131. draw (D) to (C);
  132. draw (A) to (D);
  133. draw (A) to (C);
  134. draw (D) to [bend right=55] (1.1,0.9) to (1.1,0.9) to [bend right=55] (B);
  135. draw (B) to [bend right=40] (-0.4,0.45) to (-0.4,0.35) to [bend right=40] (A);
  136. fill (B) circle(2pt);
  137. fill (D) circle(2pt);
  138. fill (A) circle(2pt);
  139. fill (C) circle(2pt);
  140. end{tikzpicture}} %EoS
  141. captionof{figure}{label{fig:Q1}}
  142. end{adjustbox}
  143.  
  144.  
  145. question
  146. begin{minipage}[t]{0.65linewidth}
  147. Consider the network graph shown in the figure, which of the following is NOT a textit{tree} of this graph?
  148. begin{choices}
  149. begin{multichoices}
  150. choice
  151. adjustbox{valign=t}{includegraphics[scale=0.2]{example-image-a}}
  152. choice
  153. adjustbox{valign=t}{includegraphics[scale=0.2]{example-image-b}}
  154. end{multichoices}par
  155. begin{multichoices}
  156. choice
  157. adjustbox{valign=t}{includegraphics[scale=0.2]{example-image-c}}
  158. CorrectChoice
  159. adjustbox{valign=t}{includegraphics[scale=0.2]{example-image}}
  160. end{multichoices}
  161. end{choices}
  162. end{minipage}hfill%
  163. begin{adjustbox}{minipage={0.30linewidth},valign=t}
  164. centering%
  165. scalebox{0.68}{%
  166. begin{tikzpicture}[x=3.22cm,y=3.22cm]
  167. coordinate [label=above left:textcolor{blue}{}] (O) at (1.0,1.0);
  168. coordinate [label=above right:textcolor{blue}{}] (A) at (0.0,1.0);
  169. coordinate [label=below:textcolor{blue}{}] (B) at (1.0,2.0);
  170. coordinate [label=below:textcolor{blue}{}] (C) at (2.0,1.0);
  171. coordinate [label=above:textcolor{blue}{}] (D) at (1.0,0.0);
  172. draw ($(D)+(0.0,0.0)$) node[circ]{} to [R, l=5<ohm>] ($(O)+(0.0,0.0)$) node[circ]{}
  173. to ($(O)+(0.2,0.0)$) to [V, l_=2<volt>] (A) node[circ]{}
  174. to [R, l=3<ohm>, label/align=straight] (B)
  175. to [R, l=4<ohm>, label/align=straight] ($(C)+(0.0,0.0)$) node[circ]{}
  176. to [R, l=2<ohm>, label/align=straight] ($(D)+(0.0,0.0)$)
  177. to [I, l=2<ampere>, label/align=straight]($(A)+(0.0,0.0)$) node[circ]{} ;
  178. draw ($(B)+(0.0,0.0)$) node[circ]{} to ($(B)+(0.0,-0.2)$) to [cI, l=$i_x$] ($(O)+(0.0,0.0)$)
  179. to [I, l=1<ampere>] ($(C)+(-0.2,0.0)$) to ($(C)+(0.0,0.0)$);
  180. draw[-stealth] ($(O)+(-0.06,-0.06)$) to node[left]{$i_x$} ($(O)+(-0.06,-0.3)$);
  181. end{tikzpicture}} %EoS
  182. end{adjustbox}
  183.  
  184.  
  185. question
  186. begin{minipage}[t]{0.65linewidth}
  187. Consider the network graph shown in the figure, which of the following is NOT a textit{tree} of this graph?
  188. begin{choices}
  189. begin{multichoices}
  190. choice
  191. bla bla
  192. choice
  193. bla bla
  194. end{multichoices}par
  195. begin{multichoices}
  196. choice
  197. bla bla
  198. CorrectChoice
  199. bla bla
  200. end{multichoices}
  201. end{choices}
  202. end{minipage}hfill%
  203. begin{adjustbox}{minipage={0.30linewidth},valign=t}
  204. includegraphics[width=linewidth]{example-image}
  205. end{adjustbox}
  206.  
  207.  
  208. question
  209. begin{minipage}[t]{0.65linewidth}
  210. Consider the network graph shown in the figure, which of the following is NOT a textit{tree} of this graph?
  211. begin{choices}
  212. begin{multichoices}
  213. choice
  214. bla bla
  215. choice
  216. bla bla
  217. end{multichoices}par
  218. begin{multichoices}
  219. CorrectChoice
  220. bla bla
  221. choice
  222. bla bla
  223. end{multichoices}
  224. end{choices}
  225. end{minipage}hfill%
  226. begin{adjustbox}{minipage={0.30linewidth},valign=t}
  227. includegraphics[width=linewidth]{example-image}
  228. end{adjustbox}
  229. end{questions}
  230. end{document}
Add Comment
Please, Sign In to add comment