Is there “toffset” option for setupbackgrounds in context












2















I'm trying to learn context, and I'm satisfied with their capacities.



I read in contextgarden that options of setupbackgrounds inherit from setupframed, but if I setup toffset=5mm for setupbackgrounds[text][text][frame=on,toffset=5mm] I have no effect?



With frameoffset you can modify the four directions but how about a single direction?



Code



setuppapersize[A4]
setuppagenumbering[state=none]

setupbackgrounds[text][text][frame=on,toffset=5mm]

starttext

input knuth


stoptext









share|improve this question




















  • 1





    mail-archive.com/ntg-context@ntg.nl/msg80961.html

    – DG'
    Feb 27 '16 at 12:51











  • @DG' Do you want to turn this into an answer?

    – TeXnician
    Mar 3 at 13:16











  • @TeXnician shouldn't Wolfgang?

    – DG'
    Mar 3 at 14:57











  • @DG' Well you have found the answer on the mailing list, so why not?

    – TeXnician
    Mar 3 at 15:02
















2















I'm trying to learn context, and I'm satisfied with their capacities.



I read in contextgarden that options of setupbackgrounds inherit from setupframed, but if I setup toffset=5mm for setupbackgrounds[text][text][frame=on,toffset=5mm] I have no effect?



With frameoffset you can modify the four directions but how about a single direction?



Code



setuppapersize[A4]
setuppagenumbering[state=none]

setupbackgrounds[text][text][frame=on,toffset=5mm]

starttext

input knuth


stoptext









share|improve this question




















  • 1





    mail-archive.com/ntg-context@ntg.nl/msg80961.html

    – DG'
    Feb 27 '16 at 12:51











  • @DG' Do you want to turn this into an answer?

    – TeXnician
    Mar 3 at 13:16











  • @TeXnician shouldn't Wolfgang?

    – DG'
    Mar 3 at 14:57











  • @DG' Well you have found the answer on the mailing list, so why not?

    – TeXnician
    Mar 3 at 15:02














2












2








2








I'm trying to learn context, and I'm satisfied with their capacities.



I read in contextgarden that options of setupbackgrounds inherit from setupframed, but if I setup toffset=5mm for setupbackgrounds[text][text][frame=on,toffset=5mm] I have no effect?



With frameoffset you can modify the four directions but how about a single direction?



Code



setuppapersize[A4]
setuppagenumbering[state=none]

setupbackgrounds[text][text][frame=on,toffset=5mm]

starttext

input knuth


stoptext









share|improve this question
















I'm trying to learn context, and I'm satisfied with their capacities.



I read in contextgarden that options of setupbackgrounds inherit from setupframed, but if I setup toffset=5mm for setupbackgrounds[text][text][frame=on,toffset=5mm] I have no effect?



With frameoffset you can modify the four directions but how about a single direction?



Code



setuppapersize[A4]
setuppagenumbering[state=none]

setupbackgrounds[text][text][frame=on,toffset=5mm]

starttext

input knuth


stoptext






context






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Feb 26 '16 at 10:14







Salim Bou

















asked Feb 26 '16 at 7:14









Salim BouSalim Bou

11.5k11442




11.5k11442








  • 1





    mail-archive.com/ntg-context@ntg.nl/msg80961.html

    – DG'
    Feb 27 '16 at 12:51











  • @DG' Do you want to turn this into an answer?

    – TeXnician
    Mar 3 at 13:16











  • @TeXnician shouldn't Wolfgang?

    – DG'
    Mar 3 at 14:57











  • @DG' Well you have found the answer on the mailing list, so why not?

    – TeXnician
    Mar 3 at 15:02














  • 1





    mail-archive.com/ntg-context@ntg.nl/msg80961.html

    – DG'
    Feb 27 '16 at 12:51











  • @DG' Do you want to turn this into an answer?

    – TeXnician
    Mar 3 at 13:16











  • @TeXnician shouldn't Wolfgang?

    – DG'
    Mar 3 at 14:57











  • @DG' Well you have found the answer on the mailing list, so why not?

    – TeXnician
    Mar 3 at 15:02








1




1





mail-archive.com/ntg-context@ntg.nl/msg80961.html

– DG'
Feb 27 '16 at 12:51





mail-archive.com/ntg-context@ntg.nl/msg80961.html

– DG'
Feb 27 '16 at 12:51













@DG' Do you want to turn this into an answer?

– TeXnician
Mar 3 at 13:16





@DG' Do you want to turn this into an answer?

– TeXnician
Mar 3 at 13:16













@TeXnician shouldn't Wolfgang?

– DG'
Mar 3 at 14:57





@TeXnician shouldn't Wolfgang?

