Use scriptsize and shift a longtable to the left with revtex4












1















I have the following table:



   documentclass[a4paper,preprint,aps,
unsortedaddress]{revtex4}
usepackage[top=2.5cm,bottom=2.5cm,
left=3.5cm,right=2.5cm]{geometry}
usepackage{longtable,array,booktabs}

ifdefinedmc
renewcommand{mc}{multicolumn}
else
newcommand{mc}{multicolumn}
fi

begin{document}

setlengthLTleft{-3.0cm}
setlengthLTright{-2.0cm}

scriptsize

begin{longtable}{ l r @{--} p{1.3cm} >{centering}p{2.6cm}
*{4}{p{1.25cm}} p{2.1cm}}
%% headers and footers

caption{Table} \
hlinehline
endfirsthead

mc{9}{c}{tablename thetable -- emph{Continued from previous page}} \
hline
aaaaaaaaaaaaaaaaaaaaaaaa & mc{2}{c}{bbb--ccc} & ddd & eee & fff & ggg & hhh & iii \
hline
endhead

hline
mc{9}{r}{emph{Continued on next page}} \
endfoot

hlinehline
endlastfoot

%% body of table

aaaaaaaaaaaaaaaaaaaaaaaa & mc{2}{c}{bbb--ccc} & ddd & eee & fff & ggg & hhh & iii \
aaaaaaaaaaaaaaaaaaaaaaaa & bbb & ccc & ddd & eee & fff & ggg & hhh & iii \
aaaaaaaaaaaaaaaaaaaaaaaa & bbb & ccc & ddd & eee & fff & ggg & hhh & iii \
aaaaaaaaaaaaaaaaaaaaaaaa & bbb & ccc & ddd & eee & fff & ggg & hhh & iii \

end{longtable}
end{document}


which I would like to shift to the left by setting setlengthLTleft{-3.0cm}
and setlengthLTright{-2.0cm}. Furthermore, I have to apply scriptsize for the table. However, none of these commands are working with revtex4. Could you please provide a solution to this problem? (This question is the same as in LTleft, LTright, and scriptsize not working with revtex4, but I cannot sign up with that username.)
If it is not possible, an alternative solution would also be useful for me. For this case, I attached the first page of my real table.



enter image description here










share|improve this question




















  • 1





    this is the same question as tex.stackexchange.com/questions/474569/… are you the same user? You could get the accounts merged

    – David Carlisle
    Feb 12 at 20:38











  • How to perform this?

    – TobiR
    Feb 12 at 20:39











  • delete setlengthLTright{-2.0cm} and just set LTleft and the table will move left

    – David Carlisle
    Feb 12 at 20:40











  • Thank you. Could you please explain why scriptsize does not work?

    – TobiR
    Feb 12 at 20:42











  • see tex.stackexchange.com/help/merging-accounts

    – David Carlisle
    Feb 12 at 20:42
















1















I have the following table:



   documentclass[a4paper,preprint,aps,
unsortedaddress]{revtex4}
usepackage[top=2.5cm,bottom=2.5cm,
left=3.5cm,right=2.5cm]{geometry}
usepackage{longtable,array,booktabs}

ifdefinedmc
renewcommand{mc}{multicolumn}
else
newcommand{mc}{multicolumn}
fi

begin{document}

setlengthLTleft{-3.0cm}
setlengthLTright{-2.0cm}

scriptsize

begin{longtable}{ l r @{--} p{1.3cm} >{centering}p{2.6cm}
*{4}{p{1.25cm}} p{2.1cm}}
%% headers and footers

caption{Table} \
hlinehline
endfirsthead

mc{9}{c}{tablename thetable -- emph{Continued from previous page}} \
hline
aaaaaaaaaaaaaaaaaaaaaaaa & mc{2}{c}{bbb--ccc} & ddd & eee & fff & ggg & hhh & iii \
hline
endhead

hline
mc{9}{r}{emph{Continued on next page}} \
endfoot

hlinehline
endlastfoot

%% body of table

aaaaaaaaaaaaaaaaaaaaaaaa & mc{2}{c}{bbb--ccc} & ddd & eee & fff & ggg & hhh & iii \
aaaaaaaaaaaaaaaaaaaaaaaa & bbb & ccc & ddd & eee & fff & ggg & hhh & iii \
aaaaaaaaaaaaaaaaaaaaaaaa & bbb & ccc & ddd & eee & fff & ggg & hhh & iii \
aaaaaaaaaaaaaaaaaaaaaaaa & bbb & ccc & ddd & eee & fff & ggg & hhh & iii \

