Numbering in CellsInclined line between two cells in a table'Internal borders' in table...
On what did Lego base the appearance of the new Hogwarts minifigs?
Do authors have to be politically correct in article-writing?
How should I state my MS degree in my CV when it was in practice a joint-program?
Eww, those bytes are gross
Why didn't Eru and/or the Valar intervene when Sauron corrupted Númenor?
Why do neural networks need so many training examples to perform?
Why is this code uniquely decodable?
Wanted: 5.25 floppy to usb adapter
Could quantum mechanics be necessary to analyze some biology scenarios?
How can I improve my fireworks photography?
ip vs ifconfig commands pros and cons
A Wacky, Wacky Chessboard (That Makes No Sense)
Why zero tolerance on nudity in space?
Is it a fallacy if someone claims they need an explanation for every word of your argument to the point where they don't understand common terms?
What does a violin mute do?
Meaning of すきっとした
How do Japanese speakers determine the implied topic when none has been mentioned?
Word to be used for "standing with your toes pointing out"
Why is working on the same position for more than 15 years not a red flag?
How to acknowledge an embarrassing job interview, now that I work directly with the interviewer?
LTSpice: When running a linear AC simulation, how to view the voltage ratio between two voltages?
What's the purpose of these copper coils with resitors inside them in A Yamaha RX-V396RDS amplifier?
Walking in a rotating spacecraft and Newton's 3rd Law of Motion
Does Windows 10's telemetry include sending *.doc files if Word crashed?
Numbering in Cells
Inclined line between two cells in a table'Internal borders' in table cellspgfplotstabletypeset merged cells in middle of tableTabular cells with exact same width and multicolumnProblem with vertical alignment of cells in tabular environmentLine between cellsProblem with aligning table cells correctlyIs it possible to enumerate cells in a table?Merging cells across columns in a tableExcel2Latex column alignment
I want to number my cells in a Table in LaTeX. The result should look like this.
Does somebody know to to do this?
tables formatting
New contributor
add a comment |
I want to number my cells in a Table in LaTeX. The result should look like this.
Does somebody know to to do this?
tables formatting
New contributor
1
Welcome to TeX.SX! Check this for future questions: tex.meta.stackexchange.com/q/228/120578
– koleygr
13 hours ago
3
Welcome to TeX.SE. Please provide more information about your document setup and about the specific formatting objective. E.g,, are you planning on using atabular
or similar environment? And, will the cell contents always consist of a single, centered uppercase letter and a four-digit number placed in the upper-right hand corner of the cell? If not, what might cells look like in general?
– Mico
13 hours ago
add a comment |
I want to number my cells in a Table in LaTeX. The result should look like this.
Does somebody know to to do this?
tables formatting
New contributor
I want to number my cells in a Table in LaTeX. The result should look like this.
Does somebody know to to do this?
tables formatting
tables formatting
New contributor
New contributor
New contributor
asked 13 hours ago
SituSitu
72
72
New contributor
New contributor
1
Welcome to TeX.SX! Check this for future questions: tex.meta.stackexchange.com/q/228/120578
– koleygr
13 hours ago
3
Welcome to TeX.SE. Please provide more information about your document setup and about the specific formatting objective. E.g,, are you planning on using atabular
or similar environment? And, will the cell contents always consist of a single, centered uppercase letter and a four-digit number placed in the upper-right hand corner of the cell? If not, what might cells look like in general?
– Mico
13 hours ago
add a comment |
1
Welcome to TeX.SX! Check this for future questions: tex.meta.stackexchange.com/q/228/120578
– koleygr
13 hours ago
3
Welcome to TeX.SE. Please provide more information about your document setup and about the specific formatting objective. E.g,, are you planning on using atabular
or similar environment? And, will the cell contents always consist of a single, centered uppercase letter and a four-digit number placed in the upper-right hand corner of the cell? If not, what might cells look like in general?
– Mico
13 hours ago
1
1
Welcome to TeX.SX! Check this for future questions: tex.meta.stackexchange.com/q/228/120578
– koleygr
13 hours ago
Welcome to TeX.SX! Check this for future questions: tex.meta.stackexchange.com/q/228/120578
– koleygr
13 hours ago
3
3
Welcome to TeX.SE. Please provide more information about your document setup and about the specific formatting objective. E.g,, are you planning on using a
tabular
or similar environment? And, will the cell contents always consist of a single, centered uppercase letter and a four-digit number placed in the upper-right hand corner of the cell? If not, what might cells look like in general?– Mico
13 hours ago
Welcome to TeX.SE. Please provide more information about your document setup and about the specific formatting objective. E.g,, are you planning on using a
tabular
or similar environment? And, will the cell contents always consist of a single, centered uppercase letter and a four-digit number placed in the upper-right hand corner of the cell? If not, what might cells look like in general?– Mico
13 hours ago
add a comment |
2 Answers
2
active
oldest
votes
I defined a new environment, with one argument, the number of columns, which numbers automatically its cells:
documentclass[12pt,a4paper]{report}
usepackage{array, siunitx, makebox}
newcounter{cellctr}
newenvironment{countcells}[1]{setcounter{cellctr}{0}setlength{extrarowheight}{4pt}tabular{|*{#1}{c<{enspace stepcounter{cellctr}raisebox{1.5ex}{scriptsizemakebox*{scriptsize000}[l]{num[minimum-integer-digits=4]{thecellctr}}}}|}}}%
{endtabularsetcounter{cellctr}{0}}
begin{document}
begin{countcells}{4}hline%
A & B & C & D \ hline
E & F & G & H \ hline
makebox*{H}{I} & J & K & L \ hline
end{countcells}
end{document}
@CarlaTeX: You're right, I hadn't noticed it.That's due to the letterI
being less wide than the others. I've edited a work-around withmakebox*
. Thanks for drawing my attention to this problem!
– Bernard
10 hours ago
1
Thanks for correcting, +1!
– CarLaTeX
10 hours ago
add a comment |
You could define a command with a tabular
environment yo use it inside your tabular:
documentclass[12pt,a4paper]{report}
newcommand{mycell}[2]{begin{tabular}{@{}c@{}c@{}}&tiny #2\Large #1&end{tabular}}
begin{document}
begin{tabular}{|c|c|c|c|}hline
mycell{A}{0001}& mycell{B}{0002} & mycell{C}{0003}& mycell{D}{0004}\hline
end{tabular}
end{document}
By using tikz package you may do something like this:
documentclass[12pt,a4paper]{report}
usepackage{tikz}
makeatletter
defmyFontSize{f@size pt}
makeatother
defBoxFactor{2.5}
deffsize{myFontSize}
newcommand{mycontent}[2]{begin{tabular}{@{}c@{}c@{}}&tiny #2\Large #1&end{tabular}}
newcommand{mycell}[3][black,1]{%
foreach item[count=i from 1] in {#1}{ifnumi=1xdefmycolor{item}elsexdefNoFLine{item}fi}
begin{tikzpicture}[inner sep=0pt,outer sep=0pt]
draw[-,thick,color={mycolor}](0,0) --({fsize*BoxFactor},0)--({fsize*BoxFactor},{fsize*BoxFactor} )--(0,{fsize*BoxFactor}) coordinate (A);
ifnumNoFLine=1
relax
else
draw[-,thick,color={mycolor}](A)--(0,0);
fi
node at ({fsize*BoxFactor/2},{fsize*BoxFactor/2}) {mycontent{#2}{#3}};
end{tikzpicture}
}
begin{document}
noindent(mycell[blue,0]{A}{0001}!mycell{B}{0002}mycell{C}{0003}mycell{D}{0004})
end{document}
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "85"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Situ is a new contributor. Be nice, and check out our Code of Conduct.
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%2f477554%2fnumbering-in-cells%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
I defined a new environment, with one argument, the number of columns, which numbers automatically its cells:
documentclass[12pt,a4paper]{report}
usepackage{array, siunitx, makebox}
newcounter{cellctr}
newenvironment{countcells}[1]{setcounter{cellctr}{0}setlength{extrarowheight}{4pt}tabular{|*{#1}{c<{enspace stepcounter{cellctr}raisebox{1.5ex}{scriptsizemakebox*{scriptsize000}[l]{num[minimum-integer-digits=4]{thecellctr}}}}|}}}%
{endtabularsetcounter{cellctr}{0}}
begin{document}
begin{countcells}{4}hline%
A & B & C & D \ hline
E & F & G & H \ hline
makebox*{H}{I} & J & K & L \ hline
end{countcells}
end{document}
@CarlaTeX: You're right, I hadn't noticed it.That's due to the letterI
being less wide than the others. I've edited a work-around withmakebox*
. Thanks for drawing my attention to this problem!
– Bernard
10 hours ago
1
Thanks for correcting, +1!
– CarLaTeX
10 hours ago
add a comment |
I defined a new environment, with one argument, the number of columns, which numbers automatically its cells:
documentclass[12pt,a4paper]{report}
usepackage{array, siunitx, makebox}
newcounter{cellctr}
newenvironment{countcells}[1]{setcounter{cellctr}{0}setlength{extrarowheight}{4pt}tabular{|*{#1}{c<{enspace stepcounter{cellctr}raisebox{1.5ex}{scriptsizemakebox*{scriptsize000}[l]{num[minimum-integer-digits=4]{thecellctr}}}}|}}}%
{endtabularsetcounter{cellctr}{0}}
begin{document}
begin{countcells}{4}hline%
A & B & C & D \ hline
E & F & G & H \ hline
makebox*{H}{I} & J & K & L \ hline
end{countcells}
end{document}
@CarlaTeX: You're right, I hadn't noticed it.That's due to the letterI
being less wide than the others. I've edited a work-around withmakebox*
. Thanks for drawing my attention to this problem!
– Bernard
10 hours ago
1
Thanks for correcting, +1!
– CarLaTeX
10 hours ago
add a comment |
I defined a new environment, with one argument, the number of columns, which numbers automatically its cells:
documentclass[12pt,a4paper]{report}
usepackage{array, siunitx, makebox}
newcounter{cellctr}
newenvironment{countcells}[1]{setcounter{cellctr}{0}setlength{extrarowheight}{4pt}tabular{|*{#1}{c<{enspace stepcounter{cellctr}raisebox{1.5ex}{scriptsizemakebox*{scriptsize000}[l]{num[minimum-integer-digits=4]{thecellctr}}}}|}}}%
{endtabularsetcounter{cellctr}{0}}
begin{document}
begin{countcells}{4}hline%
A & B & C & D \ hline
E & F & G & H \ hline
makebox*{H}{I} & J & K & L \ hline
end{countcells}
end{document}
I defined a new environment, with one argument, the number of columns, which numbers automatically its cells:
documentclass[12pt,a4paper]{report}
usepackage{array, siunitx, makebox}
newcounter{cellctr}
newenvironment{countcells}[1]{setcounter{cellctr}{0}setlength{extrarowheight}{4pt}tabular{|*{#1}{c<{enspace stepcounter{cellctr}raisebox{1.5ex}{scriptsizemakebox*{scriptsize000}[l]{num[minimum-integer-digits=4]{thecellctr}}}}|}}}%
{endtabularsetcounter{cellctr}{0}}
begin{document}
begin{countcells}{4}hline%
A & B & C & D \ hline
E & F & G & H \ hline
makebox*{H}{I} & J & K & L \ hline
end{countcells}
end{document}
edited 10 hours ago
answered 10 hours ago
BernardBernard
172k775203
172k775203
@CarlaTeX: You're right, I hadn't noticed it.That's due to the letterI
being less wide than the others. I've edited a work-around withmakebox*
. Thanks for drawing my attention to this problem!
– Bernard
10 hours ago
1
Thanks for correcting, +1!
– CarLaTeX
10 hours ago
add a comment |
@CarlaTeX: You're right, I hadn't noticed it.That's due to the letterI
being less wide than the others. I've edited a work-around withmakebox*
. Thanks for drawing my attention to this problem!
– Bernard
10 hours ago
1
Thanks for correcting, +1!
– CarLaTeX
10 hours ago
@CarlaTeX: You're right, I hadn't noticed it.That's due to the letter
I
being less wide than the others. I've edited a work-around with makebox*
. Thanks for drawing my attention to this problem!– Bernard
10 hours ago
@CarlaTeX: You're right, I hadn't noticed it.That's due to the letter
I
being less wide than the others. I've edited a work-around with makebox*
. Thanks for drawing my attention to this problem!– Bernard
10 hours ago
1
1
Thanks for correcting, +1!
– CarLaTeX
10 hours ago
Thanks for correcting, +1!
– CarLaTeX
10 hours ago
add a comment |
You could define a command with a tabular
environment yo use it inside your tabular:
documentclass[12pt,a4paper]{report}
newcommand{mycell}[2]{begin{tabular}{@{}c@{}c@{}}&tiny #2\Large #1&end{tabular}}
begin{document}
begin{tabular}{|c|c|c|c|}hline
mycell{A}{0001}& mycell{B}{0002} & mycell{C}{0003}& mycell{D}{0004}\hline
end{tabular}
end{document}
By using tikz package you may do something like this:
documentclass[12pt,a4paper]{report}
usepackage{tikz}
makeatletter
defmyFontSize{f@size pt}
makeatother
defBoxFactor{2.5}
deffsize{myFontSize}
newcommand{mycontent}[2]{begin{tabular}{@{}c@{}c@{}}&tiny #2\Large #1&end{tabular}}
newcommand{mycell}[3][black,1]{%
foreach item[count=i from 1] in {#1}{ifnumi=1xdefmycolor{item}elsexdefNoFLine{item}fi}
begin{tikzpicture}[inner sep=0pt,outer sep=0pt]
draw[-,thick,color={mycolor}](0,0) --({fsize*BoxFactor},0)--({fsize*BoxFactor},{fsize*BoxFactor} )--(0,{fsize*BoxFactor}) coordinate (A);
ifnumNoFLine=1
relax
else
draw[-,thick,color={mycolor}](A)--(0,0);
fi
node at ({fsize*BoxFactor/2},{fsize*BoxFactor/2}) {mycontent{#2}{#3}};
end{tikzpicture}
}
begin{document}
noindent(mycell[blue,0]{A}{0001}!mycell{B}{0002}mycell{C}{0003}mycell{D}{0004})
end{document}
add a comment |
You could define a command with a tabular
environment yo use it inside your tabular:
documentclass[12pt,a4paper]{report}
newcommand{mycell}[2]{begin{tabular}{@{}c@{}c@{}}&tiny #2\Large #1&end{tabular}}
begin{document}
begin{tabular}{|c|c|c|c|}hline
mycell{A}{0001}& mycell{B}{0002} & mycell{C}{0003}& mycell{D}{0004}\hline
end{tabular}
end{document}
By using tikz package you may do something like this:
documentclass[12pt,a4paper]{report}
usepackage{tikz}
makeatletter
defmyFontSize{f@size pt}
makeatother
defBoxFactor{2.5}
deffsize{myFontSize}
newcommand{mycontent}[2]{begin{tabular}{@{}c@{}c@{}}&tiny #2\Large #1&end{tabular}}
newcommand{mycell}[3][black,1]{%
foreach item[count=i from 1] in {#1}{ifnumi=1xdefmycolor{item}elsexdefNoFLine{item}fi}
begin{tikzpicture}[inner sep=0pt,outer sep=0pt]
draw[-,thick,color={mycolor}](0,0) --({fsize*BoxFactor},0)--({fsize*BoxFactor},{fsize*BoxFactor} )--(0,{fsize*BoxFactor}) coordinate (A);
ifnumNoFLine=1
relax
else
draw[-,thick,color={mycolor}](A)--(0,0);
fi
node at ({fsize*BoxFactor/2},{fsize*BoxFactor/2}) {mycontent{#2}{#3}};
end{tikzpicture}
}
begin{document}
noindent(mycell[blue,0]{A}{0001}!mycell{B}{0002}mycell{C}{0003}mycell{D}{0004})
end{document}
add a comment |
You could define a command with a tabular
environment yo use it inside your tabular:
documentclass[12pt,a4paper]{report}
newcommand{mycell}[2]{begin{tabular}{@{}c@{}c@{}}&tiny #2\Large #1&end{tabular}}
begin{document}
begin{tabular}{|c|c|c|c|}hline
mycell{A}{0001}& mycell{B}{0002} & mycell{C}{0003}& mycell{D}{0004}\hline
end{tabular}
end{document}
By using tikz package you may do something like this:
documentclass[12pt,a4paper]{report}
usepackage{tikz}
makeatletter
defmyFontSize{f@size pt}
makeatother
defBoxFactor{2.5}
deffsize{myFontSize}
newcommand{mycontent}[2]{begin{tabular}{@{}c@{}c@{}}&tiny #2\Large #1&end{tabular}}
newcommand{mycell}[3][black,1]{%
foreach item[count=i from 1] in {#1}{ifnumi=1xdefmycolor{item}elsexdefNoFLine{item}fi}
begin{tikzpicture}[inner sep=0pt,outer sep=0pt]
draw[-,thick,color={mycolor}](0,0) --({fsize*BoxFactor},0)--({fsize*BoxFactor},{fsize*BoxFactor} )--(0,{fsize*BoxFactor}) coordinate (A);
ifnumNoFLine=1
relax
else
draw[-,thick,color={mycolor}](A)--(0,0);
fi
node at ({fsize*BoxFactor/2},{fsize*BoxFactor/2}) {mycontent{#2}{#3}};
end{tikzpicture}
}
begin{document}
noindent(mycell[blue,0]{A}{0001}!mycell{B}{0002}mycell{C}{0003}mycell{D}{0004})
end{document}
You could define a command with a tabular
environment yo use it inside your tabular:
documentclass[12pt,a4paper]{report}
newcommand{mycell}[2]{begin{tabular}{@{}c@{}c@{}}&tiny #2\Large #1&end{tabular}}
begin{document}
begin{tabular}{|c|c|c|c|}hline
mycell{A}{0001}& mycell{B}{0002} & mycell{C}{0003}& mycell{D}{0004}\hline
end{tabular}
end{document}
By using tikz package you may do something like this:
documentclass[12pt,a4paper]{report}
usepackage{tikz}
makeatletter
defmyFontSize{f@size pt}
makeatother
defBoxFactor{2.5}
deffsize{myFontSize}
newcommand{mycontent}[2]{begin{tabular}{@{}c@{}c@{}}&tiny #2\Large #1&end{tabular}}
newcommand{mycell}[3][black,1]{%
foreach item[count=i from 1] in {#1}{ifnumi=1xdefmycolor{item}elsexdefNoFLine{item}fi}
begin{tikzpicture}[inner sep=0pt,outer sep=0pt]
draw[-,thick,color={mycolor}](0,0) --({fsize*BoxFactor},0)--({fsize*BoxFactor},{fsize*BoxFactor} )--(0,{fsize*BoxFactor}) coordinate (A);
ifnumNoFLine=1
relax
else
draw[-,thick,color={mycolor}](A)--(0,0);
fi
node at ({fsize*BoxFactor/2},{fsize*BoxFactor/2}) {mycontent{#2}{#3}};
end{tikzpicture}
}
begin{document}
noindent(mycell[blue,0]{A}{0001}!mycell{B}{0002}mycell{C}{0003}mycell{D}{0004})
end{document}
edited 12 hours ago
answered 13 hours ago
koleygrkoleygr
11.6k11038
11.6k11038
add a comment |
add a comment |
Situ is a new contributor. Be nice, and check out our Code of Conduct.
Situ is a new contributor. Be nice, and check out our Code of Conduct.
Situ is a new contributor. Be nice, and check out our Code of Conduct.
Situ is a new contributor. Be nice, and check out our Code of Conduct.
Thanks for contributing an answer to TeX - LaTeX Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f477554%2fnumbering-in-cells%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
1
Welcome to TeX.SX! Check this for future questions: tex.meta.stackexchange.com/q/228/120578
– koleygr
13 hours ago
3
Welcome to TeX.SE. Please provide more information about your document setup and about the specific formatting objective. E.g,, are you planning on using a
tabular
or similar environment? And, will the cell contents always consist of a single, centered uppercase letter and a four-digit number placed in the upper-right hand corner of the cell? If not, what might cells look like in general?– Mico
13 hours ago