ConTeXt: Is ist possible to use matrices nested like in 'block' matrices?LaTeX equivalent of ConTeXt buffersSmaller matrices (or other math elements) in displayed mathMatrices in ConTeXt?Augmented matrices in ConTeXt?Specific blockmatricesTrouble with nested matricesBlock matrices with LaTeXConTeXt: Behaviour of nested textbackgroundBlock matrices without linesConTeXt: Block array with labelled columns

How do scammers retract money, while you can’t?

Increase performance creating Mandelbrot set in python

How do I find the solutions of the following equation?

How many times can American Tourist re-enter UK in same 6 month period?

What does "I’d sit this one out, Cap," imply or mean in the context?

How do we know the LHC results are robust?

Sort a list by elements of another list

Did Dumbledore lie to Harry about how long he had James Potter's invisibility cloak when he was examining it? If so, why?

Large drywall patch supports

How do I extract a value from a time formatted value in excel?

Is `x >> pure y` equivalent to `liftM (const y) x`

I'm in charge of equipment buying but no one's ever happy with what I choose. How to fix this?

You cannot touch me, but I can touch you, who am I?

Two monoidal structures and copowering

Balance Issues for a Custom Sorcerer Variant

How to write papers efficiently when English isn't my first language?

Is this version of a gravity generator feasible?

Closest Prime Number

Detecting if an element is found inside a container

Proof of work - lottery approach

What is the intuitive meaning of having a linear relationship between the logs of two variables?

Gears on left are inverse to gears on right?

Is exact Kanji stroke length important?

How to Reset Passwords on Multiple Websites Easily?



ConTeXt: Is ist possible to use matrices nested like in 'block' matrices?


LaTeX equivalent of ConTeXt buffersSmaller matrices (or other math elements) in displayed mathMatrices in ConTeXt?Augmented matrices in ConTeXt?Specific blockmatricesTrouble with nested matricesBlock matrices with LaTeXConTeXt: Behaviour of nested textbackgroundBlock matrices without linesConTeXt: Block array with labelled columns













3















I tried to use context's startmatrix/stopmatrix nested with predefined matrix blocks. In latex it works like this:



documentclassarticle
usepackageamsmath

defmatOnebeginmatrix1 & 0 \ 0 & 1endmatrix
defmatTwobeginmatrixa\bendmatrix
defmatThreebeginmatrixc & dendmatrix

begindocument
beginalign*
beginpmatrix
matOne & matTwo\
matThree & e\
endpmatrix\
beginpmatrix
1 & 0 & a\
0 & 1 & b\
c & d & e\
endpmatrix
endalign*
enddocument


The top matrix out of blocks looks the same as the bottom one. In context I tried the following:



definemathmatrix[pmatrix][left=left(, right=right), distance=1em]

defmatOnestartmatrixNC 1 NC 0 NRNC 0 NC 1NRstopmatrix
defmatTwostartmatrixNC aNRNC bNRstopmatrix
defmatThreestartmatrixNC c NC dNRstopmatrix

starttext

startformula
startpmatrix
NC matOne NC matTwoNR
NC matThree NC eNR
stoppmatrix
stopformula
startformula
startpmatrix
NC 1 NC 0 NC a NR
NC 0 NC 1 NC b NR
NC c NC d NC eNR
stoppmatrix
stopformula

stoptext


Here the top matrix looks different than the bottom one. It seems that the distance isn't applied after a block matrix. Is there a way to fix this?










