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:
enter image description 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.










share|improve this question
















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















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:
enter image description 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.










share|improve this question
















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













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:
enter image description 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.










share|improve this question















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:
enter image description 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






share|improve this question















share|improve this question













share|improve this question




share|improve this question








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


















  • 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










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.



enter image description here



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






share|improve this answer





















    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',
    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%2f397570%2falignment-of-fixed-width-tabs-dnd-4e-style-stat-blocks%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








    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.



    enter image description here



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






    share|improve this answer

























      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.



      enter image description here



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






      share|improve this answer























        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.



        enter image description here



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






        share|improve this answer












        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.



        enter image description here



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







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Oct 23 '17 at 6:40









        Partinarel

        62




        62






























             

            draft saved


            draft discarded



















































             


            draft saved


            draft discarded














            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





















































            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

            Accessing regular linux commands in Huawei's Dopra Linux

            Can't connect RFCOMM socket: Host is down

            Kernel panic - not syncing: Fatal Exception in Interrupt