Cross-referencing numeric values and text from later section to executive summary of a latex document











up vote
5
down vote

favorite












I have almost completed drafting a report on consumption of different food items, and I am drafting an executive summary so that readers can quickly know what the report is about. Since there are quite a lot of tables and ranking and number generated from the dataset, I need to cross-reference quite a number of them in the executive summary, which I don't prefer "hard-code" these figures into the executive summary by means of copy and paste.



Having explored that use of macro maybe my way out, but it has a limitation that text to be quoted needs to present before where it needs to be quoted, which is not applicable to my case as the executive summary needs to present before the main text



Can anyone enlighten me on how to cross-reference the text or numbers from a later section in latex without manually copy and paste?



Thanks!










share|improve this question









New contributor




lokheart is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.




















  • Welcome to TeX.SX! Please provide a minimal working example showing what you've tried so far.
    – JouleV
    1 hour ago










  • How are the numbers and text you want to quote generated? Are they hard coded, or are they being produced by a tool. If they are hardcoded, and not too numerous, the simplest thing would be to define macros for them in the preamble, and then use those macros both in the executive summary and the later section.
    – Paul Stanley
    1 hour ago










  • Paul, I am using R markdown that R script is integrated into the R markdown file for generating the figures, they are fairly lot script that moving them to preamble needs quite a lot of effort
    – lokheart
    1 hour ago















up vote
5
down vote

favorite












I have almost completed drafting a report on consumption of different food items, and I am drafting an executive summary so that readers can quickly know what the report is about. Since there are quite a lot of tables and ranking and number generated from the dataset, I need to cross-reference quite a number of them in the executive summary, which I don't prefer "hard-code" these figures into the executive summary by means of copy and paste.



Having explored that use of macro maybe my way out, but it has a limitation that text to be quoted needs to present before where it needs to be quoted, which is not applicable to my case as the executive summary needs to present before the main text



Can anyone enlighten me on how to cross-reference the text or numbers from a later section in latex without manually copy and paste?



Thanks!










share|improve this question









New contributor




lokheart is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.




















  • Welcome to TeX.SX! Please provide a minimal working example showing what you've tried so far.
    – JouleV
    1 hour ago










  • How are the numbers and text you want to quote generated? Are they hard coded, or are they being produced by a tool. If they are hardcoded, and not too numerous, the simplest thing would be to define macros for them in the preamble, and then use those macros both in the executive summary and the later section.
    – Paul Stanley
    1 hour ago










  • Paul, I am using R markdown that R script is integrated into the R markdown file for generating the figures, they are fairly lot script that moving them to preamble needs quite a lot of effort
    – lokheart
    1 hour ago













up vote
5
down vote

favorite









up vote
5
down vote

favorite











I have almost completed drafting a report on consumption of different food items, and I am drafting an executive summary so that readers can quickly know what the report is about. Since there are quite a lot of tables and ranking and number generated from the dataset, I need to cross-reference quite a number of them in the executive summary, which I don't prefer "hard-code" these figures into the executive summary by means of copy and paste.



Having explored that use of macro maybe my way out, but it has a limitation that text to be quoted needs to present before where it needs to be quoted, which is not applicable to my case as the executive summary needs to present before the main text



Can anyone enlighten me on how to cross-reference the text or numbers from a later section in latex without manually copy and paste?



Thanks!










share|improve this question









New contributor




lokheart is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.











I have almost completed drafting a report on consumption of different food items, and I am drafting an executive summary so that readers can quickly know what the report is about. Since there are quite a lot of tables and ranking and number generated from the dataset, I need to cross-reference quite a number of them in the executive summary, which I don't prefer "hard-code" these figures into the executive summary by means of copy and paste.



Having explored that use of macro maybe my way out, but it has a limitation that text to be quoted needs to present before where it needs to be quoted, which is not applicable to my case as the executive summary needs to present before the main text



Can anyone enlighten me on how to cross-reference the text or numbers from a later section in latex without manually copy and paste?



Thanks!







cross-referencing






share|improve this question









New contributor




lokheart is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.











share|improve this question









New contributor




lokheart is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.









share|improve this question




share|improve this question








edited 1 hour ago









Mico

272k30369756




272k30369756






New contributor




lokheart is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.









asked 1 hour ago









lokheart

1262




1262




New contributor




lokheart is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.





New contributor





lokheart is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.






lokheart is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.












  • Welcome to TeX.SX! Please provide a minimal working example showing what you've tried so far.
    – JouleV
    1 hour ago










  • How are the numbers and text you want to quote generated? Are they hard coded, or are they being produced by a tool. If they are hardcoded, and not too numerous, the simplest thing would be to define macros for them in the preamble, and then use those macros both in the executive summary and the later section.
    – Paul Stanley
    1 hour ago










  • Paul, I am using R markdown that R script is integrated into the R markdown file for generating the figures, they are fairly lot script that moving them to preamble needs quite a lot of effort
    – lokheart
    1 hour ago


















  • Welcome to TeX.SX! Please provide a minimal working example showing what you've tried so far.
    – JouleV
    1 hour ago










  • How are the numbers and text you want to quote generated? Are they hard coded, or are they being produced by a tool. If they are hardcoded, and not too numerous, the simplest thing would be to define macros for them in the preamble, and then use those macros both in the executive summary and the later section.
    – Paul Stanley
    1 hour ago










  • Paul, I am using R markdown that R script is integrated into the R markdown file for generating the figures, they are fairly lot script that moving them to preamble needs quite a lot of effort
    – lokheart
    1 hour ago
















Welcome to TeX.SX! Please provide a minimal working example showing what you've tried so far.
– JouleV
1 hour ago




Welcome to TeX.SX! Please provide a minimal working example showing what you've tried so far.
– JouleV
1 hour ago












How are the numbers and text you want to quote generated? Are they hard coded, or are they being produced by a tool. If they are hardcoded, and not too numerous, the simplest thing would be to define macros for them in the preamble, and then use those macros both in the executive summary and the later section.
– Paul Stanley
1 hour ago




How are the numbers and text you want to quote generated? Are they hard coded, or are they being produced by a tool. If they are hardcoded, and not too numerous, the simplest thing would be to define macros for them in the preamble, and then use those macros both in the executive summary and the later section.
– Paul Stanley
1 hour ago












Paul, I am using R markdown that R script is integrated into the R markdown file for generating the figures, they are fairly lot script that moving them to preamble needs quite a lot of effort
– lokheart
1 hour ago




Paul, I am using R markdown that R script is integrated into the R markdown file for generating the figures, they are fairly lot script that moving them to preamble needs quite a lot of effort
– lokheart
1 hour ago










1 Answer
1






active

oldest

votes

















up vote
7
down vote













You can e.g. use a label/ref:



documentclass[11pt]{article}
makeatletter
newcommandstore[2]{#1{def@currentlabel{#1}label{#2}}}

begin{document}

section{Use}
ref{text}, ref{number}


section{Store}
here ist the text store{some text}{text}
store{123456}{number}

end{document}


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',
    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
    });


    }
    });






    lokheart is a new contributor. Be nice, and check out our Code of Conduct.










    draft saved

    draft discarded


















    StackExchange.ready(
    function () {
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f466189%2fcross-referencing-numeric-values-and-text-from-later-section-to-executive-summar%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
    7
    down vote













    You can e.g. use a label/ref:



    documentclass[11pt]{article}
    makeatletter
    newcommandstore[2]{#1{def@currentlabel{#1}label{#2}}}

    begin{document}

    section{Use}
    ref{text}, ref{number}


    section{Store}
    here ist the text store{some text}{text}
    store{123456}{number}

    end{document}


    enter image description here






    share|improve this answer

























      up vote
      7
      down vote













      You can e.g. use a label/ref:



      documentclass[11pt]{article}
      makeatletter
      newcommandstore[2]{#1{def@currentlabel{#1}label{#2}}}

      begin{document}

      section{Use}
      ref{text}, ref{number}


      section{Store}
      here ist the text store{some text}{text}
      store{123456}{number}

      end{document}


      enter image description here






      share|improve this answer























        up vote
        7
        down vote










        up vote
        7
        down vote









        You can e.g. use a label/ref:



        documentclass[11pt]{article}
        makeatletter
        newcommandstore[2]{#1{def@currentlabel{#1}label{#2}}}

        begin{document}

        section{Use}
        ref{text}, ref{number}


        section{Store}
        here ist the text store{some text}{text}
        store{123456}{number}

        end{document}


        enter image description here






        share|improve this answer












        You can e.g. use a label/ref:



        documentclass[11pt]{article}
        makeatletter
        newcommandstore[2]{#1{def@currentlabel{#1}label{#2}}}

        begin{document}

        section{Use}
        ref{text}, ref{number}


        section{Store}
        here ist the text store{some text}{text}
        store{123456}{number}

        end{document}


        enter image description here







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered 1 hour ago









        Ulrike Fischer

        185k7289666




        185k7289666






















            lokheart is a new contributor. Be nice, and check out our Code of Conduct.










            draft saved

            draft discarded


















            lokheart is a new contributor. Be nice, and check out our Code of Conduct.













            lokheart is a new contributor. Be nice, and check out our Code of Conduct.












            lokheart is a new contributor. Be nice, and check out our Code of Conduct.
















            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.





            Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


            Please pay close attention to the following guidance:


            • 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%2f466189%2fcross-referencing-numeric-values-and-text-from-later-section-to-executive-summar%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

            flock() on closed filehandle LOCK_FILE at /usr/bin/apt-mirror

            Mangá

            Eduardo VII do Reino Unido