Bibliography in Included Files

If I’m editing an included file in a multifile document, is there a way to have citations work? They work in the main document, but not in the included document.

I guess you need to tell TeXmacs what is the master file this include belongs to. I’ve never did that myself. Using Help->Search you can look for “master”. It came up some useful information which you can also find by browsing Help->Manual->Automatic Content Generation, in particular Section 8 tells you that you need to use Tools->Project->Attach master to select a master document for a particular include document.

1 Like

Yeah, I tried that and had no luck. Oh well, it’s not a blocking issue.

Can you be more precise on what is going wrong? If it does not work seems to me a bug and we could give a look at this.

I am under the impression that there is a new (with respect to “Attach master”) mechanism as well; I have found though only a paragraph in the appendix of the TeXmacs manual, B.4.7, https://www.texmacs.org/tmweb/documents/manuals/texmacs-manual.en.pdf, and I do not understand whether the Tools->Project->Attach master corresponds to the “Previous versions of TeXmacs provided the project mechanism for dealing with large documents like books.” sentence of that appendix section.
Maybe it is in this way, that the bibliography works well with the “new” multi part documents. May be :slight_smile:

1 Like

Good observation. I was not aware of this double possibility. Anyway it also says that the old mechanism should still work. I understand the design decision: multi-file documents corresponds to “old” ways to manage complex documents without specific editor support. In TeXmacs there is no need to have this, the only reason to focus on single parts is only related to speed of typesetting, I guess. Similarly, many images can now be included in the TeXmacs file and not just linked as outside documents and the bibliography database can also be included in the document, making possible to have a single file document without any external dependency.

1 Like

I tried to play with this. It seems that the document is divided by the part macro. I don’t know whether it is possible to introduce parts without using this macro. For example, we might want to partition the document by chapters, not parts.

Maybe there is a way to force the chapter macro to include a part macro?

I found a section in the Jolly Writer about large documents, Sec 6.6. The suggested procedure is to have a master file with inclusions and to attach the master file in each included file (to have a two-way link between the documents). Then you have to periodically update the master file to get references right across the various inclusions. It is not enough (apparently) to update the inclusion only.

2 Likes

OK, awesome! I decided that I wouldn’t split up my thesis into subfiles until I really needed to, but when I do I will definitely try this out.

Hi. Did you manage to resolve this issue? I setup the master file according to the Jolly Writer, and the project menu is working. Citations work properly in the master file, but in the included files, it displays a [?].

The way I proceeded:
Create the master file.
Tools -> Project -> Use as master.
Create the chapter file.
Tools -> Project -> Attach master.
Link -> Include the chapter file in the master file.
Insert -> Automatic -> Bibliography into the master file.
Choose the bib file.
Insert a citation in the chapter file.
Go back to the master file and Document -> Update -> All.
Citation works in the master file.
In the chpater file the citation is still [?] even after Document -> Update -> All.

Looks like its working after restarting texmacs once. Will report back after more testing.