I make long technical (building engineering) documentation.

In those docs, the standard is to explain stuff in the main doc and put a reference to a detailed calculation at the end.

So I would like to know if I can do this...


The roof is 5 metres large per 30 metres long and the wind blablabla...

Detail is provided in include X.



Walls are 20 cm concrete plates.

Calculations are provided as extract Y.


And the extracts will be included in the respective order, and then latex will replace X and Y by the respective numbers (just like it does with labels) by virtue of a command or reference that I will place here.

Edit to forbid confusion on renumbering of includes.

  • No, the external documents are made using other softwares (structural or even custom and macro excel sheets)
    – 22decembre
    Commented Jun 11 at 11:19
  • I am not to extract info, I am just to include the whole pdf as an include at the end of the file. (word "extract" was maybe not the best choice here, acknowledged)
    – 22decembre
    Commented Jun 11 at 11:32
  • Any page numbers of such printed on the original will show up on the copy. You could add information manually ond ovelap the image. Commented Jun 11 at 11:38
  • Ok, now I'm confused. Which X should latex replace? The The roof is X metres large or the Detail is provided in extract X.? Commented Jun 11 at 11:42
  • I am really, really sorry. Yes that was bad. Correcting. The X to replace is "Detail is provided in include X"
    – 22decembre
    Commented Jun 11 at 11:48

1 Answer 1


Here is an example that gathers all attachments and inserts them at the very end of your document. References are available through option addtotoc.


\NewDocumentCommand\attach{ mmm }{
      addtotoc={1, section, 1, #1, #3}
  \hyperref[#1]{\autoref*{#1} (\nameref*{#1})}



See \refAttachment{sec:att-roof}, page \pageref{sec:att-roof}.
\attach{Calculation Roof}{example-image-a4-numbered.pdf}{sec:att-roof}


See \refAttachment{sec:att-wall}, page \pageref{sec:att-wall}.
\attach{Calculation Wall}{example-image-a4-numbered.pdf}{sec:att-wall}


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .