How can I write in a box with fixed height?

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
7
down vote

favorite












I am using report class and have been using framebox[linewidth]rule0pt2cm to create an empty box with a certain height. Now, I would like to write in that empty box. By referring to How can I write something in a box with makeemptybox1.8in?, I achieved the following:



documentclass[a4paper,11pt]report

newcommandmakenonemptybox[2]%
parnobreakvspacehtstrutboxnoindent
fbox%
parbox[c][dimexpr#1-2fboxsep][t]dimexprlinewidth-2fboxsep
hrule width hsize height 0pt
#2
%
%
parvspacehtstrutbox

makeatother

begindocument
beginenumerate
item Tell me about yourself.
beginenumerate
item What is your name?
makenonemptybox2cmMy name is Nadia.
item Where are you from?
makenonemptybox2cmLorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam a venenatis lacus. Nunc vitae mollis neque. Maecenas vel arcu erat.
item How old are you?
item framebox[linewidth]rule0pt2cm
endenumerate
endenumerate

enddocument


As you can see makenoemptybox makes a bigger vertical space compared to framebox (refer to the coloured arrows). How can I make the vertical space made by makenoemptybox follows that of framebox?



enter image description here










share|improve this question























  • Related Question: mdframed box of fixed minimum height.
    – Peter Grill
    Sep 8 at 7:05










  • Perhaps I am missing something, but if you just want an empty box of the same size, why not just use makenonemptybox2cm?
    – Peter Grill
    Sep 8 at 7:08










  • @PeterGrill I've just edited the picture.
    – Nadia
    Sep 8 at 7:47






  • 1




    side remark: as got clarified later the parbox[c][dimexpr#1-2fboxsep] in makenonemptybox should have been parbox[c][#1] to start with, because when framebox[linewidth]rule0pt2cm is used the total height is 2cm + 2fboxsep + 2fboxrule. To do the same with makenonemptybox for the height it thus should be parbox[c][#1] when #1 is 2cm. Besides, removing fboxsep makes no sense if not removing also fboxrule, then total height including frame and separation would be 2cm. But framebox[linewidth]rule0pt2cm gives 2cm+2fboxsep+2fboxrule.
    – jfbu
    Sep 8 at 9:31














up vote
7
down vote

favorite












I am using report class and have been using framebox[linewidth]rule0pt2cm to create an empty box with a certain height. Now, I would like to write in that empty box. By referring to How can I write something in a box with makeemptybox1.8in?, I achieved the following:



documentclass[a4paper,11pt]report

newcommandmakenonemptybox[2]%
parnobreakvspacehtstrutboxnoindent
fbox%
parbox[c][dimexpr#1-2fboxsep][t]dimexprlinewidth-2fboxsep
hrule width hsize height 0pt
#2
%
%
parvspacehtstrutbox

makeatother

begindocument
beginenumerate
item Tell me about yourself.
beginenumerate
item What is your name?
makenonemptybox2cmMy name is Nadia.
item Where are you from?
makenonemptybox2cmLorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam a venenatis lacus. Nunc vitae mollis neque. Maecenas vel arcu erat.
item How old are you?
item framebox[linewidth]rule0pt2cm
endenumerate
endenumerate

enddocument


As you can see makenoemptybox makes a bigger vertical space compared to framebox (refer to the coloured arrows). How can I make the vertical space made by makenoemptybox follows that of framebox?



enter image description here










share|improve this question























  • Related Question: mdframed box of fixed minimum height.
    – Peter Grill
    Sep 8 at 7:05










  • Perhaps I am missing something, but if you just want an empty box of the same size, why not just use makenonemptybox2cm?
    – Peter Grill
    Sep 8 at 7:08










  • @PeterGrill I've just edited the picture.
    – Nadia
    Sep 8 at 7:47






  • 1




    side remark: as got clarified later the parbox[c][dimexpr#1-2fboxsep] in makenonemptybox should have been parbox[c][#1] to start with, because when framebox[linewidth]rule0pt2cm is used the total height is 2cm + 2fboxsep + 2fboxrule. To do the same with makenonemptybox for the height it thus should be parbox[c][#1] when #1 is 2cm. Besides, removing fboxsep makes no sense if not removing also fboxrule, then total height including frame and separation would be 2cm. But framebox[linewidth]rule0pt2cm gives 2cm+2fboxsep+2fboxrule.
    – jfbu
    Sep 8 at 9:31












up vote
7
down vote

favorite









up vote
7
down vote

favorite











I am using report class and have been using framebox[linewidth]rule0pt2cm to create an empty box with a certain height. Now, I would like to write in that empty box. By referring to How can I write something in a box with makeemptybox1.8in?, I achieved the following:



documentclass[a4paper,11pt]report

newcommandmakenonemptybox[2]%
parnobreakvspacehtstrutboxnoindent
fbox%
parbox[c][dimexpr#1-2fboxsep][t]dimexprlinewidth-2fboxsep
hrule width hsize height 0pt
#2
%
%
parvspacehtstrutbox

makeatother

begindocument
beginenumerate
item Tell me about yourself.
beginenumerate
item What is your name?
makenonemptybox2cmMy name is Nadia.
item Where are you from?
makenonemptybox2cmLorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam a venenatis lacus. Nunc vitae mollis neque. Maecenas vel arcu erat.
item How old are you?
item framebox[linewidth]rule0pt2cm
endenumerate
endenumerate

enddocument


As you can see makenoemptybox makes a bigger vertical space compared to framebox (refer to the coloured arrows). How can I make the vertical space made by makenoemptybox follows that of framebox?



enter image description here










share|improve this question















I am using report class and have been using framebox[linewidth]rule0pt2cm to create an empty box with a certain height. Now, I would like to write in that empty box. By referring to How can I write something in a box with makeemptybox1.8in?, I achieved the following:



documentclass[a4paper,11pt]report

newcommandmakenonemptybox[2]%
parnobreakvspacehtstrutboxnoindent
fbox%
parbox[c][dimexpr#1-2fboxsep][t]dimexprlinewidth-2fboxsep
hrule width hsize height 0pt
#2
%
%
parvspacehtstrutbox

makeatother

begindocument
beginenumerate
item Tell me about yourself.
beginenumerate
item What is your name?
makenonemptybox2cmMy name is Nadia.
item Where are you from?
makenonemptybox2cmLorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam a venenatis lacus. Nunc vitae mollis neque. Maecenas vel arcu erat.
item How old are you?
item framebox[linewidth]rule0pt2cm
endenumerate
endenumerate

enddocument


As you can see makenoemptybox makes a bigger vertical space compared to framebox (refer to the coloured arrows). How can I make the vertical space made by makenoemptybox follows that of framebox?



enter image description here







box






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Sep 8 at 7:44

























asked Sep 8 at 6:22









Nadia

505




505











  • Related Question: mdframed box of fixed minimum height.
    – Peter Grill
    Sep 8 at 7:05










  • Perhaps I am missing something, but if you just want an empty box of the same size, why not just use makenonemptybox2cm?
    – Peter Grill
    Sep 8 at 7:08










  • @PeterGrill I've just edited the picture.
    – Nadia
    Sep 8 at 7:47






  • 1




    side remark: as got clarified later the parbox[c][dimexpr#1-2fboxsep] in makenonemptybox should have been parbox[c][#1] to start with, because when framebox[linewidth]rule0pt2cm is used the total height is 2cm + 2fboxsep + 2fboxrule. To do the same with makenonemptybox for the height it thus should be parbox[c][#1] when #1 is 2cm. Besides, removing fboxsep makes no sense if not removing also fboxrule, then total height including frame and separation would be 2cm. But framebox[linewidth]rule0pt2cm gives 2cm+2fboxsep+2fboxrule.
    – jfbu
    Sep 8 at 9:31
















  • Related Question: mdframed box of fixed minimum height.
    – Peter Grill
    Sep 8 at 7:05










  • Perhaps I am missing something, but if you just want an empty box of the same size, why not just use makenonemptybox2cm?
    – Peter Grill
    Sep 8 at 7:08










  • @PeterGrill I've just edited the picture.
    – Nadia
    Sep 8 at 7:47






  • 1




    side remark: as got clarified later the parbox[c][dimexpr#1-2fboxsep] in makenonemptybox should have been parbox[c][#1] to start with, because when framebox[linewidth]rule0pt2cm is used the total height is 2cm + 2fboxsep + 2fboxrule. To do the same with makenonemptybox for the height it thus should be parbox[c][#1] when #1 is 2cm. Besides, removing fboxsep makes no sense if not removing also fboxrule, then total height including frame and separation would be 2cm. But framebox[linewidth]rule0pt2cm gives 2cm+2fboxsep+2fboxrule.
    – jfbu
    Sep 8 at 9:31















Related Question: mdframed box of fixed minimum height.
– Peter Grill
Sep 8 at 7:05




Related Question: mdframed box of fixed minimum height.
– Peter Grill
Sep 8 at 7:05












Perhaps I am missing something, but if you just want an empty box of the same size, why not just use makenonemptybox2cm?
– Peter Grill
Sep 8 at 7:08




Perhaps I am missing something, but if you just want an empty box of the same size, why not just use makenonemptybox2cm?
– Peter Grill
Sep 8 at 7:08












@PeterGrill I've just edited the picture.
– Nadia
Sep 8 at 7:47




@PeterGrill I've just edited the picture.
– Nadia
Sep 8 at 7:47




1




1




side remark: as got clarified later the parbox[c][dimexpr#1-2fboxsep] in makenonemptybox should have been parbox[c][#1] to start with, because when framebox[linewidth]rule0pt2cm is used the total height is 2cm + 2fboxsep + 2fboxrule. To do the same with makenonemptybox for the height it thus should be parbox[c][#1] when #1 is 2cm. Besides, removing fboxsep makes no sense if not removing also fboxrule, then total height including frame and separation would be 2cm. But framebox[linewidth]rule0pt2cm gives 2cm+2fboxsep+2fboxrule.
– jfbu
Sep 8 at 9:31




side remark: as got clarified later the parbox[c][dimexpr#1-2fboxsep] in makenonemptybox should have been parbox[c][#1] to start with, because when framebox[linewidth]rule0pt2cm is used the total height is 2cm + 2fboxsep + 2fboxrule. To do the same with makenonemptybox for the height it thus should be parbox[c][#1] when #1 is 2cm. Besides, removing fboxsep makes no sense if not removing also fboxrule, then total height including frame and separation would be 2cm. But framebox[linewidth]rule0pt2cm gives 2cm+2fboxsep+2fboxrule.
– jfbu
Sep 8 at 9:31










2 Answers
2






active

oldest

votes

















up vote
7
down vote



accepted










Use in the definition of makenonemptybox the same method you use for framebox to close current paragraph. Of course, that will restrict its usage to list environments.



documentclass[a4paper,11pt]report

newcommandmakenonemptybox[2]%
%parnobreakvspacehtstrutboxnoindent
item
fbox% added -2fboxrule to specified width to avoid overfull hboxes
% and removed the -2fboxsep from height specification (image not updated)
% because in MWE 2cm is should be height of contents excluding sep and frame
parbox[c][#1][t]dimexprlinewidth-2fboxsep-2fboxrule
hrule width hsize height 0pt
#2
%
%
parvspacehtstrutbox

makeatother

begindocument
beginenumerate
item Tell me about yourself.
beginenumerate
item What is your name?
makenonemptybox2cmMy name is Nadia.
item Where are you from?
makenonemptybox2cmLorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam a venenatis lacus. Nunc vitae mollis neque. Maecenas vel arcu erat.
item How old are you?
item framebox[linewidth]rule0pt2cm
endenumerate
endenumerate

enddocument


enter image description here






share|improve this answer


















  • 1




    you could also drop the item from the macro definition and use it explicitely as input mark-up like you do before the framebox. Then the macro could be used in other contexts, with some adapted prefix such as a par.
    – jfbu
    Sep 8 at 8:12










  • Why does makenonemptybox give me overfull hbox?
    – Nadia
    Sep 8 at 8:55











  • @Nadia because the original code forgot to reduce width by 2fboxrule. I will add that.
    – jfbu
    Sep 8 at 9:10










  • Added also -2fboxrule to height specification.
    – jfbu
    Sep 8 at 9:13










  • wait.... why are 2fboxsep removed from height specs to start with? they should not because 2cm is used by the rule in framebox. I will remove them (and the 2fboxrule I temporarily added)
    – jfbu
    Sep 8 at 9:17

















up vote
0
down vote













A par and a minipage works:



documentclass[a4paper,11pt]report
newcommandmakenonemptybox[2]%
parfboxsep1exfbox%
beginminipage[c][#1][t]dimexprlinewidth-2fboxsep-2fboxrule%
#2endminipage}%
begindocument
beginenumerate
item Tell me about yourself.
beginenumerate
item What is your name?
makenonemptybox2cmMy name is Nadia.
item Where are you from?
makenonemptybox2cmLorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam a venenatis lacus. Nunc vitae mollis neque. Maecenas vel arcu erat.
item How old are you?
item framebox[linewidth]rule0pt2cm
endenumerate
endenumerate
enddocument





share|improve this answer




















    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: false,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: null,
    bindNavPrevention: true,
    postfix: "",
    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%2f449961%2fhow-can-i-write-in-a-box-with-fixed-height%23new-answer', 'question_page');

    );

    Post as a guest






























    2 Answers
    2






    active

    oldest

    votes








    2 Answers
    2






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes








    up vote
    7
    down vote



    accepted










    Use in the definition of makenonemptybox the same method you use for framebox to close current paragraph. Of course, that will restrict its usage to list environments.



    documentclass[a4paper,11pt]report

    newcommandmakenonemptybox[2]%
    %parnobreakvspacehtstrutboxnoindent
    item
    fbox% added -2fboxrule to specified width to avoid overfull hboxes
    % and removed the -2fboxsep from height specification (image not updated)
    % because in MWE 2cm is should be height of contents excluding sep and frame
    parbox[c][#1][t]dimexprlinewidth-2fboxsep-2fboxrule
    hrule width hsize height 0pt
    #2
    %
    %
    parvspacehtstrutbox

    makeatother

    begindocument
    beginenumerate
    item Tell me about yourself.
    beginenumerate
    item What is your name?
    makenonemptybox2cmMy name is Nadia.
    item Where are you from?
    makenonemptybox2cmLorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam a venenatis lacus. Nunc vitae mollis neque. Maecenas vel arcu erat.
    item How old are you?
    item framebox[linewidth]rule0pt2cm
    endenumerate
    endenumerate

    enddocument


    enter image description here






    share|improve this answer


















    • 1




      you could also drop the item from the macro definition and use it explicitely as input mark-up like you do before the framebox. Then the macro could be used in other contexts, with some adapted prefix such as a par.
      – jfbu
      Sep 8 at 8:12










    • Why does makenonemptybox give me overfull hbox?
      – Nadia
      Sep 8 at 8:55











    • @Nadia because the original code forgot to reduce width by 2fboxrule. I will add that.
      – jfbu
      Sep 8 at 9:10










    • Added also -2fboxrule to height specification.
      – jfbu
      Sep 8 at 9:13










    • wait.... why are 2fboxsep removed from height specs to start with? they should not because 2cm is used by the rule in framebox. I will remove them (and the 2fboxrule I temporarily added)
      – jfbu
      Sep 8 at 9:17














    up vote
    7
    down vote



    accepted










    Use in the definition of makenonemptybox the same method you use for framebox to close current paragraph. Of course, that will restrict its usage to list environments.



    documentclass[a4paper,11pt]report

    newcommandmakenonemptybox[2]%
    %parnobreakvspacehtstrutboxnoindent
    item
    fbox% added -2fboxrule to specified width to avoid overfull hboxes
    % and removed the -2fboxsep from height specification (image not updated)
    % because in MWE 2cm is should be height of contents excluding sep and frame
    parbox[c][#1][t]dimexprlinewidth-2fboxsep-2fboxrule
    hrule width hsize height 0pt
    #2
    %
    %
    parvspacehtstrutbox

    makeatother

    begindocument
    beginenumerate
    item Tell me about yourself.
    beginenumerate
    item What is your name?
    makenonemptybox2cmMy name is Nadia.
    item Where are you from?
    makenonemptybox2cmLorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam a venenatis lacus. Nunc vitae mollis neque. Maecenas vel arcu erat.
    item How old are you?
    item framebox[linewidth]rule0pt2cm
    endenumerate
    endenumerate

    enddocument


    enter image description here






    share|improve this answer


















    • 1




      you could also drop the item from the macro definition and use it explicitely as input mark-up like you do before the framebox. Then the macro could be used in other contexts, with some adapted prefix such as a par.
      – jfbu
      Sep 8 at 8:12










    • Why does makenonemptybox give me overfull hbox?
      – Nadia
      Sep 8 at 8:55











    • @Nadia because the original code forgot to reduce width by 2fboxrule. I will add that.
      – jfbu
      Sep 8 at 9:10










    • Added also -2fboxrule to height specification.
      – jfbu
      Sep 8 at 9:13










    • wait.... why are 2fboxsep removed from height specs to start with? they should not because 2cm is used by the rule in framebox. I will remove them (and the 2fboxrule I temporarily added)
      – jfbu
      Sep 8 at 9:17












    up vote
    7
    down vote



    accepted







    up vote
    7
    down vote



    accepted






    Use in the definition of makenonemptybox the same method you use for framebox to close current paragraph. Of course, that will restrict its usage to list environments.



    documentclass[a4paper,11pt]report

    newcommandmakenonemptybox[2]%
    %parnobreakvspacehtstrutboxnoindent
    item
    fbox% added -2fboxrule to specified width to avoid overfull hboxes
    % and removed the -2fboxsep from height specification (image not updated)
    % because in MWE 2cm is should be height of contents excluding sep and frame
    parbox[c][#1][t]dimexprlinewidth-2fboxsep-2fboxrule
    hrule width hsize height 0pt
    #2
    %
    %
    parvspacehtstrutbox

    makeatother

    begindocument
    beginenumerate
    item Tell me about yourself.
    beginenumerate
    item What is your name?
    makenonemptybox2cmMy name is Nadia.
    item Where are you from?
    makenonemptybox2cmLorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam a venenatis lacus. Nunc vitae mollis neque. Maecenas vel arcu erat.
    item How old are you?
    item framebox[linewidth]rule0pt2cm
    endenumerate
    endenumerate

    enddocument


    enter image description here






    share|improve this answer














    Use in the definition of makenonemptybox the same method you use for framebox to close current paragraph. Of course, that will restrict its usage to list environments.



    documentclass[a4paper,11pt]report

    newcommandmakenonemptybox[2]%
    %parnobreakvspacehtstrutboxnoindent
    item
    fbox% added -2fboxrule to specified width to avoid overfull hboxes
    % and removed the -2fboxsep from height specification (image not updated)
    % because in MWE 2cm is should be height of contents excluding sep and frame
    parbox[c][#1][t]dimexprlinewidth-2fboxsep-2fboxrule
    hrule width hsize height 0pt
    #2
    %
    %
    parvspacehtstrutbox

    makeatother

    begindocument
    beginenumerate
    item Tell me about yourself.
    beginenumerate
    item What is your name?
    makenonemptybox2cmMy name is Nadia.
    item Where are you from?
    makenonemptybox2cmLorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam a venenatis lacus. Nunc vitae mollis neque. Maecenas vel arcu erat.
    item How old are you?
    item framebox[linewidth]rule0pt2cm
    endenumerate
    endenumerate

    enddocument


    enter image description here







    share|improve this answer














    share|improve this answer



    share|improve this answer








    edited Sep 8 at 9:19

























    answered Sep 8 at 7:50









    jfbu

    42.4k63136




    42.4k63136







    • 1




      you could also drop the item from the macro definition and use it explicitely as input mark-up like you do before the framebox. Then the macro could be used in other contexts, with some adapted prefix such as a par.
      – jfbu
      Sep 8 at 8:12










    • Why does makenonemptybox give me overfull hbox?
      – Nadia
      Sep 8 at 8:55











    • @Nadia because the original code forgot to reduce width by 2fboxrule. I will add that.
      – jfbu
      Sep 8 at 9:10










    • Added also -2fboxrule to height specification.
      – jfbu
      Sep 8 at 9:13










    • wait.... why are 2fboxsep removed from height specs to start with? they should not because 2cm is used by the rule in framebox. I will remove them (and the 2fboxrule I temporarily added)
      – jfbu
      Sep 8 at 9:17












    • 1




      you could also drop the item from the macro definition and use it explicitely as input mark-up like you do before the framebox. Then the macro could be used in other contexts, with some adapted prefix such as a par.
      – jfbu
      Sep 8 at 8:12










    • Why does makenonemptybox give me overfull hbox?
      – Nadia
      Sep 8 at 8:55











    • @Nadia because the original code forgot to reduce width by 2fboxrule. I will add that.
      – jfbu
      Sep 8 at 9:10










    • Added also -2fboxrule to height specification.
      – jfbu
      Sep 8 at 9:13










    • wait.... why are 2fboxsep removed from height specs to start with? they should not because 2cm is used by the rule in framebox. I will remove them (and the 2fboxrule I temporarily added)
      – jfbu
      Sep 8 at 9:17







    1




    1




    you could also drop the item from the macro definition and use it explicitely as input mark-up like you do before the framebox. Then the macro could be used in other contexts, with some adapted prefix such as a par.
    – jfbu
    Sep 8 at 8:12




    you could also drop the item from the macro definition and use it explicitely as input mark-up like you do before the framebox. Then the macro could be used in other contexts, with some adapted prefix such as a par.
    – jfbu
    Sep 8 at 8:12












    Why does makenonemptybox give me overfull hbox?
    – Nadia
    Sep 8 at 8:55





    Why does makenonemptybox give me overfull hbox?
    – Nadia
    Sep 8 at 8:55













    @Nadia because the original code forgot to reduce width by 2fboxrule. I will add that.
    – jfbu
    Sep 8 at 9:10




    @Nadia because the original code forgot to reduce width by 2fboxrule. I will add that.
    – jfbu
    Sep 8 at 9:10












    Added also -2fboxrule to height specification.
    – jfbu
    Sep 8 at 9:13




    Added also -2fboxrule to height specification.
    – jfbu
    Sep 8 at 9:13












    wait.... why are 2fboxsep removed from height specs to start with? they should not because 2cm is used by the rule in framebox. I will remove them (and the 2fboxrule I temporarily added)
    – jfbu
    Sep 8 at 9:17




    wait.... why are 2fboxsep removed from height specs to start with? they should not because 2cm is used by the rule in framebox. I will remove them (and the 2fboxrule I temporarily added)
    – jfbu
    Sep 8 at 9:17










    up vote
    0
    down vote













    A par and a minipage works:



    documentclass[a4paper,11pt]report
    newcommandmakenonemptybox[2]%
    parfboxsep1exfbox%
    beginminipage[c][#1][t]dimexprlinewidth-2fboxsep-2fboxrule%
    #2endminipage}%
    begindocument
    beginenumerate
    item Tell me about yourself.
    beginenumerate
    item What is your name?
    makenonemptybox2cmMy name is Nadia.
    item Where are you from?
    makenonemptybox2cmLorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam a venenatis lacus. Nunc vitae mollis neque. Maecenas vel arcu erat.
    item How old are you?
    item framebox[linewidth]rule0pt2cm
    endenumerate
    endenumerate
    enddocument





    share|improve this answer
























      up vote
      0
      down vote













      A par and a minipage works:



      documentclass[a4paper,11pt]report
      newcommandmakenonemptybox[2]%
      parfboxsep1exfbox%
      beginminipage[c][#1][t]dimexprlinewidth-2fboxsep-2fboxrule%
      #2endminipage}%
      begindocument
      beginenumerate
      item Tell me about yourself.
      beginenumerate
      item What is your name?
      makenonemptybox2cmMy name is Nadia.
      item Where are you from?
      makenonemptybox2cmLorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam a venenatis lacus. Nunc vitae mollis neque. Maecenas vel arcu erat.
      item How old are you?
      item framebox[linewidth]rule0pt2cm
      endenumerate
      endenumerate
      enddocument





      share|improve this answer






















        up vote
        0
        down vote










        up vote
        0
        down vote









        A par and a minipage works:



        documentclass[a4paper,11pt]report
        newcommandmakenonemptybox[2]%
        parfboxsep1exfbox%
        beginminipage[c][#1][t]dimexprlinewidth-2fboxsep-2fboxrule%
        #2endminipage}%
        begindocument
        beginenumerate
        item Tell me about yourself.
        beginenumerate
        item What is your name?
        makenonemptybox2cmMy name is Nadia.
        item Where are you from?
        makenonemptybox2cmLorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam a venenatis lacus. Nunc vitae mollis neque. Maecenas vel arcu erat.
        item How old are you?
        item framebox[linewidth]rule0pt2cm
        endenumerate
        endenumerate
        enddocument





        share|improve this answer












        A par and a minipage works:



        documentclass[a4paper,11pt]report
        newcommandmakenonemptybox[2]%
        parfboxsep1exfbox%
        beginminipage[c][#1][t]dimexprlinewidth-2fboxsep-2fboxrule%
        #2endminipage}%
        begindocument
        beginenumerate
        item Tell me about yourself.
        beginenumerate
        item What is your name?
        makenonemptybox2cmMy name is Nadia.
        item Where are you from?
        makenonemptybox2cmLorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam a venenatis lacus. Nunc vitae mollis neque. Maecenas vel arcu erat.
        item How old are you?
        item framebox[linewidth]rule0pt2cm
        endenumerate
        endenumerate
        enddocument






        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Sep 9 at 10:13









        Fran

        48.5k6110170




        48.5k6110170



























             

            draft saved


            draft discarded















































             


            draft saved


            draft discarded














            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f449961%2fhow-can-i-write-in-a-box-with-fixed-height%23new-answer', 'question_page');

            );

            Post as a guest













































































            Popular posts from this blog

            How to check contact read email or not when send email to Individual?

            Displaying single band from multi-band raster using QGIS

            How many registers does an x86_64 CPU actually have?