[Tex/LaTex] Cross-reference between LaTeX files

filesystem-access

I am trying to get a TeX file to read certain lines from a different text file. More precisely, in my database file a.tex I have a long list. Now in a different file, I would like to have items with specific numbers. Of course, I can copy-paste. My question is, is there a way to get LaTeX to do it?

Best Answer

The short answer is yes. The longer answer is that we'd need more information. You can easily read a file one line at a time. The e-TeX extension \readline is especially helpful for reading files.

How are these lines numbered? How many do you want to read at once? Are the lines sorted by these "specific numbers"? Is your list of numbers sorted? What else can you tell us about these lines?

Related Question