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?


  • Welcome to TeX.SX! Please provide a minimal working example showing what you've tried so far. – JouleV Dec 17 '18 at 11:16
  • 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 Dec 17 '18 at 11:22
  • 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 Dec 17 '18 at 11:27

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



\ref{text}, \ref{number}

here ist the text \store{some text}{text}


enter image description here

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.