Text Formatting ⇒ Need to write the options horizontally rather vertically
-
sachinrajsharma
- Posts: 35
- Joined: Sun Apr 08, 2012 5:48 am
Need to write the options horizontally rather vertically
Good Day!
Request you to please suggest how can I have the multiple options horizontally rather getting it vertically as these are consuming too much space while I am writing questions in hundred or so.
Files are attached for your reference.
Thanks,
Sachin
- Attachments
-
- Test File.pdf
- (31.11 KiB) Downloaded 421 times
-
- Test File.tex
- (605 Bytes) Downloaded 392 times
Learn LaTeX easily with newest books:
The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis
The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more
LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis
- Johannes_B
- Site Moderator
- Posts: 4182
- Joined: Thu Nov 01, 2012 4:08 pm
Need to write the options horizontally rather vertically
See the code below, use the answers option and you are in for a surprise
Code: Select all
\documentclass[
%answers
]{exam}
\usepackage[utf8]{inputenc}
\everymath{\displaystyle}
\usepackage{mathtools}
\usepackage{showframe}
\begin{document}\small
\begin{questions}
\question $5+7=$
\begin{oneparchoices}
\choice $1$
\CorrectChoice $42$
\choice $12$
\choice $\sqrt{2}$
\end{oneparchoices}
\newcommand{\JBQ}{%
\question $(\sin x-\cos x)^2$ is equal to
\begin{oneparchoices}
\choice $1$ \choice $1-2\sin x \cos x$ \choice $-1$ \choice
$1+2\sin x\cos x$
\end{oneparchoices}
}
\JBQ
\JBQ
\JBQ
\JBQ
\JBQ
\question What does
$\sum\limits_{n=1}^{k\rightarrow\infty}1+\frac{1}{n}$ give you?
\begin{oneparchoices}
\choice something
\choice something else
\CorrectChoice Odd spacing
\end{oneparchoices}
\JBQ
\JBQ
\JBQ
\JBQ
\JBQ
\JBQ
\end{questions}
\end{document}
Need to write the options horizontally rather vertically
Code: Select all
\documentclass[10pt,a4paper]{article}
% \everymath{\displaystyle}% this is a /BAD/ idea!
\usepackage{amsmath}
\usepackage{exsheets}% also loads the `tasks' package
\begin{document}% \small % if the while document should by set in smaller
% fontsize then use a different fontsize as class option
\begin{question}
$(\sin x-\cos x)^2$ is equal to
\begin{tasks}(4)
\task $1$
\task $1-2\sin x\cos x$
\task $-1$
\task $1+2\sin x\cos x$
\end{tasks}
\end{question}
\end{document}I am a bit puzzled by your example: it sets
\everymath{\displaystyle} (a bad decision IMHO) when not everybody knows \everymath but then you don't use such basics as \sin or \cos.Regards