alignment of fixed width tabs / dnd 4e style stat blocks
up vote
1
down vote
favorite
I'm trying to replicate DND 4e style creature stat blocks. The plan is first to get something working, then to condense it into a package, then to write a small web-script to generate the latex for stat blocks.
I've been attempting to use fixed width tabular cells for alignment based on the line-width of the page, but this seems to give me some interesting output when cell color is added.
A minimal example of the problem is presented here:
There are two issues that I need to fix. The first is the spacing between each cell (both horizontal and vertical), and the second is the stubbed width of certain lines.
The complete code used to generate the stat block is here:
What seems particularly odd here is that a single cell of 0.9*linewidth is nowhere near the length of a (0.6 + 0.3)*linewidth pair. If there's any difference, one would expect it to be in the order of the tab spacing, but it's nowhere close.
Ideally, a package designed for dealing with this issue would be nice (is this an appropriate use for tabu?), but I'll be happy with any solution or suggestion that works. The plan is to hide most of the messy bits in command definitions anyway.
tables spacing color
bumped to the homepage by Community♦ 2 days ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
add a comment |
up vote
1
down vote
favorite
I'm trying to replicate DND 4e style creature stat blocks. The plan is first to get something working, then to condense it into a package, then to write a small web-script to generate the latex for stat blocks.
I've been attempting to use fixed width tabular cells for alignment based on the line-width of the page, but this seems to give me some interesting output when cell color is added.
A minimal example of the problem is presented here:
There are two issues that I need to fix. The first is the spacing between each cell (both horizontal and vertical), and the second is the stubbed width of certain lines.
The complete code used to generate the stat block is here:
What seems particularly odd here is that a single cell of 0.9*linewidth is nowhere near the length of a (0.6 + 0.3)*linewidth pair. If there's any difference, one would expect it to be in the order of the tab spacing, but it's nowhere close.
Ideally, a package designed for dealing with this issue would be nice (is this an appropriate use for tabu?), but I'll be happy with any solution or suggestion that works. The plan is to hide most of the messy bits in command definitions anyway.
tables spacing color
bumped to the homepage by Community♦ 2 days ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
Welcome to TeX.SE! Please add tex code to this page, do not force people to change the web page to get relevant code for the question ...
– Kurt
Oct 24 '17 at 19:35
add a comment |
up vote
1
down vote
favorite
up vote
1
down vote
favorite
I'm trying to replicate DND 4e style creature stat blocks. The plan is first to get something working, then to condense it into a package, then to write a small web-script to generate the latex for stat blocks.
I've been attempting to use fixed width tabular cells for alignment based on the line-width of the page, but this seems to give me some interesting output when cell color is added.
A minimal example of the problem is presented here:
There are two issues that I need to fix. The first is the spacing between each cell (both horizontal and vertical), and the second is the stubbed width of certain lines.
The complete code used to generate the stat block is here:
What seems particularly odd here is that a single cell of 0.9*linewidth is nowhere near the length of a (0.6 + 0.3)*linewidth pair. If there's any difference, one would expect it to be in the order of the tab spacing, but it's nowhere close.
Ideally, a package designed for dealing with this issue would be nice (is this an appropriate use for tabu?), but I'll be happy with any solution or suggestion that works. The plan is to hide most of the messy bits in command definitions anyway.
tables spacing color
I'm trying to replicate DND 4e style creature stat blocks. The plan is first to get something working, then to condense it into a package, then to write a small web-script to generate the latex for stat blocks.
I've been attempting to use fixed width tabular cells for alignment based on the line-width of the page, but this seems to give me some interesting output when cell color is added.
A minimal example of the problem is presented here:
There are two issues that I need to fix. The first is the spacing between each cell (both horizontal and vertical), and the second is the stubbed width of certain lines.
The complete code used to generate the stat block is here:
What seems particularly odd here is that a single cell of 0.9*linewidth is nowhere near the length of a (0.6 + 0.3)*linewidth pair. If there's any difference, one would expect it to be in the order of the tab spacing, but it's nowhere close.
Ideally, a package designed for dealing with this issue would be nice (is this an appropriate use for tabu?), but I'll be happy with any solution or suggestion that works. The plan is to hide most of the messy bits in command definitions anyway.
tables spacing color
tables spacing color
edited Oct 23 '17 at 6:44
asked Oct 23 '17 at 2:20
Partinarel
62
62
bumped to the homepage by Community♦ 2 days ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
bumped to the homepage by Community♦ 2 days ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
Welcome to TeX.SE! Please add tex code to this page, do not force people to change the web page to get relevant code for the question ...
– Kurt
Oct 24 '17 at 19:35
add a comment |
Welcome to TeX.SE! Please add tex code to this page, do not force people to change the web page to get relevant code for the question ...
– Kurt
Oct 24 '17 at 19:35
Welcome to TeX.SE! Please add tex code to this page, do not force people to change the web page to get relevant code for the question ...
– Kurt
Oct 24 '17 at 19:35
Welcome to TeX.SE! Please add tex code to this page, do not force people to change the web page to get relevant code for the question ...
– Kurt
Oct 24 '17 at 19:35
add a comment |
1 Answer
1
active
oldest
votes
up vote
0
down vote
I managed to do this in a rather hacky way by dunking individual sections of the table into colorboxes (eliminates the backing lines).
Additionally, the full width multicol instances needed to have increased length, presumably to make up for some sort of cell padding.
What I have is actually a terrible solution, which is barely made (generally) usable through ~50 lines of definitions, and still requires manual tuning of some numbers. If anyone can produce a better result, I'll mark you as the answer.
Full code given here.
One additional thing that may be required is removing paragraph spacing, ie { parskip 0pt (content) }
add a comment |
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
0
down vote
I managed to do this in a rather hacky way by dunking individual sections of the table into colorboxes (eliminates the backing lines).
Additionally, the full width multicol instances needed to have increased length, presumably to make up for some sort of cell padding.
What I have is actually a terrible solution, which is barely made (generally) usable through ~50 lines of definitions, and still requires manual tuning of some numbers. If anyone can produce a better result, I'll mark you as the answer.
Full code given here.
One additional thing that may be required is removing paragraph spacing, ie { parskip 0pt (content) }
add a comment |
up vote
0
down vote
I managed to do this in a rather hacky way by dunking individual sections of the table into colorboxes (eliminates the backing lines).
Additionally, the full width multicol instances needed to have increased length, presumably to make up for some sort of cell padding.
What I have is actually a terrible solution, which is barely made (generally) usable through ~50 lines of definitions, and still requires manual tuning of some numbers. If anyone can produce a better result, I'll mark you as the answer.
Full code given here.
One additional thing that may be required is removing paragraph spacing, ie { parskip 0pt (content) }
add a comment |
up vote
0
down vote
up vote
0
down vote
I managed to do this in a rather hacky way by dunking individual sections of the table into colorboxes (eliminates the backing lines).
Additionally, the full width multicol instances needed to have increased length, presumably to make up for some sort of cell padding.
What I have is actually a terrible solution, which is barely made (generally) usable through ~50 lines of definitions, and still requires manual tuning of some numbers. If anyone can produce a better result, I'll mark you as the answer.
Full code given here.
One additional thing that may be required is removing paragraph spacing, ie { parskip 0pt (content) }
I managed to do this in a rather hacky way by dunking individual sections of the table into colorboxes (eliminates the backing lines).
Additionally, the full width multicol instances needed to have increased length, presumably to make up for some sort of cell padding.
What I have is actually a terrible solution, which is barely made (generally) usable through ~50 lines of definitions, and still requires manual tuning of some numbers. If anyone can produce a better result, I'll mark you as the answer.
Full code given here.
One additional thing that may be required is removing paragraph spacing, ie { parskip 0pt (content) }
answered Oct 23 '17 at 6:40
Partinarel
62
62
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%2f397570%2falignment-of-fixed-width-tabs-dnd-4e-style-stat-blocks%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
Welcome to TeX.SE! Please add tex code to this page, do not force people to change the web page to get relevant code for the question ...
– Kurt
Oct 24 '17 at 19:35