Adapting bigcup size to array without distortions












1















I want to have a cup command that adapts to the size of an array on its left (Something like left and right for the parenthesis), while keeping the same font for the letters and the thickness of the line. I tried using bigcup with the scalerel package but the line and the subscript become too wide. I report here a minimal example to show what is the result:



documentclass{article}
usepackage{scalerel}
begin{document}
[
scalerel{
bigcuplimits_{x in X}
}
{
left{
f(x)
begin{array}{| l}
a \ % first row
b \ % second row
c \ % third row
d \ % fourth row
e \ % fifth row
dots \ % etc.
z \ % n-th row
end{array}
right}
}
]
end{document}


The size obtained is the right one, however the size of font x in X becomes too big and the line too thick.



How can I have a similar result without these distortions?










share|improve this question




















  • 2





    I've taken the liberty of augmenting your code so that it can be compiled without guessing as to which packages might be needed. Feel free to revert.

    – Mico
    Feb 25 at 11:28






  • 1





    Just out of idle curiosity: Is there a reason for not employing a more conventional-looking solution, such as $bigcup_{xin X} {, f(x) mid a,b,c,dots,z ,}$?

    – Mico
    Feb 25 at 11:34













  • Hey, thank you for the support and the edit, I really appreciate! The reason is that a, b, c, etc. stands for very long conditions that do not fit inside a single line and are clearer if they are split into multiple lines.

    – Briomkez
    Feb 25 at 12:03













  • Depending on just how many rows there are in the array, the bigcup symbol just might become absurdly large. Is there maybe an upper limit on the permissible enlargement of the symbol?

    – Mico
    Feb 25 at 16:31






  • 1





    Is it absolutely necessary to have the cup scale with the array? (Instead of just scaling by a fixed amount to make an ultra large cup to use with arrays.)

    – Pippip19
    Feb 25 at 20:19
















1















I want to have a cup command that adapts to the size of an array on its left (Something like left and right for the parenthesis), while keeping the same font for the letters and the thickness of the line. I tried using bigcup with the scalerel package but the line and the subscript become too wide. I report here a minimal example to show what is the result:



documentclass{article}
usepackage{scalerel}
begin{document}
[
scalerel{
bigcuplimits_{x in X}
}
{
left{
f(x)
begin{array}{| l}
a \ % first row
b \ % second row
c \ % third row
d \ % fourth row
e \ % fifth row
dots \ % etc.
z \ % n-th row
end{array}
right}
}
]
end{document}


The size obtained is the right one, however the size of font x in X becomes too big and the line too thick.



How can I have a similar result without these distortions?










share|improve this question




















  • 2





    I've taken the liberty of augmenting your code so that it can be compiled without guessing as to which packages might be needed. Feel free to revert.

    – Mico
    Feb 25 at 11:28






  • 1





    Just out of idle curiosity: Is there a reason for not employing a more conventional-looking solution, such as $bigcup_{xin X} {, f(x) mid a,b,c,dots,z ,}$?

    – Mico
    Feb 25 at 11:34













  • Hey, thank you for the support and the edit, I really appreciate! The reason is that a, b, c, etc. stands for very long conditions that do not fit inside a single line and are clearer if they are split into multiple lines.

    – Briomkez
    Feb 25 at 12:03













  • Depending on just how many rows there are in the array, the bigcup symbol just might become absurdly large. Is there maybe an upper limit on the permissible enlargement of the symbol?

    – Mico
    Feb 25 at 16:31






  • 1





    Is it absolutely necessary to have the cup scale with the array? (Instead of just scaling by a fixed amount to make an ultra large cup to use with arrays.)

    – Pippip19
    Feb 25 at 20:19














1












1








1








I want to have a cup command that adapts to the size of an array on its left (Something like left and right for the parenthesis), while keeping the same font for the letters and the thickness of the line. I tried using bigcup with the scalerel package but the line and the subscript become too wide. I report here a minimal example to show what is the result:



documentclass{article}
usepackage{scalerel}
begin{document}
[
scalerel{
bigcuplimits_{x in X}
}
{
left{
f(x)
begin{array}{| l}
a \ % first row
b \ % second row
c \ % third row
d \ % fourth row
e \ % fifth row
dots \ % etc.
z \ % n-th row
end{array}
right}
}
]
end{document}


The size obtained is the right one, however the size of font x in X becomes too big and the line too thick.



How can I have a similar result without these distortions?










share|improve this question
















I want to have a cup command that adapts to the size of an array on its left (Something like left and right for the parenthesis), while keeping the same font for the letters and the thickness of the line. I tried using bigcup with the scalerel package but the line and the subscript become too wide. I report here a minimal example to show what is the result:



documentclass{article}
usepackage{scalerel}
begin{document}
[
scalerel{
bigcuplimits_{x in X}
}
{
left{
f(x)
begin{array}{| l}
a \ % first row
b \ % second row
c \ % third row
d \ % fourth row
e \ % fifth row
dots \ % etc.
z \ % n-th row
end{array}
right}
}
]
end{document}


The size obtained is the right one, however the size of font x in X becomes too big and the line too thick.



How can I have a similar result without these distortions?







math-mode






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Feb 25 at 11:31







Briomkez

















asked Feb 25 at 11:20









BriomkezBriomkez

1245




1245








  • 2





    I've taken the liberty of augmenting your code so that it can be compiled without guessing as to which packages might be needed. Feel free to revert.

    – Mico
    Feb 25 at 11:28






  • 1





    Just out of idle curiosity: Is there a reason for not employing a more conventional-looking solution, such as $bigcup_{xin X} {, f(x) mid a,b,c,dots,z ,}$?

    – Mico
    Feb 25 at 11:34













  • Hey, thank you for the support and the edit, I really appreciate! The reason is that a, b, c, etc. stands for very long conditions that do not fit inside a single line and are clearer if they are split into multiple lines.

    – Briomkez
    Feb 25 at 12:03













  • Depending on just how many rows there are in the array, the bigcup symbol just might become absurdly large. Is there maybe an upper limit on the permissible enlargement of the symbol?

    – Mico
    Feb 25 at 16:31






  • 1





    Is it absolutely necessary to have the cup scale with the array? (Instead of just scaling by a fixed amount to make an ultra large cup to use with arrays.)

    – Pippip19
    Feb 25 at 20:19














  • 2





    I've taken the liberty of augmenting your code so that it can be compiled without guessing as to which packages might be needed. Feel free to revert.

    – Mico
    Feb 25 at 11:28






  • 1





    Just out of idle curiosity: Is there a reason for not employing a more conventional-looking solution, such as $bigcup_{xin X} {, f(x) mid a,b,c,dots,z ,}$?

    – Mico
    Feb 25 at 11:34













  • Hey, thank you for the support and the edit, I really appreciate! The reason is that a, b, c, etc. stands for very long conditions that do not fit inside a single line and are clearer if they are split into multiple lines.

    – Briomkez
    Feb 25 at 12:03













  • Depending on just how many rows there are in the array, the bigcup symbol just might become absurdly large. Is there maybe an upper limit on the permissible enlargement of the symbol?

    – Mico
    Feb 25 at 16:31






  • 1





    Is it absolutely necessary to have the cup scale with the array? (Instead of just scaling by a fixed amount to make an ultra large cup to use with arrays.)

    – Pippip19
    Feb 25 at 20:19








2




2





I've taken the liberty of augmenting your code so that it can be compiled without guessing as to which packages might be needed. Feel free to revert.

– Mico
Feb 25 at 11:28





I've taken the liberty of augmenting your code so that it can be compiled without guessing as to which packages might be needed. Feel free to revert.

– Mico
Feb 25 at 11:28




1




1





Just out of idle curiosity: Is there a reason for not employing a more conventional-looking solution, such as $bigcup_{xin X} {, f(x) mid a,b,c,dots,z ,}$?

– Mico
Feb 25 at 11:34