end{longtable}
end{document}


which I would like to shift to the left by setting setlengthLTleft{-3.0cm}
and setlengthLTright{-2.0cm}. Furthermore, I have to apply scriptsize for the table. However, none of these commands are working with revtex4. Could you please provide a solution to this problem? (This question is the same as in LTleft, LTright, and scriptsize not working with revtex4, but I cannot sign up with that username.)
If it is not possible, an alternative solution would also be useful for me. For this case, I attached the first page of my real table.



enter image description here










share|improve this question




















  • 1





    this is the same question as tex.stackexchange.com/questions/474569/… are you the same user? You could get the accounts merged

    – David Carlisle
    Feb 12 at 20:38











  • How to perform this?

    – TobiR
    Feb 12 at 20:39











  • delete setlengthLTright{-2.0cm} and just set LTleft and the table will move left

    – David Carlisle
    Feb 12 at 20:40











  • Thank you. Could you please explain why scriptsize does not work?

    – TobiR
    Feb 12 at 20:42











  • see tex.stackexchange.com/help/merging-accounts

    – David Carlisle
    Feb 12 at 20:42














1












1








1








I have the following table:



   documentclass[a4paper,preprint,aps,
unsortedaddress]{revtex4}
usepackage[top=2.5cm,bottom=2.5cm,
left=3.5cm,right=2.5cm]{geometry}
usepackage{longtable,array,booktabs}

ifdefinedmc
renewcommand{mc}{multicolumn}
else
newcommand{mc}{multicolumn}
fi

begin{document}

setlengthLTleft{-3.0cm}
setlengthLTright{-2.0cm}

scriptsize

begin{longtable}{ l r @{--} p{1.3cm} >{centering}p{2.6cm}
*{4}{p{1.25cm}} p{2.1cm}}
%% headers and footers

caption{Table} \
hlinehline
endfirsthead

mc{9}{c}{tablename thetable -- emph{Continued from previous page}} \
hline
aaaaaaaaaaaaaaaaaaaaaaaa & mc{2}{c}{bbb--ccc} & ddd & eee & fff & ggg & hhh & iii \
hline
endhead

hline
mc{9}{r}{emph{Continued on next page}} \
endfoot

hlinehline
endlastfoot

%% body of table

aaaaaaaaaaaaaaaaaaaaaaaa & mc{2}{c}{bbb--ccc} & ddd & eee & fff & ggg & hhh & iii \
aaaaaaaaaaaaaaaaaaaaaaaa & bbb & ccc & ddd & eee & fff & ggg & hhh & iii \
aaaaaaaaaaaaaaaaaaaaaaaa & bbb & ccc & ddd & eee & fff & ggg & hhh & iii \
aaaaaaaaaaaaaaaaaaaaaaaa & bbb & ccc & ddd & eee & fff & ggg & hhh & iii \

end{longtable}
end{document}


which I would like to shift to the left by setting setlengthLTleft{-3.0cm}
and setlengthLTright{-2.0cm}. Furthermore, I have to apply scriptsize for the table. However, none of these commands are working with revtex4. Could you please provide a solution to this problem? (This question is the same as in LTleft, LTright, and scriptsize not working with revtex4, but I cannot sign up with that username.)
If it is not possible, an alternative solution would also be useful for me. For this case, I attached the first page of my real table.



enter image description here










share|improve this question
















I have the following table:



   documentclass[a4paper,preprint,aps,
unsortedaddress]{revtex4}
usepackage[top=2.5cm,bottom=2.5cm,
left=3.5cm,right=2.5cm]{geometry}
usepackage{longtable,array,booktabs}

ifdefinedmc
renewcommand{mc}{multicolumn}
else
newcommand{mc}{multicolumn}
fi

begin{document}

setlengthLTleft{-3.0cm}
setlengthLTright{-2.0cm}

scriptsize

begin{longtable}{ l r @{--} p{1.3cm} >{centering}p{2.6cm}
*{4}{p{1.25cm}} p{2.1cm}}
%% headers and footers

caption{Table} \
hlinehline
endfirsthead

mc{9}{c}{tablename thetable -- emph{Continued from previous page}} \
hline
aaaaaaaaaaaaaaaaaaaaaaaa & mc{2}{c}{bbb--ccc} & ddd & eee & fff & ggg & hhh & iii \
hline
endhead

