Squares for answer choice options and perfect alignment to mathematical answers
up vote
11
down vote
favorite
Since 2005, I have generally used this model to create multiple-choice tests for my students. I kindly ask you if there are packages or macros, or particular strategies to have squares with the letters A, B, C, D inside. I created the letter E with the underline (tabular
) if, for pure typing error or distraction, I had not put the correct answer.
As you can see with the red arrows I do not have perfect squares and I think that all this depends on the letter used. But is it possible to find a solution to not use tabular
? There is also another problem. Should I use aligned
or other strategies to get a perfect alignment in mathematical mode? In which way could I have an optimal result?
Here there is my MWE:
documentclass[leqno,11pt,landscape,a3paper]{extarticle}
usepackage{graphicx,multicol,mathtools}
usepackage[T1]{fontenc}
usepackage[utf8]{inputenc}
begin{document}
begin{multicols}{1}
begin{enumerate}
item La velocità di 1,00$cdot 10^2$ m/s espressa in km/h è:
$fbox{A}$ 36 km/h.\
$fbox{B}$ 360 km/h.\
$fbox{C}$ 27,8 km/h.\
$fbox{D}$ $3,!60cdot 10^{8}$ km/h.\
$fbox{E}$ begin{tabular}{lllllllllllll}
multicolumn{1}{c}{} & multicolumn{1}{c}{} & multicolumn{1}{c}{} & multicolumn{1}{c}{} & multicolumn{1}{c}{} & multicolumn{1}{c}{} & multicolumn{1}{c}{} & multicolumn{6}{c}{} \
hline
end{tabular}
item In fisica nucleare si usa l'angstrom (simbolo: 1AA=$10^{-10}$ m) e il fermi o femtometro (1 fm= $10^{-15}$ m). Qual è la relazione tra queste due unità di misura?
$fbox{A}$ 1 AA = $10^5$ fm.\
$fbox{B}$ 1 AA = $10^{-5}$ fm.\
$fbox{C}$ 1 AA = $10^{-15}$ fm.\
$fbox{D}$ 1 AA = $10^{3}$ fm.\
$fbox{E}$ begin{tabular}{lllllllllllll}
multicolumn{1}{c}{} & multicolumn{1}{c}{} & multicolumn{1}{c}{} & multicolumn{1}{c}{} & multicolumn{1}{c}{} & multicolumn{1}{c}{} & multicolumn{1}{c}{} & multicolumn{6}{c}{} \
hline
end{tabular}
end{enumerate}
end{multicols}
clearpage
end{document}
math-mode align boxes
|
show 10 more comments
up vote
11
down vote
favorite
Since 2005, I have generally used this model to create multiple-choice tests for my students. I kindly ask you if there are packages or macros, or particular strategies to have squares with the letters A, B, C, D inside. I created the letter E with the underline (tabular
) if, for pure typing error or distraction, I had not put the correct answer.
As you can see with the red arrows I do not have perfect squares and I think that all this depends on the letter used. But is it possible to find a solution to not use tabular
? There is also another problem. Should I use aligned
or other strategies to get a perfect alignment in mathematical mode? In which way could I have an optimal result?
Here there is my MWE:
documentclass[leqno,11pt,landscape,a3paper]{extarticle}
usepackage{graphicx,multicol,mathtools}
usepackage[T1]{fontenc}
usepackage[utf8]{inputenc}
begin{document}
begin{multicols}{1}
begin{enumerate}
item La velocità di 1,00$cdot 10^2$ m/s espressa in km/h è:
$fbox{A}$ 36 km/h.\
$fbox{B}$ 360 km/h.\
$fbox{C}$ 27,8 km/h.\
$fbox{D}$ $3,!60cdot 10^{8}$ km/h.\
$fbox{E}$ begin{tabular}{lllllllllllll}
multicolumn{1}{c}{} & multicolumn{1}{c}{} & multicolumn{1}{c}{} & multicolumn{1}{c}{} & multicolumn{1}{c}{} & multicolumn{1}{c}{} & multicolumn{1}{c}{} & multicolumn{6}{c}{} \
hline
end{tabular}
item In fisica nucleare si usa l'angstrom (simbolo: 1AA=$10^{-10}$ m) e il fermi o femtometro (1 fm= $10^{-15}$ m). Qual è la relazione tra queste due unità di misura?
$fbox{A}$ 1 AA = $10^5$ fm.\
$fbox{B}$ 1 AA = $10^{-5}$ fm.\
$fbox{C}$ 1 AA = $10^{-15}$ fm.\
$fbox{D}$ 1 AA = $10^{3}$ fm.\
$fbox{E}$ begin{tabular}{lllllllllllll}
multicolumn{1}{c}{} & multicolumn{1}{c}{} & multicolumn{1}{c}{} & multicolumn{1}{c}{} & multicolumn{1}{c}{} & multicolumn{1}{c}{} & multicolumn{1}{c}{} & multicolumn{6}{c}{} \
hline
end{tabular}
end{enumerate}
end{multicols}
clearpage
end{document}
math-mode align boxes
4
unrelated butUnderfull hbox (badness 10000) in paragraph at lines 54--55 Underfull hbox (badness 10000) in paragraph at lines 54--55
is warning you about the misuse of\
– David Carlisle
Nov 25 at 20:20
5
never use\
at the end of a paragraph, simply delete the\
– David Carlisle
Nov 25 at 20:25
4
These are way too many choices. Just give them one choice, and you will surprised how good their scores will become. ;-)
– marmot
Nov 25 at 20:26
2
There is a package calledalterqcm
that I use to do MCQs, its documentation is in French. ctan.org/pkg/alterqcm
– AndréC
Nov 25 at 20:58
1
Only 1 downvote so far... :-)
– Mico
Nov 25 at 22:39
|
show 10 more comments
up vote
11
down vote
favorite
up vote
11
down vote
favorite
Since 2005, I have generally used this model to create multiple-choice tests for my students. I kindly ask you if there are packages or macros, or particular strategies to have squares with the letters A, B, C, D inside. I created the letter E with the underline (tabular
) if, for pure typing error or distraction, I had not put the correct answer.
As you can see with the red arrows I do not have perfect squares and I think that all this depends on the letter used. But is it possible to find a solution to not use tabular
? There is also another problem. Should I use aligned
or other strategies to get a perfect alignment in mathematical mode? In which way could I have an optimal result?
Here there is my MWE:
documentclass[leqno,11pt,landscape,a3paper]{extarticle}
usepackage{graphicx,multicol,mathtools}
usepackage[T1]{fontenc}
usepackage[utf8]{inputenc}
begin{document}
begin{multicols}{1}
begin{enumerate}
item La velocità di 1,00$cdot 10^2$ m/s espressa in km/h è:
$fbox{A}$ 36 km/h.\
$fbox{B}$ 360 km/h.\
$fbox{C}$ 27,8 km/h.\
$fbox{D}$ $3,!60cdot 10^{8}$ km/h.\
$fbox{E}$ begin{tabular}{lllllllllllll}
multicolumn{1}{c}{} & multicolumn{1}{c}{} & multicolumn{1}{c}{} & multicolumn{1}{c}{} & multicolumn{1}{c}{} & multicolumn{1}{c}{} & multicolumn{1}{c}{} & multicolumn{6}{c}{} \
hline
end{tabular}
item In fisica nucleare si usa l'angstrom (simbolo: 1AA=$10^{-10}$ m) e il fermi o femtometro (1 fm= $10^{-15}$ m). Qual è la relazione tra queste due unità di misura?
$fbox{A}$ 1 AA = $10^5$ fm.\
$fbox{B}$ 1 AA = $10^{-5}$ fm.\
$fbox{C}$ 1 AA = $10^{-15}$ fm.\
$fbox{D}$ 1 AA = $10^{3}$ fm.\
$fbox{E}$ begin{tabular}{lllllllllllll}
multicolumn{1}{c}{} & multicolumn{1}{c}{} & multicolumn{1}{c}{} & multicolumn{1}{c}{} & multicolumn{1}{c}{} & multicolumn{1}{c}{} & multicolumn{1}{c}{} & multicolumn{6}{c}{} \
hline
end{tabular}
end{enumerate}
end{multicols}
clearpage
end{document}
math-mode align boxes
Since 2005, I have generally used this model to create multiple-choice tests for my students. I kindly ask you if there are packages or macros, or particular strategies to have squares with the letters A, B, C, D inside. I created the letter E with the underline (tabular
) if, for pure typing error or distraction, I had not put the correct answer.
As you can see with the red arrows I do not have perfect squares and I think that all this depends on the letter used. But is it possible to find a solution to not use tabular
? There is also another problem. Should I use aligned
or other strategies to get a perfect alignment in mathematical mode? In which way could I have an optimal result?
Here there is my MWE:
documentclass[leqno,11pt,landscape,a3paper]{extarticle}
usepackage{graphicx,multicol,mathtools}
usepackage[T1]{fontenc}
usepackage[utf8]{inputenc}
begin{document}
begin{multicols}{1}
begin{enumerate}
item La velocità di 1,00$cdot 10^2$ m/s espressa in km/h è:
$fbox{A}$ 36 km/h.\
$fbox{B}$ 360 km/h.\
$fbox{C}$ 27,8 km/h.\
$fbox{D}$ $3,!60cdot 10^{8}$ km/h.\
$fbox{E}$ begin{tabular}{lllllllllllll}
multicolumn{1}{c}{} & multicolumn{1}{c}{} & multicolumn{1}{c}{} & multicolumn{1}{c}{} & multicolumn{1}{c}{} & multicolumn{1}{c}{} & multicolumn{1}{c}{} & multicolumn{6}{c}{} \
hline
end{tabular}
item In fisica nucleare si usa l'angstrom (simbolo: 1AA=$10^{-10}$ m) e il fermi o femtometro (1 fm= $10^{-15}$ m). Qual è la relazione tra queste due unità di misura?
$fbox{A}$ 1 AA = $10^5$ fm.\
$fbox{B}$ 1 AA = $10^{-5}$ fm.\
$fbox{C}$ 1 AA = $10^{-15}$ fm.\
$fbox{D}$ 1 AA = $10^{3}$ fm.\
$fbox{E}$ begin{tabular}{lllllllllllll}
multicolumn{1}{c}{} & multicolumn{1}{c}{} & multicolumn{1}{c}{} & multicolumn{1}{c}{} & multicolumn{1}{c}{} & multicolumn{1}{c}{} & multicolumn{1}{c}{} & multicolumn{6}{c}{} \
hline
end{tabular}
end{enumerate}
end{multicols}
clearpage
end{document}
math-mode align boxes
math-mode align boxes
edited Nov 25 at 21:28
asked Nov 25 at 20:07
Sebastiano
8,51641756
8,51641756
4
unrelated butUnderfull hbox (badness 10000) in paragraph at lines 54--55 Underfull hbox (badness 10000) in paragraph at lines 54--55
is warning you about the misuse of\
– David Carlisle
Nov 25 at 20:20
5
never use\
at the end of a paragraph, simply delete the\
– David Carlisle
Nov 25 at 20:25
4
These are way too many choices. Just give them one choice, and you will surprised how good their scores will become. ;-)
– marmot
Nov 25 at 20:26
2
There is a package calledalterqcm
that I use to do MCQs, its documentation is in French. ctan.org/pkg/alterqcm
– AndréC
Nov 25 at 20:58
1
Only 1 downvote so far... :-)
– Mico
Nov 25 at 22:39
|
show 10 more comments
4
unrelated butUnderfull hbox (badness 10000) in paragraph at lines 54--55 Underfull hbox (badness 10000) in paragraph at lines 54--55
is warning you about the misuse of\
– David Carlisle
Nov 25 at 20:20
5
never use\
at the end of a paragraph, simply delete the\
– David Carlisle
Nov 25 at 20:25
4
These are way too many choices. Just give them one choice, and you will surprised how good their scores will become. ;-)
– marmot
Nov 25 at 20:26
2
There is a package calledalterqcm
that I use to do MCQs, its documentation is in French. ctan.org/pkg/alterqcm
– AndréC
Nov 25 at 20:58
1
Only 1 downvote so far... :-)
– Mico
Nov 25 at 22:39
4
4
unrelated but
Underfull hbox (badness 10000) in paragraph at lines 54--55 Underfull hbox (badness 10000) in paragraph at lines 54--55
is warning you about the misuse of \
– David Carlisle
Nov 25 at 20:20
unrelated but
Underfull hbox (badness 10000) in paragraph at lines 54--55 Underfull hbox (badness 10000) in paragraph at lines 54--55
is warning you about the misuse of \
– David Carlisle
Nov 25 at 20:20
5
5
never use
\
at the end of a paragraph, simply delete the \
– David Carlisle
Nov 25 at 20:25
never use
\
at the end of a paragraph, simply delete the \
– David Carlisle
Nov 25 at 20:25
4
4
These are way too many choices. Just give them one choice, and you will surprised how good their scores will become. ;-)
– marmot
Nov 25 at 20:26
These are way too many choices. Just give them one choice, and you will surprised how good their scores will become. ;-)
– marmot
Nov 25 at 20:26
2
2
There is a package called
alterqcm
that I use to do MCQs, its documentation is in French. ctan.org/pkg/alterqcm– AndréC
Nov 25 at 20:58
There is a package called
alterqcm
that I use to do MCQs, its documentation is in French. ctan.org/pkg/alterqcm– AndréC
Nov 25 at 20:58
1
1
Only 1 downvote so far... :-)
– Mico
Nov 25 at 22:39
Only 1 downvote so far... :-)
– Mico
Nov 25 at 22:39
|
show 10 more comments
3 Answers
3
active
oldest
votes
up vote
10
down vote
accepted
The obvious problem is that D is wider than A.
We can get a true square around capital letters by using the height as width:
documentclass{article}
newcommand{squarecap}[1]{fbox{makebox[height]{#1}}}
begin{document}
squarecap{A}par
squarecap{B}par
squarecap{C}par
squarecap{D}par
squarecap{E}par
squarecap{M}par
end{document}
The question about the angstrom is of a different kind: AA=$1$
has no space; if you don't want to use siunitx
(which is however recommended), type in
$1,textup{AA} = 10^5,textup{fm}$
Egreg : what does [height] when used as the length parameter in the makebox command?
– pzorba75
Nov 26 at 5:07
@pzorba75 In that position it refers to the natural height of the box being built. There are alsowidth
,depth
andtotalheight
– egreg
Nov 26 at 8:28
add a comment |
up vote
9
down vote
You can use eqmakebox[<tag>][<align>]{<stuff>}
to have all <stuff>
with the same <tag>
be set <align>
ed in a box of maximum width. Below I've played around with those so you can see what the effect is:
documentclass{extarticle}
usepackage[UTF8]{inputenc}
usepackage{siunitx,eqparbox}
% https://tex.stackexchange.com/a/34412/5764
makeatletter
NewDocumentCommand{eqmathbox}{o O{c} m}{%
IfValueTF{#1}
{defeqmathbox@##1##2{eqmakebox[#1][#2]{$##1##2$}}}
{defeqmathbox@##1##2{eqmakebox{$##1##2$}}}
mathpaletteeqmathbox@{#3}
}
makeatother
sisetup{
per-mode = symbol
}
newcommand{makeoption}[2][default]{fbox{eqmakebox[#1]{#2}}}
newcommand{genericoption}{rule[-.2baselineskip]{100pt}{.4pt}}
begin{document}
begin{enumerate}
item La velocità di SI{1e2}{metrepersecond} espressa in si{kilometreperhour} è:
makeoption{A} eqmakebox[first][r]{SI{36}{km/h}}. \
makeoption{B} eqmakebox[first][r]{SI{360}{km/h}}. \
makeoption{C} eqmakebox[first][r]{SI{27.8}{km/h}}. \
makeoption{D} eqmakebox[first][r]{SI{3.60e8}{km/h}}. \
makeoption{E} genericoption
item In fisica nucleare si usa l'angstrom (simbolo: $SI{1}{AA} = SI{1e-9}{m}$) e il fermi o femtometro ($SI{1}{fm} = SI{1e-14}{m}$).
Qual è la relazione tra queste due unità di misura?
makeoption{A} $SI{1}{AA} = eqmathbox[second][r]{SI{d5}{fm}}$. \
makeoption{B} $SI{1}{AA} = eqmathbox[second][r]{SI{d-5}{fm}}$. \
makeoption{C} $SI{1}{AA} = eqmathbox[second][r]{SI{d-15}{fm}}$. \
makeoption{D} $SI{1}{AA} = eqmathbox[second][r]{SI{d{3}}{fm}}$. \
makeoption{E} genericoption
end{enumerate}
end{document}
I'd suggest using siunitx
to set content that has units.
For your opinion and for aesthetics is not better to align after the equalities all left[l]
?
– Sebastiano
Nov 25 at 20:57
1
@Sebastiano: Sure thing. You can adjust it to suit your needs.
– Werner
Nov 25 at 21:20
2
Please see here what the conversion between Å and m is.
– marmot
Nov 25 at 21:30
@Werner Don't worry about it. You are a great user.
– Sebastiano
Nov 25 at 23:52
add a comment |
up vote
5
down vote
Make the content of all your boxes the same width and don't set your units incorrectly, the spacing and font types are all wrong.
documentclass{extarticle}
usepackage{siunitx}
begin{document}
fbox{makebox[0.9em]{A}} $SI{1}{angstrom} = SI{e5}{fm}$.
fbox{makebox[0.9em]{B}} $SI{1}{angstrom} = SI{e-5}{fm}$.
fbox{makebox[0.9em]{C}} $SI{1}{angstrom} = SI{e-5}{fm}$.
fbox{makebox[0.9em]{D}} $SI{1}{angstrom} = SI{e-5}{fm}$.
fbox{makebox[0.9em]{E}} rule{2.2cm}{0.5pt}
end{document}
If you make the widthhtstrutbox
, it should be a perfect square (if wide enough).
– John Kormylo
Nov 25 at 20:39
add a comment |
3 Answers
3
active
oldest
votes
3 Answers
3
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
10
down vote
accepted
The obvious problem is that D is wider than A.
We can get a true square around capital letters by using the height as width:
documentclass{article}
newcommand{squarecap}[1]{fbox{makebox[height]{#1}}}
begin{document}
squarecap{A}par
squarecap{B}par
squarecap{C}par
squarecap{D}par
squarecap{E}par
squarecap{M}par
end{document}
The question about the angstrom is of a different kind: AA=$1$
has no space; if you don't want to use siunitx
(which is however recommended), type in
$1,textup{AA} = 10^5,textup{fm}$
Egreg : what does [height] when used as the length parameter in the makebox command?
– pzorba75
Nov 26 at 5:07
@pzorba75 In that position it refers to the natural height of the box being built. There are alsowidth
,depth
andtotalheight
– egreg
Nov 26 at 8:28
add a comment |
up vote
10
down vote
accepted
The obvious problem is that D is wider than A.
We can get a true square around capital letters by using the height as width:
documentclass{article}
newcommand{squarecap}[1]{fbox{makebox[height]{#1}}}
begin{document}
squarecap{A}par
squarecap{B}par
squarecap{C}par
squarecap{D}par
squarecap{E}par
squarecap{M}par
end{document}
The question about the angstrom is of a different kind: AA=$1$
has no space; if you don't want to use siunitx
(which is however recommended), type in
$1,textup{AA} = 10^5,textup{fm}$
Egreg : what does [height] when used as the length parameter in the makebox command?
– pzorba75
Nov 26 at 5:07
@pzorba75 In that position it refers to the natural height of the box being built. There are alsowidth
,depth
andtotalheight
– egreg
Nov 26 at 8:28
add a comment |
up vote
10
down vote
accepted
up vote
10
down vote
accepted
The obvious problem is that D is wider than A.
We can get a true square around capital letters by using the height as width:
documentclass{article}
newcommand{squarecap}[1]{fbox{makebox[height]{#1}}}
begin{document}
squarecap{A}par
squarecap{B}par
squarecap{C}par
squarecap{D}par
squarecap{E}par
squarecap{M}par
end{document}
The question about the angstrom is of a different kind: AA=$1$
has no space; if you don't want to use siunitx
(which is however recommended), type in
$1,textup{AA} = 10^5,textup{fm}$
The obvious problem is that D is wider than A.
We can get a true square around capital letters by using the height as width:
documentclass{article}
newcommand{squarecap}[1]{fbox{makebox[height]{#1}}}
begin{document}
squarecap{A}par
squarecap{B}par
squarecap{C}par
squarecap{D}par
squarecap{E}par
squarecap{M}par
end{document}
The question about the angstrom is of a different kind: AA=$1$
has no space; if you don't want to use siunitx
(which is however recommended), type in
$1,textup{AA} = 10^5,textup{fm}$
answered Nov 25 at 21:46
egreg
701k8618693142
701k8618693142
Egreg : what does [height] when used as the length parameter in the makebox command?
– pzorba75
Nov 26 at 5:07
@pzorba75 In that position it refers to the natural height of the box being built. There are alsowidth
,depth
andtotalheight
– egreg
Nov 26 at 8:28
add a comment |
Egreg : what does [height] when used as the length parameter in the makebox command?
– pzorba75
Nov 26 at 5:07
@pzorba75 In that position it refers to the natural height of the box being built. There are alsowidth
,depth
andtotalheight
– egreg
Nov 26 at 8:28
Egreg : what does [height] when used as the length parameter in the makebox command?
– pzorba75
Nov 26 at 5:07
Egreg : what does [height] when used as the length parameter in the makebox command?
– pzorba75
Nov 26 at 5:07
@pzorba75 In that position it refers to the natural height of the box being built. There are also
width
, depth
and totalheight
– egreg
Nov 26 at 8:28
@pzorba75 In that position it refers to the natural height of the box being built. There are also
width
, depth
and totalheight
– egreg
Nov 26 at 8:28
add a comment |
up vote
9
down vote
You can use eqmakebox[<tag>][<align>]{<stuff>}
to have all <stuff>
with the same <tag>
be set <align>
ed in a box of maximum width. Below I've played around with those so you can see what the effect is:
documentclass{extarticle}
usepackage[UTF8]{inputenc}
usepackage{siunitx,eqparbox}
% https://tex.stackexchange.com/a/34412/5764
makeatletter
NewDocumentCommand{eqmathbox}{o O{c} m}{%
IfValueTF{#1}
{defeqmathbox@##1##2{eqmakebox[#1][#2]{$##1##2$}}}
{defeqmathbox@##1##2{eqmakebox{$##1##2$}}}
mathpaletteeqmathbox@{#3}
}
makeatother
sisetup{
per-mode = symbol
}
newcommand{makeoption}[2][default]{fbox{eqmakebox[#1]{#2}}}
newcommand{genericoption}{rule[-.2baselineskip]{100pt}{.4pt}}
begin{document}
begin{enumerate}
item La velocità di SI{1e2}{metrepersecond} espressa in si{kilometreperhour} è:
makeoption{A} eqmakebox[first][r]{SI{36}{km/h}}. \
makeoption{B} eqmakebox[first][r]{SI{360}{km/h}}. \
makeoption{C} eqmakebox[first][r]{SI{27.8}{km/h}}. \
makeoption{D} eqmakebox[first][r]{SI{3.60e8}{km/h}}. \
makeoption{E} genericoption
item In fisica nucleare si usa l'angstrom (simbolo: $SI{1}{AA} = SI{1e-9}{m}$) e il fermi o femtometro ($SI{1}{fm} = SI{1e-14}{m}$).
Qual è la relazione tra queste due unità di misura?
makeoption{A} $SI{1}{AA} = eqmathbox[second][r]{SI{d5}{fm}}$. \
makeoption{B} $SI{1}{AA} = eqmathbox[second][r]{SI{d-5}{fm}}$. \
makeoption{C} $SI{1}{AA} = eqmathbox[second][r]{SI{d-15}{fm}}$. \
makeoption{D} $SI{1}{AA} = eqmathbox[second][r]{SI{d{3}}{fm}}$. \
makeoption{E} genericoption
end{enumerate}
end{document}
I'd suggest using siunitx
to set content that has units.
For your opinion and for aesthetics is not better to align after the equalities all left[l]
?
– Sebastiano
Nov 25 at 20:57
1
@Sebastiano: Sure thing. You can adjust it to suit your needs.
– Werner
Nov 25 at 21:20
2
Please see here what the conversion between Å and m is.
– marmot
Nov 25 at 21:30
@Werner Don't worry about it. You are a great user.
– Sebastiano
Nov 25 at 23:52
add a comment |
up vote
9
down vote
You can use eqmakebox[<tag>][<align>]{<stuff>}
to have all <stuff>
with the same <tag>
be set <align>
ed in a box of maximum width. Below I've played around with those so you can see what the effect is:
documentclass{extarticle}
usepackage[UTF8]{inputenc}
usepackage{siunitx,eqparbox}
% https://tex.stackexchange.com/a/34412/5764
makeatletter
NewDocumentCommand{eqmathbox}{o O{c} m}{%
IfValueTF{#1}
{defeqmathbox@##1##2{eqmakebox[#1][#2]{$##1##2$}}}
{defeqmathbox@##1##2{eqmakebox{$##1##2$}}}
mathpaletteeqmathbox@{#3}
}
makeatother
sisetup{
per-mode = symbol
}
newcommand{makeoption}[2][default]{fbox{eqmakebox[#1]{#2}}}
newcommand{genericoption}{rule[-.2baselineskip]{100pt}{.4pt}}
begin{document}
begin{enumerate}
item La velocità di SI{1e2}{metrepersecond} espressa in si{kilometreperhour} è:
makeoption{A} eqmakebox[first][r]{SI{36}{km/h}}. \
makeoption{B} eqmakebox[first][r]{SI{360}{km/h}}. \
makeoption{C} eqmakebox[first][r]{SI{27.8}{km/h}}. \
makeoption{D} eqmakebox[first][r]{SI{3.60e8}{km/h}}. \
makeoption{E} genericoption
item In fisica nucleare si usa l'angstrom (simbolo: $SI{1}{AA} = SI{1e-9}{m}$) e il fermi o femtometro ($SI{1}{fm} = SI{1e-14}{m}$).
Qual è la relazione tra queste due unità di misura?
makeoption{A} $SI{1}{AA} = eqmathbox[second][r]{SI{d5}{fm}}$. \
makeoption{B} $SI{1}{AA} = eqmathbox[second][r]{SI{d-5}{fm}}$. \
makeoption{C} $SI{1}{AA} = eqmathbox[second][r]{SI{d-15}{fm}}$. \
makeoption{D} $SI{1}{AA} = eqmathbox[second][r]{SI{d{3}}{fm}}$. \
makeoption{E} genericoption
end{enumerate}
end{document}
I'd suggest using siunitx
to set content that has units.
For your opinion and for aesthetics is not better to align after the equalities all left[l]
?
– Sebastiano
Nov 25 at 20:57
1
@Sebastiano: Sure thing. You can adjust it to suit your needs.
– Werner
Nov 25 at 21:20
2
Please see here what the conversion between Å and m is.
– marmot
Nov 25 at 21:30
@Werner Don't worry about it. You are a great user.
– Sebastiano
Nov 25 at 23:52
add a comment |
up vote
9
down vote
up vote
9
down vote
You can use eqmakebox[<tag>][<align>]{<stuff>}
to have all <stuff>
with the same <tag>
be set <align>
ed in a box of maximum width. Below I've played around with those so you can see what the effect is:
documentclass{extarticle}
usepackage[UTF8]{inputenc}
usepackage{siunitx,eqparbox}
% https://tex.stackexchange.com/a/34412/5764
makeatletter
NewDocumentCommand{eqmathbox}{o O{c} m}{%
IfValueTF{#1}
{defeqmathbox@##1##2{eqmakebox[#1][#2]{$##1##2$}}}
{defeqmathbox@##1##2{eqmakebox{$##1##2$}}}
mathpaletteeqmathbox@{#3}
}
makeatother
sisetup{
per-mode = symbol
}
newcommand{makeoption}[2][default]{fbox{eqmakebox[#1]{#2}}}
newcommand{genericoption}{rule[-.2baselineskip]{100pt}{.4pt}}
begin{document}
begin{enumerate}
item La velocità di SI{1e2}{metrepersecond} espressa in si{kilometreperhour} è:
makeoption{A} eqmakebox[first][r]{SI{36}{km/h}}. \
makeoption{B} eqmakebox[first][r]{SI{360}{km/h}}. \
makeoption{C} eqmakebox[first][r]{SI{27.8}{km/h}}. \
makeoption{D} eqmakebox[first][r]{SI{3.60e8}{km/h}}. \
makeoption{E} genericoption
item In fisica nucleare si usa l'angstrom (simbolo: $SI{1}{AA} = SI{1e-9}{m}$) e il fermi o femtometro ($SI{1}{fm} = SI{1e-14}{m}$).
Qual è la relazione tra queste due unità di misura?
makeoption{A} $SI{1}{AA} = eqmathbox[second][r]{SI{d5}{fm}}$. \
makeoption{B} $SI{1}{AA} = eqmathbox[second][r]{SI{d-5}{fm}}$. \
makeoption{C} $SI{1}{AA} = eqmathbox[second][r]{SI{d-15}{fm}}$. \
makeoption{D} $SI{1}{AA} = eqmathbox[second][r]{SI{d{3}}{fm}}$. \
makeoption{E} genericoption
end{enumerate}
end{document}
I'd suggest using siunitx
to set content that has units.
You can use eqmakebox[<tag>][<align>]{<stuff>}
to have all <stuff>
with the same <tag>
be set <align>
ed in a box of maximum width. Below I've played around with those so you can see what the effect is:
documentclass{extarticle}
usepackage[UTF8]{inputenc}
usepackage{siunitx,eqparbox}
% https://tex.stackexchange.com/a/34412/5764
makeatletter
NewDocumentCommand{eqmathbox}{o O{c} m}{%
IfValueTF{#1}
{defeqmathbox@##1##2{eqmakebox[#1][#2]{$##1##2$}}}
{defeqmathbox@##1##2{eqmakebox{$##1##2$}}}
mathpaletteeqmathbox@{#3}
}
makeatother
sisetup{
per-mode = symbol
}
newcommand{makeoption}[2][default]{fbox{eqmakebox[#1]{#2}}}
newcommand{genericoption}{rule[-.2baselineskip]{100pt}{.4pt}}
begin{document}
begin{enumerate}
item La velocità di SI{1e2}{metrepersecond} espressa in si{kilometreperhour} è:
makeoption{A} eqmakebox[first][r]{SI{36}{km/h}}. \
makeoption{B} eqmakebox[first][r]{SI{360}{km/h}}. \
makeoption{C} eqmakebox[first][r]{SI{27.8}{km/h}}. \
makeoption{D} eqmakebox[first][r]{SI{3.60e8}{km/h}}. \
makeoption{E} genericoption
item In fisica nucleare si usa l'angstrom (simbolo: $SI{1}{AA} = SI{1e-9}{m}$) e il fermi o femtometro ($SI{1}{fm} = SI{1e-14}{m}$).
Qual è la relazione tra queste due unità di misura?
makeoption{A} $SI{1}{AA} = eqmathbox[second][r]{SI{d5}{fm}}$. \
makeoption{B} $SI{1}{AA} = eqmathbox[second][r]{SI{d-5}{fm}}$. \
makeoption{C} $SI{1}{AA} = eqmathbox[second][r]{SI{d-15}{fm}}$. \
makeoption{D} $SI{1}{AA} = eqmathbox[second][r]{SI{d{3}}{fm}}$. \
makeoption{E} genericoption
end{enumerate}
end{document}
I'd suggest using siunitx
to set content that has units.
answered Nov 25 at 20:51
Werner
433k609531634
433k609531634
For your opinion and for aesthetics is not better to align after the equalities all left[l]
?
– Sebastiano
Nov 25 at 20:57
1
@Sebastiano: Sure thing. You can adjust it to suit your needs.
– Werner
Nov 25 at 21:20
2
Please see here what the conversion between Å and m is.
– marmot
Nov 25 at 21:30
@Werner Don't worry about it. You are a great user.
– Sebastiano
Nov 25 at 23:52
add a comment |
For your opinion and for aesthetics is not better to align after the equalities all left[l]
?
– Sebastiano
Nov 25 at 20:57
1
@Sebastiano: Sure thing. You can adjust it to suit your needs.
– Werner
Nov 25 at 21:20
2
Please see here what the conversion between Å and m is.
– marmot
Nov 25 at 21:30
@Werner Don't worry about it. You are a great user.
– Sebastiano
Nov 25 at 23:52
For your opinion and for aesthetics is not better to align after the equalities all left
[l]
?– Sebastiano
Nov 25 at 20:57
For your opinion and for aesthetics is not better to align after the equalities all left
[l]
?– Sebastiano
Nov 25 at 20:57
1
1
@Sebastiano: Sure thing. You can adjust it to suit your needs.
– Werner
Nov 25 at 21:20
@Sebastiano: Sure thing. You can adjust it to suit your needs.
– Werner
Nov 25 at 21:20
2
2
Please see here what the conversion between Å and m is.
– marmot
Nov 25 at 21:30
Please see here what the conversion between Å and m is.
– marmot
Nov 25 at 21:30
@Werner Don't worry about it. You are a great user.
– Sebastiano
Nov 25 at 23:52
@Werner Don't worry about it. You are a great user.
– Sebastiano
Nov 25 at 23:52
add a comment |
up vote
5
down vote
Make the content of all your boxes the same width and don't set your units incorrectly, the spacing and font types are all wrong.
documentclass{extarticle}
usepackage{siunitx}
begin{document}
fbox{makebox[0.9em]{A}} $SI{1}{angstrom} = SI{e5}{fm}$.
fbox{makebox[0.9em]{B}} $SI{1}{angstrom} = SI{e-5}{fm}$.
fbox{makebox[0.9em]{C}} $SI{1}{angstrom} = SI{e-5}{fm}$.
fbox{makebox[0.9em]{D}} $SI{1}{angstrom} = SI{e-5}{fm}$.
fbox{makebox[0.9em]{E}} rule{2.2cm}{0.5pt}
end{document}
If you make the widthhtstrutbox
, it should be a perfect square (if wide enough).
– John Kormylo
Nov 25 at 20:39
add a comment |
up vote
5
down vote
Make the content of all your boxes the same width and don't set your units incorrectly, the spacing and font types are all wrong.
documentclass{extarticle}
usepackage{siunitx}
begin{document}
fbox{makebox[0.9em]{A}} $SI{1}{angstrom} = SI{e5}{fm}$.
fbox{makebox[0.9em]{B}} $SI{1}{angstrom} = SI{e-5}{fm}$.
fbox{makebox[0.9em]{C}} $SI{1}{angstrom} = SI{e-5}{fm}$.
fbox{makebox[0.9em]{D}} $SI{1}{angstrom} = SI{e-5}{fm}$.
fbox{makebox[0.9em]{E}} rule{2.2cm}{0.5pt}
end{document}
If you make the widthhtstrutbox
, it should be a perfect square (if wide enough).
– John Kormylo
Nov 25 at 20:39
add a comment |
up vote
5
down vote
up vote
5
down vote
Make the content of all your boxes the same width and don't set your units incorrectly, the spacing and font types are all wrong.
documentclass{extarticle}
usepackage{siunitx}
begin{document}
fbox{makebox[0.9em]{A}} $SI{1}{angstrom} = SI{e5}{fm}$.
fbox{makebox[0.9em]{B}} $SI{1}{angstrom} = SI{e-5}{fm}$.
fbox{makebox[0.9em]{C}} $SI{1}{angstrom} = SI{e-5}{fm}$.
fbox{makebox[0.9em]{D}} $SI{1}{angstrom} = SI{e-5}{fm}$.
fbox{makebox[0.9em]{E}} rule{2.2cm}{0.5pt}
end{document}
Make the content of all your boxes the same width and don't set your units incorrectly, the spacing and font types are all wrong.
documentclass{extarticle}
usepackage{siunitx}
begin{document}
fbox{makebox[0.9em]{A}} $SI{1}{angstrom} = SI{e5}{fm}$.
fbox{makebox[0.9em]{B}} $SI{1}{angstrom} = SI{e-5}{fm}$.
fbox{makebox[0.9em]{C}} $SI{1}{angstrom} = SI{e-5}{fm}$.
fbox{makebox[0.9em]{D}} $SI{1}{angstrom} = SI{e-5}{fm}$.
fbox{makebox[0.9em]{E}} rule{2.2cm}{0.5pt}
end{document}
edited Nov 25 at 20:34
answered Nov 25 at 20:17
daniel
1
1
If you make the widthhtstrutbox
, it should be a perfect square (if wide enough).
– John Kormylo
Nov 25 at 20:39
add a comment |
If you make the widthhtstrutbox
, it should be a perfect square (if wide enough).
– John Kormylo
Nov 25 at 20:39
If you make the width
htstrutbox
, it should be a perfect square (if wide enough).– John Kormylo
Nov 25 at 20:39
If you make the width
htstrutbox
, it should be a perfect square (if wide enough).– John Kormylo
Nov 25 at 20:39
add a comment |
Thanks for contributing an answer to TeX - LaTeX Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f461730%2fsquares-for-answer-choice-options-and-perfect-alignment-to-mathematical-answers%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
4
unrelated but
Underfull hbox (badness 10000) in paragraph at lines 54--55 Underfull hbox (badness 10000) in paragraph at lines 54--55
is warning you about the misuse of\
– David Carlisle
Nov 25 at 20:20
5
never use
\
at the end of a paragraph, simply delete the\
– David Carlisle
Nov 25 at 20:25
4
These are way too many choices. Just give them one choice, and you will surprised how good their scores will become. ;-)
– marmot
Nov 25 at 20:26
2
There is a package called
alterqcm
that I use to do MCQs, its documentation is in French. ctan.org/pkg/alterqcm– AndréC
Nov 25 at 20:58
1
Only 1 downvote so far... :-)
– Mico
Nov 25 at 22:39