Alternatives to achieve certain output formatDynamically format labels/columns of a LaTeX table generated in R/knitr/xtableHow can I format this in lyx?Array stretch only for certain rowsUsing nearrow and searrow to separate an equation in two alternativesSwap two array elementsarray: set width for certain columnsPlacing the middle of a predefined picture at a certain node

Why most published works in medical imaging try reducing false positives?

My players want to grind XP but we're using milestone advancement

Why aren't space telescopes put in GEO?

Need to read my home electrical meter

Can I tell a prospective employee that everyone in the team is leaving?

How to let other coworkers know that I don't share my coworker's political views?

Python program to take in two strings and print the larger string

How to respond to upset student?

Where have Brexit voters gone?

A steel cutting sword?

Construct a word ladder

Sankey diagram: not getting the hang of it

In the 3D Zeldas, is it faster to roll or to simply walk?

Is it legal to meet with potential future employers in the UK, whilst visiting from the USA

Ethical issue - how can I better document what is happening?

Which European Languages are not Indo-European?

Should one buy new hardware after a system compromise?

Count Even Digits In Number

Is "cool" appropriate or offensive to use in IMs?

First Match - awk

Could a 19.25mm revolver actually exist?

Apt - strange requests to d16r8ew072anqo.cloudfront.net:80

The roles understanding in the agile development / Is the PO always right?

How to ignore kerning of underbrace in math mode



Alternatives to achieve certain output format


Dynamically format labels/columns of a LaTeX table generated in R/knitr/xtableHow can I format this in lyx?Array stretch only for certain rowsUsing nearrow and searrow to separate an equation in two alternativesSwap two array elementsarray: set width for certain columnsPlacing the middle of a predefined picture at a certain node













4















Consider the following MWE



documentclass[border=10 pt]standalone
usepackagemathtools,setspace

begindocument
$displaystyle
setstretch1.5
beginarrayccccccccccccccccccccccc
^12 mathrmC&+&^1 mathrmH &longrightarrow& ^13mathrmN&+&gamma\
&&&&^13 mathrmN& longrightarrow&^13 mathrmC&+&e^+&+&nu\
&&&&&&^13 mathrmC&+&^mathrml mathrmH& longrightarrow&^14 mathrmN&+&gamma\
&&&&&&&&&&^14 mathrmN&+&^mathrml mathrmH& longrightarrow&^15 mathrmO&+&gamma\
&&&&&&&&&&&&&&^15 mathrmO& longrightarrow&^15 mathrmN&+&e^+&+&nu\
&&&&&&&&&&&&&&&&^15 mathrmN&+&^1 mathrmH &longrightarrow&^12 mathrmC&+&^4 mathrmHe
endarray
$
enddocument


with the output
enter image description here
The output is pretty much what I'm looking for, but the way I get it seems rather clunky to me... Is there a better way to get the same output? The only relevant part here is that the same elements in each reaction need to be below each other... The spacing of the other parts doesn't have to be the same as in the picture..