– DG'
Mar 3 at 14:57













@DG' Well you have found the answer on the mailing list, so why not?

– TeXnician
Mar 3 at 15:02





@DG' Well you have found the answer on the mailing list, so why not?

– TeXnician
Mar 3 at 15:02










1 Answer
1






active

oldest

votes


















2














Wolfgang Schuster gave an answer on the ConTeXt mailing list:




The background mechanism for the text areas supports only a fraction of the normal framed options but you can do a lot when you use Metapost to draw the background.




startuniqueMPgraphic{TextBackground}
path p ; p := unitsquare xscaled OverlayWidth yscaled OverlayHeight ;
draw p topenlarged 5mm ;
setbounds currentpicture to OverlayBox ;
stopuniqueMPgraphic

defineoverlay[TextBackground][uniqueMPgraphic{TextBackground}]

setuppapersize[A4]
setuppagenumbering[state=none]

setupbackgrounds[text][text][background=TextBackground]

starttext

input knuth

stoptext





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',
    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%2f296037%2fis-there-toffset-option-for-setupbackgrounds-in-context%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









    2














    Wolfgang Schuster gave an answer on the ConTeXt mailing list:




    The background mechanism for the text areas supports only a fraction of the normal framed options but you can do a lot when you use Metapost to draw the background.




    startuniqueMPgraphic{TextBackground}
    path p ; p := unitsquare xscaled OverlayWidth yscaled OverlayHeight ;
    draw p topenlarged 5mm ;
    setbounds currentpicture to OverlayBox ;
    stopuniqueMPgraphic

    defineoverlay[TextBackground][uniqueMPgraphic{TextBackground}]

    setuppapersize[A4]
    setuppagenumbering[state=none]

    setupbackgrounds[text][text][background=TextBackground]

    starttext

    input knuth

    stoptext





    share|improve this answer






























      2














      Wolfgang Schuster gave an answer on the ConTeXt mailing list:




      The background mechanism for the text areas supports only a fraction of the normal framed options but you can do a lot when you use Metapost to draw the background.




      startuniqueMPgraphic{TextBackground}
      path p ; p := unitsquare xscaled OverlayWidth yscaled OverlayHeight ;
      draw p topenlarged 5mm ;
      setbounds currentpicture to OverlayBox ;
      stopuniqueMPgraphic

      defineoverlay[TextBackground][uniqueMPgraphic{TextBackground}]

      setuppapersize[A4]
      setuppagenumbering[state=none]

      setupbackgrounds[text][text][background=TextBackground]

      starttext

      input knuth

      stoptext





      share|improve this answer




























        2












        2








        2







        Wolfgang Schuster gave an answer on the ConTeXt mailing list:




        The background mechanism for the text areas supports only a fraction of the normal framed options but you can do a lot when you use Metapost to draw the background.




        startuniqueMPgraphic{TextBackground}
        path p ; p := unitsquare xscaled OverlayWidth yscaled OverlayHeight ;
        draw p topenlarged 5mm ;
        setbounds currentpicture to OverlayBox ;
        stopuniqueMPgraphic

        defineoverlay[TextBackground][uniqueMPgraphic{TextBackground}]

        setuppapersize[A4]
        setuppagenumbering[state=none]

        setupbackgrounds[text][text][background=TextBackground]

        starttext

        input knuth

        stoptext





        share|improve this answer















        Wolfgang Schuster gave an answer on the ConTeXt mailing list:




        The background mechanism for the text areas supports only a fraction of the normal framed options but you can do a lot when you use Metapost to draw the background.




        startuniqueMPgraphic{TextBackground}
        path p ; p := unitsquare xscaled OverlayWidth yscaled OverlayHeight ;
        draw p topenlarged 5mm ;
        setbounds currentpicture to OverlayBox ;
        stopuniqueMPgraphic

        defineoverlay[TextBackground][uniqueMPgraphic{TextBackground}]

        setuppapersize[A4]
        setuppagenumbering[state=none]

        setupbackgrounds[text][text][background=TextBackground]

        starttext

        input knuth

        stoptext






        share|improve this answer














        share|improve this answer



        share|improve this answer








        edited Mar 6 at 18:33









        Wolfgang Schuster

        5,7211811




        5,7211811










        answered Mar 6 at 17:43









        DG'DG'

        10.8k21845




        10.8k21845






























            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%2f296037%2fis-there-toffset-option-for-setupbackgrounds-in-context%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

            How to change which sound is reproduced for terminal bell?

            Title Spacing in Bjornstrup Chapter, Removing Chapter Number From Contents

            Can I use Tabulator js library in my java Spring + Thymeleaf project?