hline
mc{9}{r}{emph{Continued on next page}} \
endfoot

hlinehline
endlastfoot

%% body of table

aaaaaaaaaaaaaaaaaaaaaaaa & mc{2}{c}{bbb--ccc} & ddd & eee & fff & ggg & hhh & iii \
aaaaaaaaaaaaaaaaaaaaaaaa & bbb & ccc & ddd & eee & fff & ggg & hhh & iii \
aaaaaaaaaaaaaaaaaaaaaaaa & bbb & ccc & ddd & eee & fff & ggg & hhh & iii \
aaaaaaaaaaaaaaaaaaaaaaaa & bbb & ccc & ddd & eee & fff & ggg & hhh & iii \

end{longtable}
end{document}


which I would like to shift to the left by setting setlengthLTleft{-3.0cm}
and setlengthLTright{-2.0cm}. Furthermore, I have to apply scriptsize for the table. However, none of these commands are working with revtex4. Could you please provide a solution to this problem? (This question is the same as in LTleft, LTright, and scriptsize not working with revtex4, but I cannot sign up with that username.)
If it is not possible, an alternative solution would also be useful for me. For this case, I attached the first page of my real table.



enter image description here







spacing margins longtable fontsize revtex






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Feb 13 at 9:10







TobiR

















asked Feb 12 at 20:34









TobiRTobiR

162




162








  • 1





    this is the same question as tex.stackexchange.com/questions/474569/… are you the same user? You could get the accounts merged

    – David Carlisle
    Feb 12 at 20:38











  • How to perform this?

    – TobiR
    Feb 12 at 20:39











  • delete setlengthLTright{-2.0cm} and just set LTleft and the table will move left

    – David Carlisle
    Feb 12 at 20:40











  • Thank you. Could you please explain why scriptsize does not work?

    – TobiR
    Feb 12 at 20:42











  • see tex.stackexchange.com/help/merging-accounts

    – David Carlisle
    Feb 12 at 20:42














  • 1





    this is the same question as tex.stackexchange.com/questions/474569/… are you the same user? You could get the accounts merged

    – David Carlisle
    Feb 12 at 20:38











  • How to perform this?

    – TobiR
    Feb 12 at 20:39











  • delete setlengthLTright{-2.0cm} and just set LTleft and the table will move left

    – David Carlisle
    Feb 12 at 20:40











  • Thank you. Could you please explain why scriptsize does not work?

    – TobiR
    Feb 12 at 20:42











  • see tex.stackexchange.com/help/merging-accounts

    – David Carlisle
    Feb 12 at 20:42








1




1





this is the same question as tex.stackexchange.com/questions/474569/… are you the same user? You could get the accounts merged

– David Carlisle
Feb 12 at 20:38





this is the same question as tex.stackexchange.com/questions/474569/… are you the same user? You could get the accounts merged

– David Carlisle
Feb 12 at 20:38













How to perform this?

– TobiR
Feb 12 at 20:39





How to perform this?

– TobiR
Feb 12 at 20:39













delete setlengthLTright{-2.0cm} and just set LTleft and the table will move left

– David Carlisle
Feb 12 at 20:40





delete setlengthLTright{-2.0cm} and just set LTleft and the table will move left

– David Carlisle
Feb 12 at 20:40













Thank you. Could you please explain why scriptsize does not work?

– TobiR
Feb 12 at 20:42





Thank you. Could you please explain why scriptsize does not work?

– TobiR
Feb 12 at 20:42













see tex.stackexchange.com/help/merging-accounts

– David Carlisle
Feb 12 at 20:42





see tex.stackexchange.com/help/merging-accounts

– David Carlisle
Feb 12 at 20:42










1 Answer
1






active

oldest

votes


















1














The revtex4 classes (by the way, the current version is revtex4-2) issue table@hook when a longtable is being built. The standard value for table@hook is small.



documentclass[a4paper,preprint,aps,unsortedaddress]{revtex4-2}

usepackage{longtable,array,booktabs}

newcommand{mc}{multicolumn}

