exam: Macros for printing the values of labelwidth and labelsep for question/partWhat are the various units (ex, em, in, pt, bp, dd, pc) expressed in mm?The the commandShow solution to each part of a multipart question right after that part in exam packageExam Class : Points in the right Margin for questionexam document, problem with multiple choice questionExam package, award points by part, but droppoints by questionSeparating question and answerline in examFillin question with exam till the end of the lineExam class — grade table for a single question?Printing all predefined variables and or valuesExam package: How can I stick part and solutionbox together?Points printed right after part question in exam class
A question about dihedral group
Why would a Intel 8080 chip be destroyed if +12 V is connected before -5 V?
Easy examples of correspondence between global and local, as preparation for Gauss's theorem and Stokes's theorem
Why do we need explainable AI?
Why is k-means used for non normally distributed data?
If the UK government illegally doesn't ask for article 50 extension, can parliament do it instead?
One hour 10 min layover in Newark; International -> Domestic connection. Enough time to clear customs?
What is this red bug infesting some trees in southern Germany?
Are there photos of the Apollo LM showing disturbed lunar soil resulting from descent engine exhaust?
When making yogurt, why doesn't bad bacteria grow as well?
Design of 50 ohms RF trace for 2.4GHz...Double layer FR-4 PCB
How to run a command 1 out of N times in Bash
Would there be balance issues if I allowed opportunity attacks against any creature, not just hostile ones?
Which is the best password hashing algorithm in .NET Core?
Why do many programmers abstain from using global variables?
Can my UK debt be collected because I have to return to US?
Can a Simulacrum reproduce?
Measure LiPo Battery Cells with Voltage Divider?
Plotting level sets of the form f(x,y,c)==0
'Hard work never hurt anyone' Why not 'hurts'?
2 : 1 gear ratio in studless technic
What do I do when a crotchet is above a minim?
Should the article "the" be used twice with a proper noun starting with "the"?
How can I oppose my advisor granting gift authorship to a collaborator?
exam: Macros for printing the values of labelwidth and labelsep for question/part
What are the various units (ex, em, in, pt, bp, dd, pc) expressed in mm?The the commandShow solution to each part of a multipart question right after that part in exam packageExam Class : Points in the right Margin for questionexam document, problem with multiple choice questionExam package, award points by part, but droppoints by questionSeparating question and answerline in examFillin question with exam till the end of the lineExam class — grade table for a single question?Printing all predefined variables and or valuesExam package: How can I stick part and solutionbox together?Points printed right after part question in exam class
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;
How can I print the values of labelwidth
/labelsep
for both questions and parts?
documentclassexam
usepackageverbatim
renewcommandquestionshook%
setlengthleftmargin0pt%
setlengthlabelwidth-labelsep%
renewcommandpartshook%
setlengthlabelwidth8mm%
setlengthleftmarginlabelwidth%
setlengthlabelsep0pt%
setlengthitemsep0.5baselineskip%
defmakelabel##1##1%
begindocument
The length of question verb|labelwidth| is ??? and its verb|labelsep| is ???, while the length of part verb|labelwidth| is ??? and its verb|labelsep| is ???.
enddocument
macros exam lengths
add a comment |
How can I print the values of labelwidth
/labelsep
for both questions and parts?
documentclassexam
usepackageverbatim
renewcommandquestionshook%
setlengthleftmargin0pt%
setlengthlabelwidth-labelsep%
renewcommandpartshook%
setlengthlabelwidth8mm%
setlengthleftmarginlabelwidth%
setlengthlabelsep0pt%
setlengthitemsep0.5baselineskip%
defmakelabel##1##1%
begindocument
The length of question verb|labelwidth| is ??? and its verb|labelsep| is ???, while the length of part verb|labelwidth| is ??? and its verb|labelsep| is ???.
enddocument
macros exam lengths
Use the magicthe
:thelabelwidth
,thelabelsep
– Phelype Oleinik
8 hours ago
@PhelypeOleinik How to differentiate between that of question and the other of part?
– Diaa
8 hours ago
You cannot, unless you use different names for them. Once you executequestionshook
,labelwidth
will be-labelsep
(whatever value the latter may have), and after you executepartshook
,labelwidth
will be8mm
. It can't be both at the same time. You can, of course, save those values in a different register, say,partlabelwidth
andquestionlabelwidth
, and then use these in the document.
– Phelype Oleinik
8 hours ago
@PhelypeOleinik I would be grateful if you could edit my MWE to show me how to preserve and print the values of both length registers without overwriting each other.
– Diaa
8 hours ago
add a comment |
How can I print the values of labelwidth
/labelsep
for both questions and parts?
documentclassexam
usepackageverbatim
renewcommandquestionshook%
setlengthleftmargin0pt%
setlengthlabelwidth-labelsep%
renewcommandpartshook%
setlengthlabelwidth8mm%
setlengthleftmarginlabelwidth%
setlengthlabelsep0pt%
setlengthitemsep0.5baselineskip%
defmakelabel##1##1%
begindocument
The length of question verb|labelwidth| is ??? and its verb|labelsep| is ???, while the length of part verb|labelwidth| is ??? and its verb|labelsep| is ???.
enddocument
macros exam lengths
How can I print the values of labelwidth
/labelsep
for both questions and parts?
documentclassexam
usepackageverbatim
renewcommandquestionshook%
setlengthleftmargin0pt%
setlengthlabelwidth-labelsep%
renewcommandpartshook%
setlengthlabelwidth8mm%
setlengthleftmarginlabelwidth%
setlengthlabelsep0pt%
setlengthitemsep0.5baselineskip%
defmakelabel##1##1%
begindocument
The length of question verb|labelwidth| is ??? and its verb|labelsep| is ???, while the length of part verb|labelwidth| is ??? and its verb|labelsep| is ???.
enddocument
macros exam lengths
macros exam lengths
asked 8 hours ago
DiaaDiaa
3,1331 gold badge20 silver badges61 bronze badges
3,1331 gold badge20 silver badges61 bronze badges
Use the magicthe
:thelabelwidth
,thelabelsep
– Phelype Oleinik
8 hours ago
@PhelypeOleinik How to differentiate between that of question and the other of part?
– Diaa
8 hours ago
You cannot, unless you use different names for them. Once you executequestionshook
,labelwidth
will be-labelsep
(whatever value the latter may have), and after you executepartshook
,labelwidth
will be8mm
. It can't be both at the same time. You can, of course, save those values in a different register, say,partlabelwidth
andquestionlabelwidth
, and then use these in the document.
– Phelype Oleinik
8 hours ago
@PhelypeOleinik I would be grateful if you could edit my MWE to show me how to preserve and print the values of both length registers without overwriting each other.
– Diaa
8 hours ago
add a comment |
Use the magicthe
:thelabelwidth
,thelabelsep
– Phelype Oleinik
8 hours ago
@PhelypeOleinik How to differentiate between that of question and the other of part?
– Diaa
8 hours ago
You cannot, unless you use different names for them. Once you executequestionshook
,labelwidth
will be-labelsep
(whatever value the latter may have), and after you executepartshook
,labelwidth
will be8mm
. It can't be both at the same time. You can, of course, save those values in a different register, say,partlabelwidth
andquestionlabelwidth
, and then use these in the document.
– Phelype Oleinik
8 hours ago
@PhelypeOleinik I would be grateful if you could edit my MWE to show me how to preserve and print the values of both length registers without overwriting each other.
– Diaa
8 hours ago
Use the magic
the
: thelabelwidth
, thelabelsep
– Phelype Oleinik
8 hours ago
Use the magic
the
: thelabelwidth
, thelabelsep
– Phelype Oleinik
8 hours ago
@PhelypeOleinik How to differentiate between that of question and the other of part?
– Diaa
8 hours ago
@PhelypeOleinik How to differentiate between that of question and the other of part?
– Diaa
8 hours ago
You cannot, unless you use different names for them. Once you execute
questionshook
, labelwidth
will be -labelsep
(whatever value the latter may have), and after you execute partshook
, labelwidth
will be 8mm
. It can't be both at the same time. You can, of course, save those values in a different register, say, partlabelwidth
and questionlabelwidth
, and then use these in the document.– Phelype Oleinik
8 hours ago
You cannot, unless you use different names for them. Once you execute
questionshook
, labelwidth
will be -labelsep
(whatever value the latter may have), and after you execute partshook
, labelwidth
will be 8mm
. It can't be both at the same time. You can, of course, save those values in a different register, say, partlabelwidth
and questionlabelwidth
, and then use these in the document.– Phelype Oleinik
8 hours ago
@PhelypeOleinik I would be grateful if you could edit my MWE to show me how to preserve and print the values of both length registers without overwriting each other.
– Diaa
8 hours ago
@PhelypeOleinik I would be grateful if you could edit my MWE to show me how to preserve and print the values of both length registers without overwriting each other.
– Diaa
8 hours ago
add a comment |
1 Answer
1
active
oldest
votes
You cannot have one length register hold two different values. Once you execute questionshook
, labelwidth
will be -labelsep
(whatever value the latter may have), and after you execute partshook
, labelwidth
will be 8mm
. It can't be both at the same time.
What you can do, is save those values in a different register, say, partlabelwidth
and questionlabelwidth
, and then use these names in the document.
In the MWE below I defined four new length registers, partlabelsep
, partlabelwidth
, questionlabelsep
, and questionlabelwidth
. Then, inside a group, I used partshook
to make the part values active, and then copied them to the new registers using globalsetcounter
, and then the same to questionshook
. Beware that some values are not initialised in questionshook
, so the order here matters!
When you have those values, you can use the mighty the
to print their value:
documentclassexam
usepackageverbatim
renewcommandquestionshook%
setlengthleftmargin0pt%
setlengthlabelwidth-labelsep%
renewcommandpartshook%
setlengthlabelwidth8mm%
setlengthleftmarginlabelwidth%
setlengthlabelsep0pt%
setlengthitemsep0.5baselineskip%
defmakelabel##1##1%
newlengthpartlabelsep
newlengthpartlabelwidth
newlengthquestionlabelsep
newlengthquestionlabelwidth
begingroup
partshook
globalsetlengthpartlabelseplabelsep
globalsetlengthpartlabelwidthlabelwidth
questionshook
globalsetlengthquestionlabelseplabelsep
globalsetlengthquestionlabelwidthlabelwidth
endgroup
begindocument
The length of question verb|labelwidth| is thequestionlabelwidth and its verb|labelsep| is thequestionlabelsep,
while the length of part verb|labelwidth| is thepartlabelwidth and its verb|labelsep| is thepartlabelsep.
enddocument
1
@Diaa Yes, the way they are defined there they just change the value of some registers. About converting units, there's this question, with a few nice answers. If you don't mind loadingexpl3
then you can usedim_to_decimal_in_unit:nn3.1415pt1mm
. If neither of these is good for you, you can definedefconvertunit#1#2strip@ptdimexpr1pt*numberdimexpr(#1)relax/numberdimexpr(1#2)relaxrelax #2
, and thenconvertunit3.1415ptmm
.convertunitlabelsepmm
will also work.
– Phelype Oleinik
7 hours ago
Many thanks for the help. I deleted my original comment after I found some relevant questions, however, your comment is equally helpful.
– Diaa
7 hours ago
1
@Diaa No worries. Glad it helped :-)
– Phelype Oleinik
7 hours ago
add a comment |
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',
autoActivateHeartbeat: false,
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
);
);
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%2f506746%2fexam-macros-for-printing-the-values-of-labelwidth-and-labelsep-for-question-p%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
You cannot have one length register hold two different values. Once you execute questionshook
, labelwidth
will be -labelsep
(whatever value the latter may have), and after you execute partshook
, labelwidth
will be 8mm
. It can't be both at the same time.
What you can do, is save those values in a different register, say, partlabelwidth
and questionlabelwidth
, and then use these names in the document.
In the MWE below I defined four new length registers, partlabelsep
, partlabelwidth
, questionlabelsep
, and questionlabelwidth
. Then, inside a group, I used partshook
to make the part values active, and then copied them to the new registers using globalsetcounter
, and then the same to questionshook
. Beware that some values are not initialised in questionshook
, so the order here matters!
When you have those values, you can use the mighty the
to print their value:
documentclassexam
usepackageverbatim
renewcommandquestionshook%
setlengthleftmargin0pt%
setlengthlabelwidth-labelsep%
renewcommandpartshook%
setlengthlabelwidth8mm%
setlengthleftmarginlabelwidth%
setlengthlabelsep0pt%
setlengthitemsep0.5baselineskip%
defmakelabel##1##1%
newlengthpartlabelsep
newlengthpartlabelwidth
newlengthquestionlabelsep
newlengthquestionlabelwidth
begingroup
partshook
globalsetlengthpartlabelseplabelsep
globalsetlengthpartlabelwidthlabelwidth
questionshook
globalsetlengthquestionlabelseplabelsep
globalsetlengthquestionlabelwidthlabelwidth
endgroup
begindocument
The length of question verb|labelwidth| is thequestionlabelwidth and its verb|labelsep| is thequestionlabelsep,
while the length of part verb|labelwidth| is thepartlabelwidth and its verb|labelsep| is thepartlabelsep.
enddocument
1
@Diaa Yes, the way they are defined there they just change the value of some registers. About converting units, there's this question, with a few nice answers. If you don't mind loadingexpl3
then you can usedim_to_decimal_in_unit:nn3.1415pt1mm
. If neither of these is good for you, you can definedefconvertunit#1#2strip@ptdimexpr1pt*numberdimexpr(#1)relax/numberdimexpr(1#2)relaxrelax #2
, and thenconvertunit3.1415ptmm
.convertunitlabelsepmm
will also work.
– Phelype Oleinik
7 hours ago
Many thanks for the help. I deleted my original comment after I found some relevant questions, however, your comment is equally helpful.
– Diaa
7 hours ago
1
@Diaa No worries. Glad it helped :-)
– Phelype Oleinik
7 hours ago
add a comment |
You cannot have one length register hold two different values. Once you execute questionshook
, labelwidth
will be -labelsep
(whatever value the latter may have), and after you execute partshook
, labelwidth
will be 8mm
. It can't be both at the same time.
What you can do, is save those values in a different register, say, partlabelwidth
and questionlabelwidth
, and then use these names in the document.
In the MWE below I defined four new length registers, partlabelsep
, partlabelwidth
, questionlabelsep
, and questionlabelwidth
. Then, inside a group, I used partshook
to make the part values active, and then copied them to the new registers using globalsetcounter
, and then the same to questionshook
. Beware that some values are not initialised in questionshook
, so the order here matters!
When you have those values, you can use the mighty the
to print their value:
documentclassexam
usepackageverbatim
renewcommandquestionshook%
setlengthleftmargin0pt%
setlengthlabelwidth-labelsep%
renewcommandpartshook%
setlengthlabelwidth8mm%
setlengthleftmarginlabelwidth%
setlengthlabelsep0pt%
setlengthitemsep0.5baselineskip%
defmakelabel##1##1%
newlengthpartlabelsep
newlengthpartlabelwidth
newlengthquestionlabelsep
newlengthquestionlabelwidth
begingroup
partshook
globalsetlengthpartlabelseplabelsep
globalsetlengthpartlabelwidthlabelwidth
questionshook
globalsetlengthquestionlabelseplabelsep
globalsetlengthquestionlabelwidthlabelwidth
endgroup
begindocument
The length of question verb|labelwidth| is thequestionlabelwidth and its verb|labelsep| is thequestionlabelsep,
while the length of part verb|labelwidth| is thepartlabelwidth and its verb|labelsep| is thepartlabelsep.
enddocument
1
@Diaa Yes, the way they are defined there they just change the value of some registers. About converting units, there's this question, with a few nice answers. If you don't mind loadingexpl3
then you can usedim_to_decimal_in_unit:nn3.1415pt1mm
. If neither of these is good for you, you can definedefconvertunit#1#2strip@ptdimexpr1pt*numberdimexpr(#1)relax/numberdimexpr(1#2)relaxrelax #2
, and thenconvertunit3.1415ptmm
.convertunitlabelsepmm
will also work.
– Phelype Oleinik
7 hours ago
Many thanks for the help. I deleted my original comment after I found some relevant questions, however, your comment is equally helpful.
– Diaa
7 hours ago
1
@Diaa No worries. Glad it helped :-)
– Phelype Oleinik
7 hours ago
add a comment |
You cannot have one length register hold two different values. Once you execute questionshook
, labelwidth
will be -labelsep
(whatever value the latter may have), and after you execute partshook
, labelwidth
will be 8mm
. It can't be both at the same time.
What you can do, is save those values in a different register, say, partlabelwidth
and questionlabelwidth
, and then use these names in the document.
In the MWE below I defined four new length registers, partlabelsep
, partlabelwidth
, questionlabelsep
, and questionlabelwidth
. Then, inside a group, I used partshook
to make the part values active, and then copied them to the new registers using globalsetcounter
, and then the same to questionshook
. Beware that some values are not initialised in questionshook
, so the order here matters!
When you have those values, you can use the mighty the
to print their value:
documentclassexam
usepackageverbatim
renewcommandquestionshook%
setlengthleftmargin0pt%
setlengthlabelwidth-labelsep%
renewcommandpartshook%
setlengthlabelwidth8mm%
setlengthleftmarginlabelwidth%
setlengthlabelsep0pt%
setlengthitemsep0.5baselineskip%
defmakelabel##1##1%
newlengthpartlabelsep
newlengthpartlabelwidth
newlengthquestionlabelsep
newlengthquestionlabelwidth
begingroup
partshook
globalsetlengthpartlabelseplabelsep
globalsetlengthpartlabelwidthlabelwidth
questionshook
globalsetlengthquestionlabelseplabelsep
globalsetlengthquestionlabelwidthlabelwidth
endgroup
begindocument
The length of question verb|labelwidth| is thequestionlabelwidth and its verb|labelsep| is thequestionlabelsep,
while the length of part verb|labelwidth| is thepartlabelwidth and its verb|labelsep| is thepartlabelsep.
enddocument
You cannot have one length register hold two different values. Once you execute questionshook
, labelwidth
will be -labelsep
(whatever value the latter may have), and after you execute partshook
, labelwidth
will be 8mm
. It can't be both at the same time.
What you can do, is save those values in a different register, say, partlabelwidth
and questionlabelwidth
, and then use these names in the document.
In the MWE below I defined four new length registers, partlabelsep
, partlabelwidth
, questionlabelsep
, and questionlabelwidth
. Then, inside a group, I used partshook
to make the part values active, and then copied them to the new registers using globalsetcounter
, and then the same to questionshook
. Beware that some values are not initialised in questionshook
, so the order here matters!
When you have those values, you can use the mighty the
to print their value:
documentclassexam
usepackageverbatim
renewcommandquestionshook%
setlengthleftmargin0pt%
setlengthlabelwidth-labelsep%
renewcommandpartshook%
setlengthlabelwidth8mm%
setlengthleftmarginlabelwidth%
setlengthlabelsep0pt%
setlengthitemsep0.5baselineskip%
defmakelabel##1##1%
newlengthpartlabelsep
newlengthpartlabelwidth
newlengthquestionlabelsep
newlengthquestionlabelwidth
begingroup
partshook
globalsetlengthpartlabelseplabelsep
globalsetlengthpartlabelwidthlabelwidth
questionshook
globalsetlengthquestionlabelseplabelsep
globalsetlengthquestionlabelwidthlabelwidth
endgroup
begindocument
The length of question verb|labelwidth| is thequestionlabelwidth and its verb|labelsep| is thequestionlabelsep,
while the length of part verb|labelwidth| is thepartlabelwidth and its verb|labelsep| is thepartlabelsep.
enddocument
answered 8 hours ago
Phelype OleinikPhelype Oleinik
33.2k7 gold badges56 silver badges111 bronze badges
33.2k7 gold badges56 silver badges111 bronze badges
1
@Diaa Yes, the way they are defined there they just change the value of some registers. About converting units, there's this question, with a few nice answers. If you don't mind loadingexpl3
then you can usedim_to_decimal_in_unit:nn3.1415pt1mm
. If neither of these is good for you, you can definedefconvertunit#1#2strip@ptdimexpr1pt*numberdimexpr(#1)relax/numberdimexpr(1#2)relaxrelax #2
, and thenconvertunit3.1415ptmm
.convertunitlabelsepmm
will also work.
– Phelype Oleinik
7 hours ago
Many thanks for the help. I deleted my original comment after I found some relevant questions, however, your comment is equally helpful.
– Diaa
7 hours ago
1
@Diaa No worries. Glad it helped :-)
– Phelype Oleinik
7 hours ago
add a comment |
1
@Diaa Yes, the way they are defined there they just change the value of some registers. About converting units, there's this question, with a few nice answers. If you don't mind loadingexpl3
then you can usedim_to_decimal_in_unit:nn3.1415pt1mm
. If neither of these is good for you, you can definedefconvertunit#1#2strip@ptdimexpr1pt*numberdimexpr(#1)relax/numberdimexpr(1#2)relaxrelax #2
, and thenconvertunit3.1415ptmm
.convertunitlabelsepmm
will also work.
– Phelype Oleinik
7 hours ago
Many thanks for the help. I deleted my original comment after I found some relevant questions, however, your comment is equally helpful.
– Diaa
7 hours ago
1
@Diaa No worries. Glad it helped :-)
– Phelype Oleinik
7 hours ago
1
1
@Diaa Yes, the way they are defined there they just change the value of some registers. About converting units, there's this question, with a few nice answers. If you don't mind loading
expl3
then you can use dim_to_decimal_in_unit:nn3.1415pt1mm
. If neither of these is good for you, you can define defconvertunit#1#2strip@ptdimexpr1pt*numberdimexpr(#1)relax/numberdimexpr(1#2)relaxrelax #2
, and then convertunit3.1415ptmm
. convertunitlabelsepmm
will also work.– Phelype Oleinik
7 hours ago
@Diaa Yes, the way they are defined there they just change the value of some registers. About converting units, there's this question, with a few nice answers. If you don't mind loading
expl3
then you can use dim_to_decimal_in_unit:nn3.1415pt1mm
. If neither of these is good for you, you can define defconvertunit#1#2strip@ptdimexpr1pt*numberdimexpr(#1)relax/numberdimexpr(1#2)relaxrelax #2
, and then convertunit3.1415ptmm
. convertunitlabelsepmm
will also work.– Phelype Oleinik
7 hours ago
Many thanks for the help. I deleted my original comment after I found some relevant questions, however, your comment is equally helpful.
– Diaa
7 hours ago
Many thanks for the help. I deleted my original comment after I found some relevant questions, however, your comment is equally helpful.
– Diaa
7 hours ago
1
1
@Diaa No worries. Glad it helped :-)
– Phelype Oleinik
7 hours ago
@Diaa No worries. Glad it helped :-)
– Phelype Oleinik
7 hours ago
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.
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%2f506746%2fexam-macros-for-printing-the-values-of-labelwidth-and-labelsep-for-question-p%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
Use the magic
the
:thelabelwidth
,thelabelsep
– Phelype Oleinik
8 hours ago
@PhelypeOleinik How to differentiate between that of question and the other of part?
– Diaa
8 hours ago
You cannot, unless you use different names for them. Once you execute
questionshook
,labelwidth
will be-labelsep
(whatever value the latter may have), and after you executepartshook
,labelwidth
will be8mm
. It can't be both at the same time. You can, of course, save those values in a different register, say,partlabelwidth
andquestionlabelwidth
, and then use these in the document.– Phelype Oleinik
8 hours ago
@PhelypeOleinik I would be grateful if you could edit my MWE to show me how to preserve and print the values of both length registers without overwriting each other.
– Diaa
8 hours ago