Just out of idle curiosity: Is there a reason for not employing a more conventional-looking solution, such as $bigcup_{xin X} {, f(x) mid a,b,c,dots,z ,}$?

– Mico
Feb 25 at 11:34















Hey, thank you for the support and the edit, I really appreciate! The reason is that a, b, c, etc. stands for very long conditions that do not fit inside a single line and are clearer if they are split into multiple lines.

– Briomkez
Feb 25 at 12:03







Hey, thank you for the support and the edit, I really appreciate! The reason is that a, b, c, etc. stands for very long conditions that do not fit inside a single line and are clearer if they are split into multiple lines.

– Briomkez
Feb 25 at 12:03















Depending on just how many rows there are in the array, the bigcup symbol just might become absurdly large. Is there maybe an upper limit on the permissible enlargement of the symbol?

– Mico
Feb 25 at 16:31





Depending on just how many rows there are in the array, the bigcup symbol just might become absurdly large. Is there maybe an upper limit on the permissible enlargement of the symbol?

– Mico
Feb 25 at 16:31




1




1





Is it absolutely necessary to have the cup scale with the array? (Instead of just scaling by a fixed amount to make an ultra large cup to use with arrays.)

– Pippip19
Feb 25 at 20:19





Is it absolutely necessary to have the cup scale with the array? (Instead of just scaling by a fixed amount to make an ultra large cup to use with arrays.)

– Pippip19
Feb 25 at 20:19










1 Answer
1






active

oldest

votes


















2














I think scaling with the array size you will always be up against the fact that the entire contents of the scalerel box, including the subscript, are scaled, leading to inconsistent script sizes (and probably ridiculously size cups as well).



I would suggest instead using the scaleobj command also provided by the scalerel package, which functions similar to scalebox from the graphicx package. While scaling up the entire cup plus subscript, you can scale the subscript alone in the other direction. To get the subscript sitting nicely under the cup after the inner scaling, a raisebox and smash can be added:



documentclass{article}
usepackage{scalerel}
newcommandhugecup{%
scaleobj{2.5}{%
bigcuplimits_{smash{raisebox{.25baselineskip}{(scaleobj{0.425}{xin X})}}}
}
}
begin{document}
[
hugecup
left{
f(x)
begin{array}{| l}
a \ % first row
b \ % second row
c \ % third row
d \ % fourth row
e \ % fifth row
dots \ % etc.
z \ % n-th row
end{array}
right}
]
end{document}


Output:



output



The values used are just what I thought looked sensible for a range of different (large) arrays; you may wish to tweak these.






share|improve this answer



















  • 2





    Very nice your answer. My best compliments.

    – Sebastiano
    Feb 25 at 21:15











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
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f476578%2fadapting-bigcup-size-to-array-without-distortions%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









2














I think scaling with the array size you will always be up against the fact that the entire contents of the scalerel box, including the subscript, are scaled, leading to inconsistent script sizes (and probably ridiculously size cups as well).



I would suggest instead using the scaleobj command also provided by the scalerel package, which functions similar to scalebox from the graphicx package. While scaling up the entire cup plus subscript, you can scale the subscript alone in the other direction. To get the subscript sitting nicely under the cup after the inner scaling, a raisebox and smash can be added:



documentclass{article}
usepackage{scalerel}
newcommandhugecup{%
scaleobj{2.5}{%
bigcuplimits_{smash{raisebox{.25baselineskip}{(scaleobj{0.425}{xin X})}}}
}
}
begin{document}
[
hugecup
left{
f(x)
begin{array}{| l}
a \ % first row
b \ % second row
c \ % third row
d \ % fourth row
e \ % fifth row
dots \ % etc.
z \ % n-th row
end{array}
right}
]
end{document}


Output:



output



The values used are just what I thought looked sensible for a range of different (large) arrays; you may wish to tweak these.






share|improve this answer



















  • 2





    Very nice your answer. My best compliments.

    – Sebastiano
    Feb 25 at 21:15
















2