makeatletter
newenvironment{xlongtable}[1]
{appdeftable@hook{#1}longtable}
{endlongtable}

begin{document}

begin{xlongtable}{scriptsize}{
l r @{--} p{1.3cm} >{centering}p{2.6cm}
*{4}{p{1.25cm}} p{2.1cm}
}
%% headers and footers

caption{Table} \
toprule
endfirsthead

mc{9}{c}{tablename thetable -- emph{Continued from previous page}} \
midrule
aaaaaaaaaaaaaaaaaaaaaaaa & mc{2}{c}{bbb--ccc} & ddd & eee & fff & ggg & hhh & iii \
midrule
endhead

midrule
mc{9}{r}{emph{Continued on next page}} \
endfoot

bottomrule
endlastfoot

%% body of table

aaaaaaaaaaaaaaaaaaaaaaaa & mc{2}{c}{bbb--ccc} & ddd & eee & fff & ggg & hhh & iii \
aaaaaaaaaaaaaaaaaaaaaaaa & bbb & ccc & ddd & eee & fff & ggg & hhh & iii \
aaaaaaaaaaaaaaaaaaaaaaaa & bbb & ccc & ddd & eee & fff & ggg & hhh & iii \
aaaaaaaaaaaaaaaaaaaaaaaa & bbb & ccc & ddd & eee & fff & ggg & hhh & iii \

end{xlongtable}

end{document}


enter image description here



I removed the conditional redefinition of mc: if the command is defined, it would be a mistake to redefine it without knowing where it comes from.



Setting LTleft and LTright requires a hack. Be aware that such tricks can be worthy a rejection, as they change the shape of documents from what revtex people expect.



documentclass[a4paper,preprint,aps,unsortedaddress]{revtex4-2}

usepackage{longtable,array,booktabs}
usepackage{showframe}

newcommand{mc}{multicolumn}

makeatletter
newenvironment{xlongtable}[1]
{appdeftable@hook{#1}longtable}
{endlongtable}
newcommandtobirgobblefour[4]{}
makeatother

begin{document}

begin{xlongtable}{%
scriptsize % this table is in script size
setlength{LTleft}{-3cm plus 1fill}% move to left
tobirgobblefour % remove the setting of LTleft and LTright
}{
l r @{--} p{1.3cm} >{centering}p{2.6cm}
*{4}{p{1.25cm}} p{2.1cm}
}
%% headers and footers

caption{Table} \
toprule
endfirsthead

mc{9}{c}{tablename thetable -- emph{Continued from previous page}} \
midrule
aaaaaaaaaaaaaaaaaaaaaaaa & mc{2}{c}{bbb--ccc} & ddd & eee & fff & ggg & hhh & iii \
midrule
endhead

midrule
mc{9}{r}{emph{Continued on next page}} \
endfoot

bottomrule
endlastfoot

%% body of table
aaaaaaaaaaaaaaaaaaaaaaaa & mc{2}{c}{bbb--ccc} & ddd & eee & fff & ggg & hhh & iii \
aaaaaaaaaaaaaaaaaaaaaaaa & bbb & ccc & ddd & eee & fff & ggg & hhh & iii \
aaaaaaaaaaaaaaaaaaaaaaaa & bbb & ccc & ddd & eee & fff & ggg & hhh & iii \
aaaaaaaaaaaaaaaaaaaaaaaa & bbb & ccc & ddd & eee & fff & ggg & hhh & iii \

end{xlongtable}

end{document}


Here I used showframe just to make the page boundaries clear.



enter image description here






share|improve this answer


























  • Thank you for your answer. However, I still have a problem with shifting the table to the left with -3.0 cm. Could you please help me how to perform it?

    – TobiR
    Feb 13 at 7:05








  • 1





    @TobiR I provided it. However, you shouldn't be doing such tricks, as your paper might be rejected. If it is not for a submission to PhysRev (or associated journal), then don't use revtex4 to begin with.

    – egreg
    Feb 13 at 9: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',
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%2f474574%2fuse-scriptsize-and-shift-a-longtable-to-the-left-with-revtex4%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









1














The revtex4 classes (by the way, the current version is revtex4-2) issue table@hook when a longtable is being built. The standard value for table@hook is small.



documentclass[a4paper,preprint,aps,unsortedaddress]{revtex4-2}

usepackage{longtable,array,booktabs}

newcommand{mc}{multicolumn}

makeatletter
newenvironment{xlongtable}[1]
{appdeftable@hook{#1}longtable}
{endlongtable}

begin{document}

begin{xlongtable}{scriptsize}{
l r @{--} p{1.3cm} >{centering}p{2.6cm}
*{4}{p{1.25cm}} p{2.1cm}
}
%% headers and footers

caption{Table} \
toprule
endfirsthead

mc{9}{c}{tablename thetable -- emph{Continued from previous page}} \
midrule
aaaaaaaaaaaaaaaaaaaaaaaa & mc{2}{c}{bbb--ccc} & ddd & eee & fff & ggg & hhh & iii \
midrule
endhead

midrule
mc{9}{r}{emph{Continued on next page}} \
endfoot

bottomrule
endlastfoot

%% body of table

aaaaaaaaaaaaaaaaaaaaaaaa & mc{2}{c}{bbb--ccc} & ddd & eee & fff & ggg & hhh & iii \
aaaaaaaaaaaaaaaaaaaaaaaa & bbb & ccc & ddd & eee & fff & ggg & hhh & iii \
aaaaaaaaaaaaaaaaaaaaaaaa & bbb & ccc & ddd & eee & fff & ggg & hhh & iii \
aaaaaaaaaaaaaaaaaaaaaaaa & bbb & ccc & ddd & eee & fff & ggg & hhh & iii \

end{xlongtable}

end{document}


enter image description here



I removed the conditional redefinition of mc: if the command is defined, it would be a mistake to redefine it without knowing where it comes from.



Setting LTleft and LTright requires a hack. Be aware that such tricks can be worthy a rejection, as they change the shape of documents from what revtex people expect.



documentclass[a4paper,preprint,aps,unsortedaddress]{revtex4-2}

usepackage{longtable,array,booktabs}
usepackage{showframe}

newcommand{mc}{multicolumn}

makeatletter
newenvironment{xlongtable}[1]
{appdeftable@hook{#1}longtable}
{endlongtable}
newcommandtobirgobblefour[4]{}
makeatother

begin{document}

begin{xlongtable}{%
scriptsize % this table is in script size
setlength{LTleft}{-3cm plus 1fill}% move to left
tobirgobblefour % remove the setting of LTleft and LTright
}{
l r @{--} p{1.3cm} >{centering}p{2.6cm}
*{4}{p{1.25cm}} p{2.1cm}
}
%% headers and footers

caption{Table} \
toprule
endfirsthead

mc{9}{c}{tablename thetable -- emph{Continued from previous page}} \
midrule
aaaaaaaaaaaaaaaaaaaaaaaa & mc{2}{c}{bbb--ccc} & ddd & eee & fff & ggg & hhh & iii \
midrule
endhead

midrule
mc{9}{r}{emph{Continued on next page}} \
endfoot

bottomrule
endlastfoot

%% body of table
aaaaaaaaaaaaaaaaaaaaaaaa & mc{2}{c}{bbb--ccc} & ddd & eee & fff & ggg & hhh & iii \
aaaaaaaaaaaaaaaaaaaaaaaa & bbb & ccc & ddd & eee & fff & ggg & hhh & iii \
aaaaaaaaaaaaaaaaaaaaaaaa & bbb & ccc & ddd & eee & fff & ggg & hhh & iii \
aaaaaaaaaaaaaaaaaaaaaaaa & bbb & ccc & ddd & eee & fff & ggg & hhh & iii \

end{xlongtable}

end{document}


Here I used showframe just to make the page boundaries clear.



enter image description here






share|improve this answer


























  • Thank you for your answer. However, I still have a problem with shifting the table to the left with -3.0 cm. Could you please help me how to perform it?

    – TobiR
    Feb 13 at 7:05








  • 1





    @TobiR I provided it. However, you shouldn't be doing such tricks, as your paper might be rejected. If it is not for a submission to PhysRev (or associated journal), then don't use revtex4 to begin with.

    – egreg
    Feb 13 at 9:39
















1














The revtex4 classes (by the way, the current version is revtex4-2) issue table@hook when a longtable is being built. The standard value for table@hook is small.



documentclass[a4paper,preprint,aps,unsortedaddress]{revtex4-2}

usepackage{longtable,array,booktabs}

newcommand{mc}{multicolumn}

makeatletter
newenvironment{xlongtable}[1]
{appdeftable@hook{#1}longtable}
{endlongtable}

begin{document}

begin{xlongtable}{scriptsize}{
l r @{--} p{1.3cm} >{centering}p{2.6cm}
*{4}{p{1.25cm}} p{2.1cm}
}
%% headers and footers

caption{Table} \
toprule
endfirsthead

mc{9}{c}{tablename thetable -- emph{Continued from previous page}} \
midrule
aaaaaaaaaaaaaaaaaaaaaaaa & mc{2}{c}{bbb--ccc} & ddd & eee & fff & ggg & hhh & iii \
midrule
endhead

midrule
mc{9}{r}{emph{Continued on next page}} \
endfoot

bottomrule
endlastfoot

%% body of table

aaaaaaaaaaaaaaaaaaaaaaaa & mc{2}{c}{bbb--ccc} & ddd & eee & fff & ggg & hhh & iii \
aaaaaaaaaaaaaaaaaaaaaaaa & bbb & ccc & ddd & eee & fff & ggg & hhh & iii \
aaaaaaaaaaaaaaaaaaaaaaaa & bbb & ccc & ddd & eee & fff & ggg & hhh & iii \
aaaaaaaaaaaaaaaaaaaaaaaa & bbb & ccc & ddd & eee & fff & ggg & hhh & iii \

end{xlongtable}

end{document}


enter image description here



I removed the conditional redefinition of mc: if the command is defined, it would be a mistake to redefine it without knowing where it comes from.



Setting LTleft and LTright requires a hack. Be aware that such tricks can be worthy a rejection, as they change the shape of documents from what revtex people expect.



documentclass[a4paper,preprint,aps,unsortedaddress]{revtex4-2}

usepackage{longtable,array,booktabs}
usepackage{showframe}

newcommand{mc}{multicolumn}

makeatletter
newenvironment{xlongtable}[1]
{appdeftable@hook{#1}longtable}
{endlongtable}
newcommandtobirgobblefour[4]{}
makeatother

begin{document}

begin{xlongtable}{%
scriptsize % this table is in script size
setlength{LTleft}{-3cm plus 1fill}% move to left
tobirgobblefour % remove the setting of LTleft and LTright
}{
l r @{--} p{1.3cm} >{centering}p{2.6cm}
*{4}{p{1.25cm}} p{2.1cm}
}
%% headers and footers

caption{Table} \
toprule
endfirsthead

mc{9}{c}{tablename thetable -- emph{Continued from previous page}} \
midrule
aaaaaaaaaaaaaaaaaaaaaaaa & mc{2}{c}{bbb--ccc} & ddd & eee & fff & ggg & hhh & iii \
midrule
endhead

midrule
mc{9}{r}{emph{Continued on next page}} \
endfoot

bottomrule
endlastfoot

%% body of table
aaaaaaaaaaaaaaaaaaaaaaaa & mc{2}{c}{bbb--ccc} & ddd & eee & fff & ggg & hhh & iii \
aaaaaaaaaaaaaaaaaaaaaaaa & bbb & ccc & ddd & eee & fff & ggg & hhh & iii \
aaaaaaaaaaaaaaaaaaaaaaaa & bbb & ccc & ddd & eee & fff & ggg & hhh & iii \
aaaaaaaaaaaaaaaaaaaaaaaa & bbb & ccc & ddd & eee & fff & ggg & hhh & iii \

end{xlongtable}

end{document}


Here I used showframe just to make the page boundaries clear.



enter image description here






share|improve this answer


























  • Thank you for your answer. However, I still have a problem with shifting the table to the left with -3.0 cm. Could you please help me how to perform it?

    – TobiR
    Feb 13 at 7:05








  • 1





    @TobiR I provided it. However, you shouldn't be doing such tricks, as your paper might be rejected. If it is not for a submission to PhysRev (or associated journal), then don't use revtex4 to begin with.

    – egreg
    Feb 13 at 9:39














1












1








1







The revtex4 classes (by the way, the current version is revtex4-2) issue table@hook when a longtable is being built. The standard value for table@hook is small.



documentclass[a4paper,preprint,aps,unsortedaddress]{revtex4-2}

usepackage{longtable,array,booktabs}

newcommand{mc}{multicolumn}

makeatletter
newenvironment{xlongtable}[1]
{appdeftable@hook{#1}longtable}
{endlongtable}

begin{document}

begin{xlongtable}{scriptsize}{
l r @{--} p{1.3cm} >{centering}p{2.6cm}
*{4}{p{1.25cm}} p{2.1cm}
}
%% headers and footers

caption{Table} \
toprule
endfirsthead

mc{9}{c}{tablename thetable -- emph{Continued from previous page}} \
midrule
aaaaaaaaaaaaaaaaaaaaaaaa & mc{2}{c}{bbb--ccc} & ddd & eee & fff & ggg & hhh & iii \
midrule
endhead

midrule
mc{9}{r}{emph{Continued on next page}} \
endfoot

bottomrule
endlastfoot

%% body of table

aaaaaaaaaaaaaaaaaaaaaaaa & mc{2}{c}{bbb--ccc} & ddd & eee & fff & ggg & hhh & iii \
aaaaaaaaaaaaaaaaaaaaaaaa & bbb & ccc & ddd & eee & fff & ggg & hhh & iii \
aaaaaaaaaaaaaaaaaaaaaaaa & bbb & ccc & ddd & eee & fff & ggg & hhh & iii \
aaaaaaaaaaaaaaaaaaaaaaaa & bbb & ccc & ddd & eee & fff & ggg & hhh & iii \

end{xlongtable}

end{document}


enter image description here



I removed the conditional redefinition of mc: if the command is defined, it would be a mistake to redefine it without knowing where it comes from.



Setting LTleft and LTright requires a hack. Be aware that such tricks can be worthy a rejection, as they change the shape of documents from what revtex people expect.



documentclass[a4paper,preprint,aps,unsortedaddress]{revtex4-2}

usepackage{longtable,array,booktabs}
usepackage{showframe}

newcommand{mc}{multicolumn}

makeatletter
newenvironment{xlongtable}[1]
{appdeftable@hook{#1}longtable}
{endlongtable}
newcommandtobirgobblefour[4]{}
makeatother

begin{document}

begin{xlongtable}{%
scriptsize % this table is in script size
setlength{LTleft}{-3cm plus 1fill}% move to left
tobirgobblefour % remove the setting of LTleft and LTright
}{
l r @{--} p{1.3cm} >{centering}p{2.6cm}
*{4}{p{1.25cm}} p{2.1cm}
}
%% headers and footers

caption{Table} \
toprule
endfirsthead

mc{9}{c}{tablename thetable -- emph{Continued from previous page}} \
midrule
aaaaaaaaaaaaaaaaaaaaaaaa & mc{2}{c}{bbb--ccc} & ddd & eee & fff & ggg & hhh & iii \
midrule
endhead

midrule
mc{9}{r}{emph{Continued on next page}} \
endfoot

bottomrule
endlastfoot

%% body of table
aaaaaaaaaaaaaaaaaaaaaaaa & mc{2}{c}{bbb--ccc} & ddd & eee & fff & ggg & hhh & iii \
aaaaaaaaaaaaaaaaaaaaaaaa & bbb & ccc & ddd & eee & fff & ggg & hhh & iii \
aaaaaaaaaaaaaaaaaaaaaaaa & bbb & ccc & ddd & eee & fff & ggg & hhh & iii \
aaaaaaaaaaaaaaaaaaaaaaaa & bbb & ccc & ddd & eee & fff & ggg & hhh & iii \

end{xlongtable}

end{document}


Here I used showframe just to make the page boundaries clear.



enter image description here






share|improve this answer















The revtex4 classes (by the way, the current version is revtex4-2) issue table@hook when a longtable is being built. The standard value for table@hook is small.



documentclass[a4paper,preprint,aps,unsortedaddress]{revtex4-2}

usepackage{longtable,array,booktabs}

newcommand{mc}{multicolumn}

makeatletter
newenvironment{xlongtable}[1]
{appdeftable@hook{#1}longtable}
{endlongtable}

begin{document}

begin{xlongtable}{scriptsize}{
l r @{--} p{1.3cm} >{centering}p{2.6cm}
*{4}{p{1.25cm}} p{2.1cm}
}
%% headers and footers

caption{Table} \
toprule
endfirsthead

mc{9}{c}{tablename thetable -- emph{Continued from previous page}} \
midrule
aaaaaaaaaaaaaaaaaaaaaaaa & mc{2}{c}{bbb--ccc} & ddd & eee & fff & ggg & hhh & iii \
midrule
endhead

midrule
mc{9}{r}{emph{Continued on next page}} \
endfoot

bottomrule
endlastfoot

%% body of table

aaaaaaaaaaaaaaaaaaaaaaaa & mc{2}{c}{bbb--ccc} & ddd & eee & fff & ggg & hhh & iii \
aaaaaaaaaaaaaaaaaaaaaaaa & bbb & ccc & ddd & eee & fff & ggg & hhh & iii \
aaaaaaaaaaaaaaaaaaaaaaaa & bbb & ccc & ddd & eee & fff & ggg & hhh & iii \
aaaaaaaaaaaaaaaaaaaaaaaa & bbb & ccc & ddd & eee & fff & ggg & hhh & iii \

end{xlongtable}

end{document}


enter image description here



I removed the conditional redefinition of mc: if the command is defined, it would be a mistake to redefine it without knowing where it comes from.



Setting LTleft and LTright requires a hack. Be aware that such tricks can be worthy a rejection, as they change the shape of documents from what revtex people expect.



documentclass[a4paper,preprint,aps,unsortedaddress]{revtex4-2}

usepackage{longtable,array,booktabs}
usepackage{showframe}

newcommand{mc}{multicolumn}

makeatletter
newenvironment{xlongtable}[1]
{appdeftable@hook{#1}longtable}
{endlongtable}
newcommandtobirgobblefour[4]{}
makeatother

begin{document}

begin{xlongtable}{%
scriptsize % this table is in script size
setlength{LTleft}{-3cm plus 1fill}% move to left
tobirgobblefour % remove the setting of LTleft and LTright
}{
l r @{--} p{1.3cm} >{centering}p{2.6cm}
*{4}{p{1.25cm}} p{2.1cm}
}
%% headers and footers

caption{Table} \
toprule
endfirsthead

mc{9}{c}{tablename thetable -- emph{Continued from previous page}} \
midrule
aaaaaaaaaaaaaaaaaaaaaaaa & mc{2}{c}{bbb--ccc} & ddd & eee & fff & ggg & hhh & iii \
midrule
endhead

midrule
mc{9}{r}{emph{Continued on next page}} \
endfoot

bottomrule
endlastfoot

%% body of table
aaaaaaaaaaaaaaaaaaaaaaaa & mc{2}{c}{bbb--ccc} & ddd & eee & fff & ggg & hhh & iii \
aaaaaaaaaaaaaaaaaaaaaaaa & bbb & ccc & ddd & eee & fff & ggg & hhh & iii \
aaaaaaaaaaaaaaaaaaaaaaaa & bbb & ccc & ddd & eee & fff & ggg & hhh & iii \
aaaaaaaaaaaaaaaaaaaaaaaa & bbb & ccc & ddd & eee & fff & ggg & hhh & iii \

end{xlongtable}

end{document}


Here I used showframe just to make the page boundaries clear.



enter image description here







share|improve this answer














share|improve this answer



share|improve this answer








edited Feb 13 at 9:38

























answered Feb 13 at 0:02









egregegreg

721k8719093209




721k8719093209













  • Thank you for your answer. However, I still have a problem with shifting the table to the left with -3.0 cm. Could you please help me how to perform it?

    – TobiR
    Feb 13 at 7:05








  • 1





    @TobiR I provided it. However, you shouldn't be doing such tricks, as your paper might be rejected. If it is not for a submission to PhysRev (or associated journal), then don't use revtex4 to begin with.

    – egreg
    Feb 13 at 9:39



















  • Thank you for your answer. However, I still have a problem with shifting the table to the left with -3.0 cm. Could you please help me how to perform it?

    – TobiR
    Feb 13 at 7:05








  • 1





    @TobiR I provided it. However, you shouldn't be doing such tricks, as your paper might be rejected. If it is not for a submission to PhysRev (or associated journal), then don't use revtex4 to begin with.

    – egreg
    Feb 13 at 9:39

















Thank you for your answer. However, I still have a problem with shifting the table to the left with -3.0 cm. Could you please help me how to perform it?

– TobiR
Feb 13 at 7:05







Thank you for your answer. However, I still have a problem with shifting the table to the left with -3.0 cm. Could you please help me how to perform it?

– TobiR
Feb 13 at 7:05






1




1





@TobiR I provided it. However, you shouldn't be doing such tricks, as your paper might be rejected. If it is not for a submission to PhysRev (or associated journal), then don't use revtex4 to begin with.

– egreg
Feb 13 at 9:39





@TobiR I provided it. However, you shouldn't be doing such tricks, as your paper might be rejected. If it is not for a submission to PhysRev (or associated journal), then don't use revtex4 to begin with.

– egreg
Feb 13 at 9: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.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f474574%2fuse-scriptsize-and-shift-a-longtable-to-the-left-with-revtex4%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

Biblatex bibliography style without URLs when DOI exists (in Overleaf with Zotero bibliography)

ComboBox Display Member on multiple fields

Is it possible to collect Nectar points via Trainline?