share|improve this question


























    3















    I tried to use context's startmatrix/stopmatrix nested with predefined matrix blocks. In latex it works like this:



    documentclassarticle
    usepackageamsmath

    defmatOnebeginmatrix1 & 0 \ 0 & 1endmatrix
    defmatTwobeginmatrixa\bendmatrix
    defmatThreebeginmatrixc & dendmatrix

    begindocument
    beginalign*
    beginpmatrix
    matOne & matTwo\
    matThree & e\
    endpmatrix\
    beginpmatrix
    1 & 0 & a\
    0 & 1 & b\
    c & d & e\
    endpmatrix
    endalign*
    enddocument


    The top matrix out of blocks looks the same as the bottom one. In context I tried the following:



    definemathmatrix[pmatrix][left=left(, right=right), distance=1em]

    defmatOnestartmatrixNC 1 NC 0 NRNC 0 NC 1NRstopmatrix
    defmatTwostartmatrixNC aNRNC bNRstopmatrix
    defmatThreestartmatrixNC c NC dNRstopmatrix

    starttext

    startformula
    startpmatrix
    NC matOne NC matTwoNR
    NC matThree NC eNR
    stoppmatrix
    stopformula
    startformula
    startpmatrix
    NC 1 NC 0 NC a NR
    NC 0 NC 1 NC b NR
    NC c NC d NC eNR
    stoppmatrix
    stopformula

    stoptext


    Here the top matrix looks different than the bottom one. It seems that the distance isn't applied after a block matrix. Is there a way to fix this?










    share|improve this question
























      3












      3








      3








      I tried to use context's startmatrix/stopmatrix nested with predefined matrix blocks. In latex it works like this:



      documentclassarticle
      usepackageamsmath

      defmatOnebeginmatrix1 & 0 \ 0 & 1endmatrix
      defmatTwobeginmatrixa\bendmatrix
      defmatThreebeginmatrixc & dendmatrix

      begindocument
      beginalign*
      beginpmatrix
      matOne & matTwo\
      matThree & e\
      endpmatrix\
      beginpmatrix
      1 & 0 & a\
      0 & 1 & b\
      c & d & e\
      endpmatrix
      endalign*
      enddocument


      The top matrix out of blocks looks the same as the bottom one. In context I tried the following:



      definemathmatrix[pmatrix][left=left(, right=right), distance=1em]

      defmatOnestartmatrixNC 1 NC 0 NRNC 0 NC 1NRstopmatrix
      defmatTwostartmatrixNC aNRNC bNRstopmatrix
      defmatThreestartmatrixNC c NC dNRstopmatrix

      starttext

      startformula
      startpmatrix
      NC matOne NC matTwoNR
      NC matThree NC eNR
      stoppmatrix
      stopformula
      startformula
      startpmatrix
      NC 1 NC 0 NC a NR
      NC 0 NC 1 NC b NR
      NC c NC d NC eNR
      stoppmatrix
      stopformula

      stoptext


      Here the top matrix looks different than the bottom one. It seems that the distance isn't applied after a block matrix. Is there a way to fix this?










      share|improve this question














      I tried to use context's startmatrix/stopmatrix nested with predefined matrix blocks. In latex it works like this:



      documentclassarticle
      usepackageamsmath

      defmatOnebeginmatrix1 & 0 \ 0 & 1endmatrix
      defmatTwobeginmatrixa\bendmatrix
      defmatThreebeginmatrixc & dendmatrix

      begindocument
      beginalign*
      beginpmatrix
      matOne & matTwo\
      matThree & e\
      endpmatrix\
      beginpmatrix
      1 & 0 & a\
      0 & 1 & b\
      c & d & e\
      endpmatrix
      endalign*
      enddocument


      The top matrix out of blocks looks the same as the bottom one. In context I tried the following:



      definemathmatrix[pmatrix][left=left(, right=right), distance=1em]

      defmatOnestartmatrixNC 1 NC 0 NRNC 0 NC 1NRstopmatrix
      defmatTwostartmatrixNC aNRNC bNRstopmatrix
      defmatThreestartmatrixNC c NC dNRstopmatrix

      starttext

      startformula
      startpmatrix
      NC matOne NC matTwoNR
      NC matThree NC eNR
      stoppmatrix
      stopformula
      startformula
      startpmatrix
      NC 1 NC 0 NC a NR
      NC 0 NC 1 NC b NR
      NC c NC d NC eNR
      stoppmatrix
      stopformula

      stoptext


      Here the top matrix looks different than the bottom one. It seems that the distance isn't applied after a block matrix. Is there a way to fix this?







      math-mode context matrices






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Aug 22 '17 at 20:32









      IcxoluIcxolu

      1425




      1425




















          2 Answers
          2






          active

          oldest

          votes


















          2














          I'm unsure whether this breaks something else but it seems as if the definition of NC is not reverted properly. Reported here: https://mailman.ntg.nl/pipermail/ntg-context/2017/089631.html



          I cranked distance up to 2em to make the difference more visible.



          unprotect

          defmath_matrix_stop
          crcr
          % ifgridsnapping else
          mathstrutcrcr
          noalignvskip-baselineskip%
          % fi
          egroup
          gdefmath_matrix_NCendmathaligntab
          egroup
          mathmatrixright
          endgroup

          protect

          definemathmatrix[pmatrix][left=left(, right=right), distance=2em]

          defmatOnestartmatrixNC 1 NC 0 NRNC 0 NC 1NRstopmatrix
          defmatTwostartmatrixNC aNRNC bNRstopmatrix
          defmatThreestartmatrixNC c NC dNRstopmatrix

          starttext

          startformula
          startpmatrix
          NC matOne NC matTwo NC matTwo NR
          NC matThree NC e NC eNR
          stoppmatrix
          stopformula
          startformula
          startpmatrix
          NC 1 NC 0 NC a NR
          NC 0 NC 1 NC b NR
          NC c NC d NC eNR
          stoppmatrix
          stopformula

          stoptext


          enter image description here






          share|improve this answer

























          • Thanks Henry, so it seems like this is a bug in context. Your fix works in this case, but if a add a fourth column with another mathTwo in the first row and an f in the second it doesn't work anymore. If you keep adding some columns it adds the distance only every second column.

            – Icxolu
            Aug 23 '17 at 11:27











          • @Icxolu Maybe it works now, maybe I broke something else this time...

            – Henri Menke
            Aug 23 '17 at 21:06











          • Thanks. I haven't found any issue, so I will accept this answer.

            – Icxolu
            Aug 24 '17 at 17:24



















          0














          FWIW, nested matrices work currently with the current version of ConTeXt (2019.03.21). The bug was fixed with this commit. The code listed in the example gives the following:



          enter image description here






          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%2f387718%2fcontext-is-ist-possible-to-use-matrices-nested-like-in-block-matrices%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









            2














            I'm unsure whether this breaks something else but it seems as if the definition of NC is not reverted properly. Reported here: https://mailman.ntg.nl/pipermail/ntg-context/2017/089631.html



            I cranked distance up to 2em to make the difference more visible.



            unprotect

            defmath_matrix_stop
            crcr
            % ifgridsnapping else
            mathstrutcrcr
            noalignvskip-baselineskip%
            % fi
            egroup
            gdefmath_matrix_NCendmathaligntab
            egroup
            mathmatrixright
            endgroup

            protect

            definemathmatrix[pmatrix][left=left(, right=right), distance=2em]

            defmatOnestartmatrixNC 1 NC 0 NRNC 0 NC 1NRstopmatrix
            defmatTwostartmatrixNC aNRNC bNRstopmatrix
            defmatThreestartmatrixNC c NC dNRstopmatrix

            starttext

            startformula
            startpmatrix
            NC matOne NC matTwo NC matTwo NR
            NC matThree NC e NC eNR
            stoppmatrix
            stopformula
            startformula
            startpmatrix
            NC 1 NC 0 NC a NR
            NC 0 NC 1 NC b NR
            NC c NC d NC eNR
            stoppmatrix
            stopformula

            stoptext


            enter image description here






            share|improve this answer

























            • Thanks Henry, so it seems like this is a bug in context. Your fix works in this case, but if a add a fourth column with another mathTwo in the first row and an f in the second it doesn't work anymore. If you keep adding some columns it adds the distance only every second column.

              – Icxolu
              Aug 23 '17 at 11:27











            • @Icxolu Maybe it works now, maybe I broke something else this time...

              – Henri Menke
              Aug 23 '17 at 21:06











            • Thanks. I haven't found any issue, so I will accept this answer.

              – Icxolu
              Aug 24 '17 at 17:24
















            2














            I'm unsure whether this breaks something else but it seems as if the definition of NC is not reverted properly. Reported here: https://mailman.ntg.nl/pipermail/ntg-context/2017/089631.html



            I cranked distance up to 2em to make the difference more visible.



            unprotect

            defmath_matrix_stop
            crcr
            % ifgridsnapping else
            mathstrutcrcr
            noalignvskip-baselineskip%
            % fi
            egroup
            gdefmath_matrix_NCendmathaligntab
            egroup
            mathmatrixright
            endgroup

            protect

            definemathmatrix[pmatrix][left=left(, right=right), distance=2em]

            defmatOnestartmatrixNC 1 NC 0 NRNC 0 NC 1NRstopmatrix
            defmatTwostartmatrixNC aNRNC bNRstopmatrix
            defmatThreestartmatrixNC c NC dNRstopmatrix

            starttext

            startformula
            startpmatrix
            NC matOne NC matTwo NC matTwo NR
            NC matThree NC e NC eNR
            stoppmatrix
            stopformula
            startformula
            startpmatrix
            NC 1 NC 0 NC a NR
            NC 0 NC 1 NC b NR
            NC c NC d NC eNR
            stoppmatrix
            stopformula

            stoptext


            enter image description here






            share|improve this answer

























            • Thanks Henry, so it seems like this is a bug in context. Your fix works in this case, but if a add a fourth column with another mathTwo in the first row and an f in the second it doesn't work anymore. If you keep adding some columns it adds the distance only every second column.

              – Icxolu
              Aug 23 '17 at 11:27











            • @Icxolu Maybe it works now, maybe I broke something else this time...

              – Henri Menke
              Aug 23 '17 at 21:06











            • Thanks. I haven't found any issue, so I will accept this answer.

              – Icxolu
              Aug 24 '17 at 17:24














            2












            2








            2







            I'm unsure whether this breaks something else but it seems as if the definition of NC is not reverted properly. Reported here: https://mailman.ntg.nl/pipermail/ntg-context/2017/089631.html



            I cranked distance up to 2em to make the difference more visible.



            unprotect

            defmath_matrix_stop
            crcr
            % ifgridsnapping else
            mathstrutcrcr
            noalignvskip-baselineskip%
            % fi
            egroup
            gdefmath_matrix_NCendmathaligntab
            egroup
            mathmatrixright
            endgroup

            protect

            definemathmatrix[pmatrix][left=left(, right=right), distance=2em]

            defmatOnestartmatrixNC 1 NC 0 NRNC 0 NC 1NRstopmatrix
            defmatTwostartmatrixNC aNRNC bNRstopmatrix
            defmatThreestartmatrixNC c NC dNRstopmatrix

            starttext

            startformula
            startpmatrix
            NC matOne NC matTwo NC matTwo NR
            NC matThree NC e NC eNR
            stoppmatrix
            stopformula
            startformula
            startpmatrix
            NC 1 NC 0 NC a NR
            NC 0 NC 1 NC b NR
            NC c NC d NC eNR
            stoppmatrix
            stopformula

            stoptext


            enter image description here






            share|improve this answer















            I'm unsure whether this breaks something else but it seems as if the definition of NC is not reverted properly. Reported here: https://mailman.ntg.nl/pipermail/ntg-context/2017/089631.html



            I cranked distance up to 2em to make the difference more visible.



            unprotect

            defmath_matrix_stop
            crcr
            % ifgridsnapping else
            mathstrutcrcr
            noalignvskip-baselineskip%
            % fi
            egroup
            gdefmath_matrix_NCendmathaligntab
            egroup
            mathmatrixright
            endgroup

            protect

            definemathmatrix[pmatrix][left=left(, right=right), distance=2em]

            defmatOnestartmatrixNC 1 NC 0 NRNC 0 NC 1NRstopmatrix
            defmatTwostartmatrixNC aNRNC bNRstopmatrix
            defmatThreestartmatrixNC c NC dNRstopmatrix

            starttext

            startformula
            startpmatrix
            NC matOne NC matTwo NC matTwo NR
            NC matThree NC e NC eNR
            stoppmatrix
            stopformula
            startformula
            startpmatrix
            NC 1 NC 0 NC a NR
            NC 0 NC 1 NC b NR
            NC c NC d NC eNR
            stoppmatrix
            stopformula

            stoptext


            enter image description here







            share|improve this answer














            share|improve this answer



            share|improve this answer








            edited Aug 23 '17 at 21:06

























            answered Aug 22 '17 at 23:19









            Henri MenkeHenri Menke

            77.1k8170284




            77.1k8170284












            • Thanks Henry, so it seems like this is a bug in context. Your fix works in this case, but if a add a fourth column with another mathTwo in the first row and an f in the second it doesn't work anymore. If you keep adding some columns it adds the distance only every second column.

              – Icxolu
              Aug 23 '17 at 11:27











            • @Icxolu Maybe it works now, maybe I broke something else this time...

              – Henri Menke
              Aug 23 '17 at 21:06











            • Thanks. I haven't found any issue, so I will accept this answer.

              – Icxolu
              Aug 24 '17 at 17:24


















            • Thanks Henry, so it seems like this is a bug in context. Your fix works in this case, but if a add a fourth column with another mathTwo in the first row and an f in the second it doesn't work anymore. If you keep adding some columns it adds the distance only every second column.

              – Icxolu
              Aug 23 '17 at 11:27











            • @Icxolu Maybe it works now, maybe I broke something else this time...

              – Henri Menke
              Aug 23 '17 at 21:06











            • Thanks. I haven't found any issue, so I will accept this answer.

              – Icxolu
              Aug 24 '17 at 17:24

















            Thanks Henry, so it seems like this is a bug in context. Your fix works in this case, but if a add a fourth column with another mathTwo in the first row and an f in the second it doesn't work anymore. If you keep adding some columns it adds the distance only every second column.

            – Icxolu
            Aug 23 '17 at 11:27





            Thanks Henry, so it seems like this is a bug in context. Your fix works in this case, but if a add a fourth column with another mathTwo in the first row and an f in the second it doesn't work anymore. If you keep adding some columns it adds the distance only every second column.

            – Icxolu
            Aug 23 '17 at 11:27













            @Icxolu Maybe it works now, maybe I broke something else this time...

            – Henri Menke
            Aug 23 '17 at 21:06





            @Icxolu Maybe it works now, maybe I broke something else this time...

            – Henri Menke
            Aug 23 '17 at 21:06













            Thanks. I haven't found any issue, so I will accept this answer.

            – Icxolu
            Aug 24 '17 at 17:24






            Thanks. I haven't found any issue, so I will accept this answer.

            – Icxolu
            Aug 24 '17 at 17:24












            0














            FWIW, nested matrices work currently with the current version of ConTeXt (2019.03.21). The bug was fixed with this commit. The code listed in the example gives the following:



            enter image description here






            share|improve this answer



























              0














              FWIW, nested matrices work currently with the current version of ConTeXt (2019.03.21). The bug was fixed with this commit. The code listed in the example gives the following:



              enter image description here






              share|improve this answer

























                0












                0








                0







                FWIW, nested matrices work currently with the current version of ConTeXt (2019.03.21). The bug was fixed with this commit. The code listed in the example gives the following:



                enter image description here






                share|improve this answer













                FWIW, nested matrices work currently with the current version of ConTeXt (2019.03.21). The bug was fixed with this commit. The code listed in the example gives the following:



                enter image description here







                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered 17 mins ago









                AdityaAditya

                55.8k2110237




                55.8k2110237



























                    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%2f387718%2fcontext-is-ist-possible-to-use-matrices-nested-like-in-block-matrices%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 should I use the fbox command correctly to avoid producing a Bad Box message?How to put a long piece of text in a box?How to specify height and width of fboxIs there an arrayrulecolor-like command to change the rule color of fbox?What is the command to highlight bad boxes in pdf?Why does fbox sometimes place the box *over* the graphic image?how to put the text in the boxHow to create command for a box where text inside the box can automatically adjust?how can I make an fbox like command with certain color, shape and width of border?how to use fbox in align modeFbox increase the spacing between the box and it content (inner margin)how to change the box height of an equationWhat is the use of the hbox in a newcommand command?

                    Doxepinum Nexus interni Notae | Tabula navigationis3158DB01142WHOa682390"Structural Analysis of the Histamine H1 Receptor""Transdermal and Topical Drug Administration in the Treatment of Pain""Antidepressants as antipruritic agents: A review"

                    inputenc: Unicode character … not set up for use with LaTeX The Next CEO of Stack OverflowEntering Unicode characters in LaTeXHow to solve the `Package inputenc Error: Unicode char not set up for use with LaTeX` problem?solve “Unicode char is not set up for use with LaTeX” without special handling of every new interesting UTF-8 characterPackage inputenc Error: Unicode character ² (U+B2)(inputenc) not set up for use with LaTeX. acroI2C[I²C]package inputenc error unicode char (u + 190) not set up for use with latexPackage inputenc Error: Unicode char u8:′ not set up for use with LaTeX. 3′inputenc Error: Unicode char u8: not set up for use with LaTeX with G-BriefPackage Inputenc Error: Unicode char u8: not set up for use with LaTeXPackage inputenc Error: Unicode char ́ (U+301)(inputenc) not set up for use with LaTeX. includePackage inputenc Error: Unicode char ̂ (U+302)(inputenc) not set up for use with LaTeX. … $widehatleft (OA,AA' right )$Package inputenc Error: Unicode char â„¡ (U+2121)(inputenc) not set up for use with LaTeX. printbibliography[heading=bibintoc]Package inputenc Error: Unicode char − (U+2212)(inputenc) not set up for use with LaTeXPackage inputenc Error: Unicode character α (U+3B1) not set up for use with LaTeXPackage inputenc Error: Unicode characterError: ! Package inputenc Error: Unicode char ⊘ (U+2298)(inputenc) not set up for use with LaTeX