I think scaling with the array size you will always be up against the fact that the entire contents of the scalerel box, including the subscript, are scaled, leading to inconsistent script sizes (and probably ridiculously size cups as well).



I would suggest instead using the scaleobj command also provided by the scalerel package, which functions similar to scalebox from the graphicx package. While scaling up the entire cup plus subscript, you can scale the subscript alone in the other direction. To get the subscript sitting nicely under the cup after the inner scaling, a raisebox and smash can be added:



documentclass{article}
usepackage{scalerel}
newcommandhugecup{%
scaleobj{2.5}{%
bigcuplimits_{smash{raisebox{.25baselineskip}{(scaleobj{0.425}{xin X})}}}
}
}
begin{document}
[
hugecup
left{
f(x)
begin{array}{| l}
a \ % first row
b \ % second row
c \ % third row
d \ % fourth row
e \ % fifth row
dots \ % etc.
z \ % n-th row
end{array}
right}
]
end{document}


Output:



output



The values used are just what I thought looked sensible for a range of different (large) arrays; you may wish to tweak these.






share|improve this answer



















  • 2





    Very nice your answer. My best compliments.

    – Sebastiano
    Feb 25 at 21:15














2












2








2







I think scaling with the array size you will always be up against the fact that the entire contents of the scalerel box, including the subscript, are scaled, leading to inconsistent script sizes (and probably ridiculously size cups as well).



I would suggest instead using the scaleobj command also provided by the scalerel package, which functions similar to scalebox from the graphicx package. While scaling up the entire cup plus subscript, you can scale the subscript alone in the other direction. To get the subscript sitting nicely under the cup after the inner scaling, a raisebox and smash can be added:



documentclass{article}
usepackage{scalerel}
newcommandhugecup{%
scaleobj{2.5}{%
bigcuplimits_{smash{raisebox{.25baselineskip}{(scaleobj{0.425}{xin X})}}}
}
}
begin{document}
[
hugecup
left{
f(x)
begin{array}{| l}
a \ % first row
b \ % second row
c \ % third row
d \ % fourth row
e \ % fifth row
dots \ % etc.
z \ % n-th row
end{array}
right}
]
end{document}


Output:



output



The values used are just what I thought looked sensible for a range of different (large) arrays; you may wish to tweak these.






share|improve this answer













I think scaling with the array size you will always be up against the fact that the entire contents of the scalerel box, including the subscript, are scaled, leading to inconsistent script sizes (and probably ridiculously size cups as well).



I would suggest instead using the scaleobj command also provided by the scalerel package, which functions similar to scalebox from the graphicx package. While scaling up the entire cup plus subscript, you can scale the subscript alone in the other direction. To get the subscript sitting nicely under the cup after the inner scaling, a raisebox and smash can be added:



documentclass{article}
usepackage{scalerel}
newcommandhugecup{%
scaleobj{2.5}{%
bigcuplimits_{smash{raisebox{.25baselineskip}{(scaleobj{0.425}{xin X})}}}
}
}
begin{document}
[
hugecup
left{
f(x)
begin{array}{| l}
a \ % first row
b \ % second row
c \ % third row
d \ % fourth row
e \ % fifth row
dots \ % etc.
z \ % n-th row
end{array}
right}
]
end{document}


Output:



output



The values used are just what I thought looked sensible for a range of different (large) arrays; you may wish to tweak these.







share|improve this answer












share|improve this answer



share|improve this answer










answered Feb 25 at 20:58









Pippip19Pippip19

1,5388




1,5388








  • 2





    Very nice your answer. My best compliments.

    – Sebastiano
    Feb 25 at 21:15














  • 2





    Very nice your answer. My best compliments.

    – Sebastiano
    Feb 25 at 21:15








2




2





Very nice your answer. My best compliments.

– Sebastiano
Feb 25 at 21:15





Very nice your answer. My best compliments.

– Sebastiano
Feb 25 at 21:15


















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.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f476578%2fadapting-bigcup-size-to-array-without-distortions%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