>>>>> "D" == David Carlisle <[log in to unmask]> writes: D> Pah, write then all to the main aux file (with a note to say D> which bit they come from, if that is needed) (not that I've D> tried coding it that way:-) You do need the note in an \includeonly scenario. You can't group them, as I tried to do, because if you abort LaTeX during the included part you get an unclosed group in the aux file, which then crashes LaTeX next run. OK, so you tag each and every \write with its part, to avoid using a grouping construct to enclose them. Or instead of using grouping you set state with flags like \NowWritesAreComingFromThisFile{filename} in series in the main aux file. Well, those sound like good ideas to me. Either I have thought of them before or I haven't. If I haven't, then coming back to the problem after a very long time I suddenly see the easy right solution. But likely I did try them and ran into some trouble that I just can't remember any more. You can be the judge. See my accompanying post for the macros.