Squares for answer choice options and perfect alignment to mathematical answers











up vote
11
down vote

favorite
2












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?
enter image description here



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}









share|improve this question




















  • 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















up vote
11
down vote

favorite
2












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?
enter image description here



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}









share|improve this question




















  • 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













up vote
11
down vote

favorite
2









up vote
11
down vote

favorite
2






2





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?
enter image description here



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}









share|improve this question















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?
enter image description here



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






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Nov 25 at 21:28

























asked Nov 25 at 20:07









Sebastiano

8,51641756




8,51641756








  • 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














  • 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








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










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}


enter image description here



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}$





share|improve this answer





















  • 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


















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:



enter image description here



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.






share|improve this answer





















  • 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


















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}


enter image description here






share|improve this answer























  • If you make the width htstrutbox, it should be a perfect square (if wide enough).
    – John Kormylo
    Nov 25 at 20:39













Your Answer








StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "85"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














draft saved

draft discarded


















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

























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}


enter image description here



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}$





share|improve this answer





















  • 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















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}


enter image description here



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}$





share|improve this answer





















  • 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













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}


enter image description here



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}$





share|improve this answer












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}


enter image description here



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}$






share|improve this answer












share|improve this answer



share|improve this answer










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 also width, depth and totalheight
    – 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












  • @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
















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










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:



enter image description here



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.






share|improve this answer





















  • 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















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:



enter image description here



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.






share|improve this answer





















  • 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













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:



enter image description here



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.






share|improve this answer












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:



enter image description here



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.







share|improve this answer












share|improve this answer



share|improve this answer










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


















  • 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










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}


enter image description here






share|improve this answer























  • If you make the width htstrutbox, it should be a perfect square (if wide enough).
    – John Kormylo
    Nov 25 at 20:39

















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}


enter image description here






share|improve this answer























  • If you make the width htstrutbox, it should be a perfect square (if wide enough).
    – John Kormylo
    Nov 25 at 20:39















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}


enter image description here






share|improve this answer














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}


enter image description here







share|improve this answer














share|improve this answer



share|improve this answer








edited Nov 25 at 20:34

























answered Nov 25 at 20:17









daniel

1




1












  • 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


















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




















draft saved

draft discarded




















































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.




draft saved


draft discarded














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





















































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







Popular posts from this blog

How to change which sound is reproduced for terminal bell?

Can I use Tabulator js library in my java Spring + Thymeleaf project?

Title Spacing in Bjornstrup Chapter, Removing Chapter Number From Contents