An extra row in the table generated by whileboolexpr command
up vote
3
down vote
favorite
I used whileboolexpr
command from etoolbox
package to generate a table. But there was an extra unwanted row. What is the problem with the following code?
documentclass[12pt]{article}
usepackage{etoolbox}
begin{document}
newcounter{row}
newcounter{rowcount}
newcommand{myand}{&}
newcommand{mylines}{%
setcounter{rowcount}{0}%
whileboolexpr{
test{ifnumless{value{rowcount}}{value{row}}}
}{%
stepcounter{rowcount}%
Number myand 1 myand 2 myand 3 \ hline
}%
}
newcommand{mytable}[1]{
setcounter{row}{#1}%
begin{tabular}{|c|*{3}{c|}}
hline
mylines
end{tabular}%
}
mytable{4}
end{document}
tables etoolbox
add a comment |
up vote
3
down vote
favorite
I used whileboolexpr
command from etoolbox
package to generate a table. But there was an extra unwanted row. What is the problem with the following code?
documentclass[12pt]{article}
usepackage{etoolbox}
begin{document}
newcounter{row}
newcounter{rowcount}
newcommand{myand}{&}
newcommand{mylines}{%
setcounter{rowcount}{0}%
whileboolexpr{
test{ifnumless{value{rowcount}}{value{row}}}
}{%
stepcounter{rowcount}%
Number myand 1 myand 2 myand 3 \ hline
}%
}
newcommand{mytable}[1]{
setcounter{row}{#1}%
begin{tabular}{|c|*{3}{c|}}
hline
mylines
end{tabular}%
}
mytable{4}
end{document}
tables etoolbox
2
LaTeX has already started a new cell when it realizes the loop should end.
– egreg
Nov 19 at 10:12
add a comment |
up vote
3
down vote
favorite
up vote
3
down vote
favorite
I used whileboolexpr
command from etoolbox
package to generate a table. But there was an extra unwanted row. What is the problem with the following code?
documentclass[12pt]{article}
usepackage{etoolbox}
begin{document}
newcounter{row}
newcounter{rowcount}
newcommand{myand}{&}
newcommand{mylines}{%
setcounter{rowcount}{0}%
whileboolexpr{
test{ifnumless{value{rowcount}}{value{row}}}
}{%
stepcounter{rowcount}%
Number myand 1 myand 2 myand 3 \ hline
}%
}
newcommand{mytable}[1]{
setcounter{row}{#1}%
begin{tabular}{|c|*{3}{c|}}
hline
mylines
end{tabular}%
}
mytable{4}
end{document}
tables etoolbox
I used whileboolexpr
command from etoolbox
package to generate a table. But there was an extra unwanted row. What is the problem with the following code?
documentclass[12pt]{article}
usepackage{etoolbox}
begin{document}
newcounter{row}
newcounter{rowcount}
newcommand{myand}{&}
newcommand{mylines}{%
setcounter{rowcount}{0}%
whileboolexpr{
test{ifnumless{value{rowcount}}{value{row}}}
}{%
stepcounter{rowcount}%
Number myand 1 myand 2 myand 3 \ hline
}%
}
newcommand{mytable}[1]{
setcounter{row}{#1}%
begin{tabular}{|c|*{3}{c|}}
hline
mylines
end{tabular}%
}
mytable{4}
end{document}
tables etoolbox
tables etoolbox
asked Nov 19 at 9:45
Z.H.
1,7411326
1,7411326
2
LaTeX has already started a new cell when it realizes the loop should end.
– egreg
Nov 19 at 10:12
add a comment |
2
LaTeX has already started a new cell when it realizes the loop should end.
– egreg
Nov 19 at 10:12
2
2
LaTeX has already started a new cell when it realizes the loop should end.
– egreg
Nov 19 at 10:12
LaTeX has already started a new cell when it realizes the loop should end.
– egreg
Nov 19 at 10:12
add a comment |
3 Answers
3
active
oldest
votes
up vote
2
down vote
accepted
As egreg says, LaTeX starts the next cell before it realises that the table has finished. I realise that your real application is more complex, but a really efficient way to implement your MWE is using prg_replicate:nn
from LaTeX3 to produce:
Here's the code:
documentclass{article}
usepackage{expl3}
ExplSyntaxOn
newcommandmytable[1]{%
begin{tabular}{|c|*{3}{c|}}hline
prg_replicate:nn {#1} {Number &1&2&3\hline}
end{tabular}%
}
ExplSyntaxOff
begin{document}
mytable{4}
end{document}
Edit
Given the comment below, here is a more general approach that might be closer to what is required. It produces
from the input
mytable{
{one &1&2&3},
{two &4&6},
{three&1},
{four &1&2&2}
}
where one
, two
, ... are some random macros.
The mytable
macro accepts a comma separated list of table-rows. By default the table has four columns but this can be changes with an optional argument so that, for example, mytable[6]{...}
gives a table with 6 columns. There is an obvious issue here with "dangling hlines
. This is easy enough to fix but as the OP does not gives details as to what is actually required there is little doing this without more information. For the reasons explained in the booktabs manual I'd drop the vertical rules and use toprule
and bottomrule
for the top and bottom rules, this would fix this problem and produce:
Here's the code:
documentclass{article}
usepackage{expl3}
usepackage{booktabs}
ExplSyntaxOn
clist_new:N l_table_clist
newcommandmytable[2][4]{
clist_set:Nn l_table_clist {#2}
begin{tabular}{*{#1}{c}}toprule
clist_use:Nn l_table_clist {\hline}
\bottomrule
end{tabular}%
}
ExplSyntaxOff
begin{document}
newcommandone{One}
newcommandtwo{Two}
newcommandthree{Three}
newcommandfour{Four}
mytable{
{one&1&2&3},
{two& 4&6},
{three& 1},
{four&1&2&2}
}
end{document}
Yes, my real application is more complex: number of columns is not fixed, and all cells are generated by commands, and every row is different. So I could not accept your answer.
– Z.H.
Nov 19 at 10:44
@Z.H. Without knowing what you want to do it is hard to suggest what you should do except provide a better MWE. I suspect that there are better tools that you could use. Above I have given another approach. You might also find posts like tex.stackexchange.com/questions/367979 helpful
– Andrew
Nov 19 at 19:30
add a comment |
up vote
3
down vote
My weekly (some say daily) xintFor
exercise.
documentclass[12pt]{article}
usepackage{xinttools}
newcommand{mytable}[1]{
begin{tabular}{|c|*{3}{c|}}
hline
xintFor* ##1 in {xintSeq{1}{#1}}:
{%
Number & 1 & 2 & 3 \ hline
}%
end{tabular}%
}
begin{document}
mytable{4}
end{document}
The idea here is that each row may be entirely decided by the value of##1
which will be1
, then2
, then
– jfbu
Nov 19 at 22:12
add a comment |
up vote
1
down vote
You can generate the row code outside of the tabular
:
documentclass{article}
usepackage{etoolbox}
begin{document}
newcounter{row}
newcommand{myand}{&}
makeatletter
newcommand{mylines}[1]{%
setcounter{row}{#1}%
def@mylines{}%
whileboolexpr{%
test{ifnumless{0}{value{row}}}%
}{%
addtocounter{row}{-1}%
xdef@mylines{@mylines hline
Number myand 1 myand 2 myand 3 \
}%
}%
}
newcommand{mytable}[1]{%
{lethlinerelax % Avoid expansion of hline in xdef
let\relax % Avoid expansion of \ in xdef
mylines{#1}}% This generates @mylines
begin{tabular}{ | c | *{3}{c|} }
@mylines hline % Print @mylines
end{tabular}%
}
makeatother
mytable{4}
end{document}
add a comment |
3 Answers
3
active
oldest
votes
3 Answers
3
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
2
down vote
accepted
As egreg says, LaTeX starts the next cell before it realises that the table has finished. I realise that your real application is more complex, but a really efficient way to implement your MWE is using prg_replicate:nn
from LaTeX3 to produce:
Here's the code:
documentclass{article}
usepackage{expl3}
ExplSyntaxOn
newcommandmytable[1]{%
begin{tabular}{|c|*{3}{c|}}hline
prg_replicate:nn {#1} {Number &1&2&3\hline}
end{tabular}%
}
ExplSyntaxOff
begin{document}
mytable{4}
end{document}
Edit
Given the comment below, here is a more general approach that might be closer to what is required. It produces
from the input
mytable{
{one &1&2&3},
{two &4&6},
{three&1},
{four &1&2&2}
}
where one
, two
, ... are some random macros.
The mytable
macro accepts a comma separated list of table-rows. By default the table has four columns but this can be changes with an optional argument so that, for example, mytable[6]{...}
gives a table with 6 columns. There is an obvious issue here with "dangling hlines
. This is easy enough to fix but as the OP does not gives details as to what is actually required there is little doing this without more information. For the reasons explained in the booktabs manual I'd drop the vertical rules and use toprule
and bottomrule
for the top and bottom rules, this would fix this problem and produce:
Here's the code:
documentclass{article}
usepackage{expl3}
usepackage{booktabs}
ExplSyntaxOn
clist_new:N l_table_clist
newcommandmytable[2][4]{
clist_set:Nn l_table_clist {#2}
begin{tabular}{*{#1}{c}}toprule
clist_use:Nn l_table_clist {\hline}
\bottomrule
end{tabular}%
}
ExplSyntaxOff
begin{document}
newcommandone{One}
newcommandtwo{Two}
newcommandthree{Three}
newcommandfour{Four}
mytable{
{one&1&2&3},
{two& 4&6},
{three& 1},
{four&1&2&2}
}
end{document}
Yes, my real application is more complex: number of columns is not fixed, and all cells are generated by commands, and every row is different. So I could not accept your answer.
– Z.H.
Nov 19 at 10:44
@Z.H. Without knowing what you want to do it is hard to suggest what you should do except provide a better MWE. I suspect that there are better tools that you could use. Above I have given another approach. You might also find posts like tex.stackexchange.com/questions/367979 helpful
– Andrew
Nov 19 at 19:30
add a comment |
up vote
2
down vote
accepted
As egreg says, LaTeX starts the next cell before it realises that the table has finished. I realise that your real application is more complex, but a really efficient way to implement your MWE is using prg_replicate:nn
from LaTeX3 to produce:
Here's the code:
documentclass{article}
usepackage{expl3}
ExplSyntaxOn
newcommandmytable[1]{%
begin{tabular}{|c|*{3}{c|}}hline
prg_replicate:nn {#1} {Number &1&2&3\hline}
end{tabular}%
}
ExplSyntaxOff
begin{document}
mytable{4}
end{document}
Edit
Given the comment below, here is a more general approach that might be closer to what is required. It produces
from the input
mytable{
{one &1&2&3},
{two &4&6},
{three&1},
{four &1&2&2}
}
where one
, two
, ... are some random macros.
The mytable
macro accepts a comma separated list of table-rows. By default the table has four columns but this can be changes with an optional argument so that, for example, mytable[6]{...}
gives a table with 6 columns. There is an obvious issue here with "dangling hlines
. This is easy enough to fix but as the OP does not gives details as to what is actually required there is little doing this without more information. For the reasons explained in the booktabs manual I'd drop the vertical rules and use toprule
and bottomrule
for the top and bottom rules, this would fix this problem and produce:
Here's the code:
documentclass{article}
usepackage{expl3}
usepackage{booktabs}
ExplSyntaxOn
clist_new:N l_table_clist
newcommandmytable[2][4]{
clist_set:Nn l_table_clist {#2}
begin{tabular}{*{#1}{c}}toprule
clist_use:Nn l_table_clist {\hline}
\bottomrule
end{tabular}%
}
ExplSyntaxOff
begin{document}
newcommandone{One}
newcommandtwo{Two}
newcommandthree{Three}
newcommandfour{Four}
mytable{
{one&1&2&3},
{two& 4&6},
{three& 1},
{four&1&2&2}
}
end{document}
Yes, my real application is more complex: number of columns is not fixed, and all cells are generated by commands, and every row is different. So I could not accept your answer.
– Z.H.
Nov 19 at 10:44
@Z.H. Without knowing what you want to do it is hard to suggest what you should do except provide a better MWE. I suspect that there are better tools that you could use. Above I have given another approach. You might also find posts like tex.stackexchange.com/questions/367979 helpful
– Andrew
Nov 19 at 19:30
add a comment |
up vote
2
down vote
accepted
up vote
2
down vote
accepted
As egreg says, LaTeX starts the next cell before it realises that the table has finished. I realise that your real application is more complex, but a really efficient way to implement your MWE is using prg_replicate:nn
from LaTeX3 to produce:
Here's the code:
documentclass{article}
usepackage{expl3}
ExplSyntaxOn
newcommandmytable[1]{%
begin{tabular}{|c|*{3}{c|}}hline
prg_replicate:nn {#1} {Number &1&2&3\hline}
end{tabular}%
}
ExplSyntaxOff
begin{document}
mytable{4}
end{document}
Edit
Given the comment below, here is a more general approach that might be closer to what is required. It produces
from the input
mytable{
{one &1&2&3},
{two &4&6},
{three&1},
{four &1&2&2}
}
where one
, two
, ... are some random macros.
The mytable
macro accepts a comma separated list of table-rows. By default the table has four columns but this can be changes with an optional argument so that, for example, mytable[6]{...}
gives a table with 6 columns. There is an obvious issue here with "dangling hlines
. This is easy enough to fix but as the OP does not gives details as to what is actually required there is little doing this without more information. For the reasons explained in the booktabs manual I'd drop the vertical rules and use toprule
and bottomrule
for the top and bottom rules, this would fix this problem and produce:
Here's the code:
documentclass{article}
usepackage{expl3}
usepackage{booktabs}
ExplSyntaxOn
clist_new:N l_table_clist
newcommandmytable[2][4]{
clist_set:Nn l_table_clist {#2}
begin{tabular}{*{#1}{c}}toprule
clist_use:Nn l_table_clist {\hline}
\bottomrule
end{tabular}%
}
ExplSyntaxOff
begin{document}
newcommandone{One}
newcommandtwo{Two}
newcommandthree{Three}
newcommandfour{Four}
mytable{
{one&1&2&3},
{two& 4&6},
{three& 1},
{four&1&2&2}
}
end{document}
As egreg says, LaTeX starts the next cell before it realises that the table has finished. I realise that your real application is more complex, but a really efficient way to implement your MWE is using prg_replicate:nn
from LaTeX3 to produce:
Here's the code:
documentclass{article}
usepackage{expl3}
ExplSyntaxOn
newcommandmytable[1]{%
begin{tabular}{|c|*{3}{c|}}hline
prg_replicate:nn {#1} {Number &1&2&3\hline}
end{tabular}%
}
ExplSyntaxOff
begin{document}
mytable{4}
end{document}
Edit
Given the comment below, here is a more general approach that might be closer to what is required. It produces
from the input
mytable{
{one &1&2&3},
{two &4&6},
{three&1},
{four &1&2&2}
}
where one
, two
, ... are some random macros.
The mytable
macro accepts a comma separated list of table-rows. By default the table has four columns but this can be changes with an optional argument so that, for example, mytable[6]{...}
gives a table with 6 columns. There is an obvious issue here with "dangling hlines
. This is easy enough to fix but as the OP does not gives details as to what is actually required there is little doing this without more information. For the reasons explained in the booktabs manual I'd drop the vertical rules and use toprule
and bottomrule
for the top and bottom rules, this would fix this problem and produce:
Here's the code:
documentclass{article}
usepackage{expl3}
usepackage{booktabs}
ExplSyntaxOn
clist_new:N l_table_clist
newcommandmytable[2][4]{
clist_set:Nn l_table_clist {#2}
begin{tabular}{*{#1}{c}}toprule
clist_use:Nn l_table_clist {\hline}
\bottomrule
end{tabular}%
}
ExplSyntaxOff
begin{document}
newcommandone{One}
newcommandtwo{Two}
newcommandthree{Three}
newcommandfour{Four}
mytable{
{one&1&2&3},
{two& 4&6},
{three& 1},
{four&1&2&2}
}
end{document}
edited Nov 20 at 3:51
answered Nov 19 at 10:31
Andrew
29.3k34178
29.3k34178
Yes, my real application is more complex: number of columns is not fixed, and all cells are generated by commands, and every row is different. So I could not accept your answer.
– Z.H.
Nov 19 at 10:44
@Z.H. Without knowing what you want to do it is hard to suggest what you should do except provide a better MWE. I suspect that there are better tools that you could use. Above I have given another approach. You might also find posts like tex.stackexchange.com/questions/367979 helpful
– Andrew
Nov 19 at 19:30
add a comment |
Yes, my real application is more complex: number of columns is not fixed, and all cells are generated by commands, and every row is different. So I could not accept your answer.
– Z.H.
Nov 19 at 10:44
@Z.H. Without knowing what you want to do it is hard to suggest what you should do except provide a better MWE. I suspect that there are better tools that you could use. Above I have given another approach. You might also find posts like tex.stackexchange.com/questions/367979 helpful
– Andrew
Nov 19 at 19:30
Yes, my real application is more complex: number of columns is not fixed, and all cells are generated by commands, and every row is different. So I could not accept your answer.
– Z.H.
Nov 19 at 10:44
Yes, my real application is more complex: number of columns is not fixed, and all cells are generated by commands, and every row is different. So I could not accept your answer.
– Z.H.
Nov 19 at 10:44
@Z.H. Without knowing what you want to do it is hard to suggest what you should do except provide a better MWE. I suspect that there are better tools that you could use. Above I have given another approach. You might also find posts like tex.stackexchange.com/questions/367979 helpful
– Andrew
Nov 19 at 19:30
@Z.H. Without knowing what you want to do it is hard to suggest what you should do except provide a better MWE. I suspect that there are better tools that you could use. Above I have given another approach. You might also find posts like tex.stackexchange.com/questions/367979 helpful
– Andrew
Nov 19 at 19:30
add a comment |
up vote
3
down vote
My weekly (some say daily) xintFor
exercise.
documentclass[12pt]{article}
usepackage{xinttools}
newcommand{mytable}[1]{
begin{tabular}{|c|*{3}{c|}}
hline
xintFor* ##1 in {xintSeq{1}{#1}}:
{%
Number & 1 & 2 & 3 \ hline
}%
end{tabular}%
}
begin{document}
mytable{4}
end{document}
The idea here is that each row may be entirely decided by the value of##1
which will be1
, then2
, then
– jfbu
Nov 19 at 22:12
add a comment |
up vote
3
down vote
My weekly (some say daily) xintFor
exercise.
documentclass[12pt]{article}
usepackage{xinttools}
newcommand{mytable}[1]{
begin{tabular}{|c|*{3}{c|}}
hline
xintFor* ##1 in {xintSeq{1}{#1}}:
{%
Number & 1 & 2 & 3 \ hline
}%
end{tabular}%
}
begin{document}
mytable{4}
end{document}
The idea here is that each row may be entirely decided by the value of##1
which will be1
, then2
, then
– jfbu
Nov 19 at 22:12
add a comment |
up vote
3
down vote
up vote
3
down vote
My weekly (some say daily) xintFor
exercise.
documentclass[12pt]{article}
usepackage{xinttools}
newcommand{mytable}[1]{
begin{tabular}{|c|*{3}{c|}}
hline
xintFor* ##1 in {xintSeq{1}{#1}}:
{%
Number & 1 & 2 & 3 \ hline
}%
end{tabular}%
}
begin{document}
mytable{4}
end{document}
My weekly (some say daily) xintFor
exercise.
documentclass[12pt]{article}
usepackage{xinttools}
newcommand{mytable}[1]{
begin{tabular}{|c|*{3}{c|}}
hline
xintFor* ##1 in {xintSeq{1}{#1}}:
{%
Number & 1 & 2 & 3 \ hline
}%
end{tabular}%
}
begin{document}
mytable{4}
end{document}
answered Nov 19 at 21:32
jfbu
44.5k65143
44.5k65143
The idea here is that each row may be entirely decided by the value of##1
which will be1
, then2
, then
– jfbu
Nov 19 at 22:12
add a comment |
The idea here is that each row may be entirely decided by the value of##1
which will be1
, then2
, then
– jfbu
Nov 19 at 22:12
The idea here is that each row may be entirely decided by the value of
##1
which will be 1
, then 2
, then– jfbu
Nov 19 at 22:12
The idea here is that each row may be entirely decided by the value of
##1
which will be 1
, then 2
, then– jfbu
Nov 19 at 22:12
add a comment |
up vote
1
down vote
You can generate the row code outside of the tabular
:
documentclass{article}
usepackage{etoolbox}
begin{document}
newcounter{row}
newcommand{myand}{&}
makeatletter
newcommand{mylines}[1]{%
setcounter{row}{#1}%
def@mylines{}%
whileboolexpr{%
test{ifnumless{0}{value{row}}}%
}{%
addtocounter{row}{-1}%
xdef@mylines{@mylines hline
Number myand 1 myand 2 myand 3 \
}%
}%
}
newcommand{mytable}[1]{%
{lethlinerelax % Avoid expansion of hline in xdef
let\relax % Avoid expansion of \ in xdef
mylines{#1}}% This generates @mylines
begin{tabular}{ | c | *{3}{c|} }
@mylines hline % Print @mylines
end{tabular}%
}
makeatother
mytable{4}
end{document}
add a comment |
up vote
1
down vote
You can generate the row code outside of the tabular
:
documentclass{article}
usepackage{etoolbox}
begin{document}
newcounter{row}
newcommand{myand}{&}
makeatletter
newcommand{mylines}[1]{%
setcounter{row}{#1}%
def@mylines{}%
whileboolexpr{%
test{ifnumless{0}{value{row}}}%
}{%
addtocounter{row}{-1}%
xdef@mylines{@mylines hline
Number myand 1 myand 2 myand 3 \
}%
}%
}
newcommand{mytable}[1]{%
{lethlinerelax % Avoid expansion of hline in xdef
let\relax % Avoid expansion of \ in xdef
mylines{#1}}% This generates @mylines
begin{tabular}{ | c | *{3}{c|} }
@mylines hline % Print @mylines
end{tabular}%
}
makeatother
mytable{4}
end{document}
add a comment |
up vote
1
down vote
up vote
1
down vote
You can generate the row code outside of the tabular
:
documentclass{article}
usepackage{etoolbox}
begin{document}
newcounter{row}
newcommand{myand}{&}
makeatletter
newcommand{mylines}[1]{%
setcounter{row}{#1}%
def@mylines{}%
whileboolexpr{%
test{ifnumless{0}{value{row}}}%
}{%
addtocounter{row}{-1}%
xdef@mylines{@mylines hline
Number myand 1 myand 2 myand 3 \
}%
}%
}
newcommand{mytable}[1]{%
{lethlinerelax % Avoid expansion of hline in xdef
let\relax % Avoid expansion of \ in xdef
mylines{#1}}% This generates @mylines
begin{tabular}{ | c | *{3}{c|} }
@mylines hline % Print @mylines
end{tabular}%
}
makeatother
mytable{4}
end{document}
You can generate the row code outside of the tabular
:
documentclass{article}
usepackage{etoolbox}
begin{document}
newcounter{row}
newcommand{myand}{&}
makeatletter
newcommand{mylines}[1]{%
setcounter{row}{#1}%
def@mylines{}%
whileboolexpr{%
test{ifnumless{0}{value{row}}}%
}{%
addtocounter{row}{-1}%
xdef@mylines{@mylines hline
Number myand 1 myand 2 myand 3 \
}%
}%
}
newcommand{mytable}[1]{%
{lethlinerelax % Avoid expansion of hline in xdef
let\relax % Avoid expansion of \ in xdef
mylines{#1}}% This generates @mylines
begin{tabular}{ | c | *{3}{c|} }
@mylines hline % Print @mylines
end{tabular}%
}
makeatother
mytable{4}
end{document}
answered Nov 19 at 22:08
Werner
431k599501628
431k599501628
add a comment |
add a comment |
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%2f460708%2fan-extra-row-in-the-table-generated-by-whileboolexpr-command%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
2
LaTeX has already started a new cell when it realizes the loop should end.
– egreg
Nov 19 at 10:12