share|improve this question


























    4















    Consider the following MWE



    documentclass[border=10 pt]standalone
    usepackagemathtools,setspace

    begindocument
    $displaystyle
    setstretch1.5
    beginarrayccccccccccccccccccccccc
    ^12 mathrmC&+&^1 mathrmH &longrightarrow& ^13mathrmN&+&gamma\
    &&&&^13 mathrmN& longrightarrow&^13 mathrmC&+&e^+&+&nu\
    &&&&&&^13 mathrmC&+&^mathrml mathrmH& longrightarrow&^14 mathrmN&+&gamma\
    &&&&&&&&&&^14 mathrmN&+&^mathrml mathrmH& longrightarrow&^15 mathrmO&+&gamma\
    &&&&&&&&&&&&&&^15 mathrmO& longrightarrow&^15 mathrmN&+&e^+&+&nu\
    &&&&&&&&&&&&&&&&^15 mathrmN&+&^1 mathrmH &longrightarrow&^12 mathrmC&+&^4 mathrmHe
    endarray
    $
    enddocument


    with the output
    enter image description here
    The output is pretty much what I'm looking for, but the way I get it seems rather clunky to me... Is there a better way to get the same output? The only relevant part here is that the same elements in each reaction need to be below each other... The spacing of the other parts doesn't have to be the same as in the picture..










    share|improve this question
























      4












      4








      4








      Consider the following MWE



      documentclass[border=10 pt]standalone
      usepackagemathtools,setspace

      begindocument
      $displaystyle
      setstretch1.5
      beginarrayccccccccccccccccccccccc
      ^12 mathrmC&+&^1 mathrmH &longrightarrow& ^13mathrmN&+&gamma\
      &&&&^13 mathrmN& longrightarrow&^13 mathrmC&+&e^+&+&nu\
      &&&&&&^13 mathrmC&+&^mathrml mathrmH& longrightarrow&^14 mathrmN&+&gamma\
      &&&&&&&&&&^14 mathrmN&+&^mathrml mathrmH& longrightarrow&^15 mathrmO&+&gamma\
      &&&&&&&&&&&&&&^15 mathrmO& longrightarrow&^15 mathrmN&+&e^+&+&nu\
      &&&&&&&&&&&&&&&&^15 mathrmN&+&^1 mathrmH &longrightarrow&^12 mathrmC&+&^4 mathrmHe
      endarray
      $
      enddocument


      with the output
      enter image description here
      The output is pretty much what I'm looking for, but the way I get it seems rather clunky to me... Is there a better way to get the same output? The only relevant part here is that the same elements in each reaction need to be below each other... The spacing of the other parts doesn't have to be the same as in the picture..










      share|improve this question














      Consider the following MWE



      documentclass[border=10 pt]standalone
      usepackagemathtools,setspace

      begindocument
      $displaystyle
      setstretch1.5
      beginarrayccccccccccccccccccccccc
      ^12 mathrmC&+&^1 mathrmH &longrightarrow& ^13mathrmN&+&gamma\
      &&&&^13 mathrmN& longrightarrow&^13 mathrmC&+&e^+&+&nu\
      &&&&&&^13 mathrmC&+&^mathrml mathrmH& longrightarrow&^14 mathrmN&+&gamma\
      &&&&&&&&&&^14 mathrmN&+&^mathrml mathrmH& longrightarrow&^15 mathrmO&+&gamma\
      &&&&&&&&&&&&&&^15 mathrmO& longrightarrow&^15 mathrmN&+&e^+&+&nu\
      &&&&&&&&&&&&&&&&^15 mathrmN&+&^1 mathrmH &longrightarrow&^12 mathrmC&+&^4 mathrmHe
      endarray
      $
      enddocument


      with the output
      enter image description here
      The output is pretty much what I'm looking for, but the way I get it seems rather clunky to me... Is there a better way to get the same output? The only relevant part here is that the same elements in each reaction need to be below each other... The spacing of the other parts doesn't have to be the same as in the picture..







      arrays chemistry






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked 5 hours ago









      SitoSito

      3241212




      3241212




















          2 Answers
          2






          active

          oldest

          votes


















          3














          It's a matter of opinion whether this is less clunky...it eliminates all & tab characters, but requires multiple stackunders and some bracing.



          The appearance is a bit different, however "the same elements of each reaction are below each other", as requested by the OP. While there are no other alignments that apply one may observe that the spacing on any given line is "correct".



          documentclass[border=10 pt]standalone
          usepackagemathtools,setspace,stackengine
          begindocument
          renewcommandstackalignmentl
          renewcommandstacktypeL
          setstackgapL1.4baselineskip
          stackMath
          $displaystyle
          ^12mathrmC+^1mathrmHlongrightarrow stackunder^13mathrmN+gamma
          ^13mathrmNlongrightarrow stackunder^13mathrmC+e^++nu
          ^13mathrmC+^mathrmlmathrmHlongrightarrow stackunder^14mathrmN+gamma
          ^14mathrmN+^mathrmlmathrmHlongrightarrow stackunder^15mathrmO+gamma
          ^15mathrmOlongrightarrow stackunder^15mathrmN+e^++nu
          ^15mathrmN+^1mathrmHlongrightarrow ^12mathrmC+^4mathrmHe

          $
          enddocument


          enter image description here






          share|improve this answer






























            2














            I suggest to align your entries like the way I did (using Tab) to make it easier to read and modify if needed.
            I have used newcommand to create a way for you to enter the data of a row and every cell in the array is encapsulated by mathrm....
            Also, I changed the 23 cs you had in the array to *23c.



            Output



            documentclass[border=10 pt]standalone
            usepackagemathtools,setspace
            % Usage:
            % dataoperand-1operator-1operand-2operator-2operand-3operator-3operand-4
            % Simple example:
            % dataa+b-c*d
            newcommanddata[7]%
            ensuremath%
            mathrm#1 & mathrm#2 & mathrm#3 & mathrm#4 & mathrm#5 & mathrm#6 & mathrm#7
            %
            %
            begindocument
            $displaystyle
            setstretch1.5
            beginarray*23c
            data^12 C+ ^1 H longrightarrow ^13 N +gamma \
            &&&& data^13 Nlongrightarrow ^13 C + e^+ +nu \
            &&&&&& data^13 C+ ^1 H longrightarrow ^14 N +gamma \
            &&&&&&&&&& data^14 N+ ^1 H longrightarrow ^15 O +gamma \
            &&&&&&&&&&&&&& data^15 Olongrightarrow ^15 N + e^+ +nu \
            &&&&&&&&&&&&&&&& data^15 N+ ^1 H longrightarrow ^12 C +^4 He\
            endarray
            $
            enddocument





            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%2f492326%2falternatives-to-achieve-certain-output-format%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









              3














              It's a matter of opinion whether this is less clunky...it eliminates all & tab characters, but requires multiple stackunders and some bracing.



              The appearance is a bit different, however "the same elements of each reaction are below each other", as requested by the OP. While there are no other alignments that apply one may observe that the spacing on any given line is "correct".



              documentclass[border=10 pt]standalone
              usepackagemathtools,setspace,stackengine
              begindocument
              renewcommandstackalignmentl
              renewcommandstacktypeL
              setstackgapL1.4baselineskip
              stackMath
              $displaystyle
              ^12mathrmC+^1mathrmHlongrightarrow stackunder^13mathrmN+gamma
              ^13mathrmNlongrightarrow stackunder^13mathrmC+e^++nu
              ^13mathrmC+^mathrmlmathrmHlongrightarrow stackunder^14mathrmN+gamma
              ^14mathrmN+^mathrmlmathrmHlongrightarrow stackunder^15mathrmO+gamma
              ^15mathrmOlongrightarrow stackunder^15mathrmN+e^++nu
              ^15mathrmN+^1mathrmHlongrightarrow ^12mathrmC+^4mathrmHe

              $
              enddocument


              enter image description here






              share|improve this answer



























                3














                It's a matter of opinion whether this is less clunky...it eliminates all & tab characters, but requires multiple stackunders and some bracing.



                The appearance is a bit different, however "the same elements of each reaction are below each other", as requested by the OP. While there are no other alignments that apply one may observe that the spacing on any given line is "correct".



                documentclass[border=10 pt]standalone
                usepackagemathtools,setspace,stackengine
                begindocument
                renewcommandstackalignmentl
                renewcommandstacktypeL
                setstackgapL1.4baselineskip
                stackMath
                $displaystyle
                ^12mathrmC+^1mathrmHlongrightarrow stackunder^13mathrmN+gamma
                ^13mathrmNlongrightarrow stackunder^13mathrmC+e^++nu
                ^13mathrmC+^mathrmlmathrmHlongrightarrow stackunder^14mathrmN+gamma
                ^14mathrmN+^mathrmlmathrmHlongrightarrow stackunder^15mathrmO+gamma
                ^15mathrmOlongrightarrow stackunder^15mathrmN+e^++nu
                ^15mathrmN+^1mathrmHlongrightarrow ^12mathrmC+^4mathrmHe

                $
                enddocument


                enter image description here






                share|improve this answer

























                  3












                  3








                  3







                  It's a matter of opinion whether this is less clunky...it eliminates all & tab characters, but requires multiple stackunders and some bracing.



                  The appearance is a bit different, however "the same elements of each reaction are below each other", as requested by the OP. While there are no other alignments that apply one may observe that the spacing on any given line is "correct".



                  documentclass[border=10 pt]standalone
                  usepackagemathtools,setspace,stackengine
                  begindocument
                  renewcommandstackalignmentl
                  renewcommandstacktypeL
                  setstackgapL1.4baselineskip
                  stackMath
                  $displaystyle
                  ^12mathrmC+^1mathrmHlongrightarrow stackunder^13mathrmN+gamma
                  ^13mathrmNlongrightarrow stackunder^13mathrmC+e^++nu
                  ^13mathrmC+^mathrmlmathrmHlongrightarrow stackunder^14mathrmN+gamma
                  ^14mathrmN+^mathrmlmathrmHlongrightarrow stackunder^15mathrmO+gamma
                  ^15mathrmOlongrightarrow stackunder^15mathrmN+e^++nu
                  ^15mathrmN+^1mathrmHlongrightarrow ^12mathrmC+^4mathrmHe

                  $
                  enddocument


                  enter image description here






                  share|improve this answer













                  It's a matter of opinion whether this is less clunky...it eliminates all & tab characters, but requires multiple stackunders and some bracing.



                  The appearance is a bit different, however "the same elements of each reaction are below each other", as requested by the OP. While there are no other alignments that apply one may observe that the spacing on any given line is "correct".



                  documentclass[border=10 pt]standalone
                  usepackagemathtools,setspace,stackengine
                  begindocument
                  renewcommandstackalignmentl
                  renewcommandstacktypeL
                  setstackgapL1.4baselineskip
                  stackMath
                  $displaystyle
                  ^12mathrmC+^1mathrmHlongrightarrow stackunder^13mathrmN+gamma
                  ^13mathrmNlongrightarrow stackunder^13mathrmC+e^++nu
                  ^13mathrmC+^mathrmlmathrmHlongrightarrow stackunder^14mathrmN+gamma
                  ^14mathrmN+^mathrmlmathrmHlongrightarrow stackunder^15mathrmO+gamma
                  ^15mathrmOlongrightarrow stackunder^15mathrmN+e^++nu
                  ^15mathrmN+^1mathrmHlongrightarrow ^12mathrmC+^4mathrmHe

                  $
                  enddocument


                  enter image description here







                  share|improve this answer












                  share|improve this answer



                  share|improve this answer










                  answered 5 hours ago









                  Steven B. SegletesSteven B. Segletes

                  166k9209426




                  166k9209426





















                      2














                      I suggest to align your entries like the way I did (using Tab) to make it easier to read and modify if needed.
                      I have used newcommand to create a way for you to enter the data of a row and every cell in the array is encapsulated by mathrm....
                      Also, I changed the 23 cs you had in the array to *23c.



                      Output



                      documentclass[border=10 pt]standalone
                      usepackagemathtools,setspace
                      % Usage:
                      % dataoperand-1operator-1operand-2operator-2operand-3operator-3operand-4
                      % Simple example:
                      % dataa+b-c*d
                      newcommanddata[7]%
                      ensuremath%
                      mathrm#1 & mathrm#2 & mathrm#3 & mathrm#4 & mathrm#5 & mathrm#6 & mathrm#7
                      %
                      %
                      begindocument
                      $displaystyle
                      setstretch1.5
                      beginarray*23c
                      data^12 C+ ^1 H longrightarrow ^13 N +gamma \
                      &&&& data^13 Nlongrightarrow ^13 C + e^+ +nu \
                      &&&&&& data^13 C+ ^1 H longrightarrow ^14 N +gamma \
                      &&&&&&&&&& data^14 N+ ^1 H longrightarrow ^15 O +gamma \
                      &&&&&&&&&&&&&& data^15 Olongrightarrow ^15 N + e^+ +nu \
                      &&&&&&&&&&&&&&&& data^15 N+ ^1 H longrightarrow ^12 C +^4 He\
                      endarray
                      $
                      enddocument





                      share|improve this answer





























                        2














                        I suggest to align your entries like the way I did (using Tab) to make it easier to read and modify if needed.
                        I have used newcommand to create a way for you to enter the data of a row and every cell in the array is encapsulated by mathrm....
                        Also, I changed the 23 cs you had in the array to *23c.



                        Output



                        documentclass[border=10 pt]standalone
                        usepackagemathtools,setspace
                        % Usage:
                        % dataoperand-1operator-1operand-2operator-2operand-3operator-3operand-4
                        % Simple example:
                        % dataa+b-c*d
                        newcommanddata[7]%
                        ensuremath%
                        mathrm#1 & mathrm#2 & mathrm#3 & mathrm#4 & mathrm#5 & mathrm#6 & mathrm#7
                        %
                        %
                        begindocument
                        $displaystyle
                        setstretch1.5
                        beginarray*23c
                        data^12 C+ ^1 H longrightarrow ^13 N +gamma \
                        &&&& data^13 Nlongrightarrow ^13 C + e^+ +nu \
                        &&&&&& data^13 C+ ^1 H longrightarrow ^14 N +gamma \
                        &&&&&&&&&& data^14 N+ ^1 H longrightarrow ^15 O +gamma \
                        &&&&&&&&&&&&&& data^15 Olongrightarrow ^15 N + e^+ +nu \
                        &&&&&&&&&&&&&&&& data^15 N+ ^1 H longrightarrow ^12 C +^4 He\
                        endarray
                        $
                        enddocument





                        share|improve this answer



























                          2












                          2








                          2







                          I suggest to align your entries like the way I did (using Tab) to make it easier to read and modify if needed.
                          I have used newcommand to create a way for you to enter the data of a row and every cell in the array is encapsulated by mathrm....
                          Also, I changed the 23 cs you had in the array to *23c.



                          Output



                          documentclass[border=10 pt]standalone
                          usepackagemathtools,setspace
                          % Usage:
                          % dataoperand-1operator-1operand-2operator-2operand-3operator-3operand-4
                          % Simple example:
                          % dataa+b-c*d
                          newcommanddata[7]%
                          ensuremath%
                          mathrm#1 & mathrm#2 & mathrm#3 & mathrm#4 & mathrm#5 & mathrm#6 & mathrm#7
                          %
                          %
                          begindocument
                          $displaystyle
                          setstretch1.5
                          beginarray*23c
                          data^12 C+ ^1 H longrightarrow ^13 N +gamma \
                          &&&& data^13 Nlongrightarrow ^13 C + e^+ +nu \
                          &&&&&& data^13 C+ ^1 H longrightarrow ^14 N +gamma \
                          &&&&&&&&&& data^14 N+ ^1 H longrightarrow ^15 O +gamma \
                          &&&&&&&&&&&&&& data^15 Olongrightarrow ^15 N + e^+ +nu \
                          &&&&&&&&&&&&&&&& data^15 N+ ^1 H longrightarrow ^12 C +^4 He\
                          endarray
                          $
                          enddocument





                          share|improve this answer















                          I suggest to align your entries like the way I did (using Tab) to make it easier to read and modify if needed.
                          I have used newcommand to create a way for you to enter the data of a row and every cell in the array is encapsulated by mathrm....
                          Also, I changed the 23 cs you had in the array to *23c.



                          Output



                          documentclass[border=10 pt]standalone
                          usepackagemathtools,setspace
                          % Usage:
                          % dataoperand-1operator-1operand-2operator-2operand-3operator-3operand-4
                          % Simple example:
                          % dataa+b-c*d
                          newcommanddata[7]%
                          ensuremath%
                          mathrm#1 & mathrm#2 & mathrm#3 & mathrm#4 & mathrm#5 & mathrm#6 & mathrm#7
                          %
                          %
                          begindocument
                          $displaystyle
                          setstretch1.5
                          beginarray*23c
                          data^12 C+ ^1 H longrightarrow ^13 N +gamma \
                          &&&& data^13 Nlongrightarrow ^13 C + e^+ +nu \
                          &&&&&& data^13 C+ ^1 H longrightarrow ^14 N +gamma \
                          &&&&&&&&&& data^14 N+ ^1 H longrightarrow ^15 O +gamma \
                          &&&&&&&&&&&&&& data^15 Olongrightarrow ^15 N + e^+ +nu \
                          &&&&&&&&&&&&&&&& data^15 N+ ^1 H longrightarrow ^12 C +^4 He\
                          endarray
                          $
                          enddocument






                          share|improve this answer














                          share|improve this answer



                          share|improve this answer








                          edited 4 hours ago

























                          answered 5 hours ago









                          M. Al JumailyM. Al Jumaily

                          1,1361210




                          1,1361210



























                              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%2f492326%2falternatives-to-achieve-certain-output-format%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

                              Canceling a color specificationRandomly assigning color to Graphics3D objects?Default color for Filling in Mathematica 9Coloring specific elements of sets with a prime modified order in an array plotHow to pick a color differing significantly from the colors already in a given color list?Detection of the text colorColor numbers based on their valueCan color schemes for use with ColorData include opacity specification?My dynamic color schemes

                              Invision Community Contents History See also References External links Navigation menuProprietaryinvisioncommunity.comIPS Community ForumsIPS Community Forumsthis blog entry"License Changes, IP.Board 3.4, and the Future""Interview -- Matt Mecham of Ibforums""CEO Invision Power Board, Matt Mecham Is a Liar, Thief!"IPB License Explanation 1.3, 1.3.1, 2.0, and 2.1ArchivedSecurity Fixes, Updates And Enhancements For IPB 1.3.1Archived"New Demo Accounts - Invision Power Services"the original"New Default Skin"the original"Invision Power Board 3.0.0 and Applications Released"the original"Archived copy"the original"Perpetual licenses being done away with""Release Notes - Invision Power Services""Introducing: IPS Community Suite 4!"Invision Community Release Notes

                              199年 目錄 大件事 到箇年出世嗰人 到箇年死嗰人 節慶、風俗習慣 導覽選單