Add comment facilities to TeXmacs

[cloned from the mailing list texmacs-users]

Discussing with some friends I became aware of some advantage of unstructured editing for which we should provide some alternative. This is the possibility (common in programming, but also in some research workflow) to add comments on a document which will not appear in the final version (i.e. in the PDF, on in the HTML or LaTeX export – In some sense, the dual of literate programming, maybe we can call it co-literate editing :)).

These comments can be parts of the document one do not want to make to the final version, or just reminders to explore some directions, or parts one has to cut because of editorial constraints or referees comments, but anyway one wants to keep in place and not just delete them (because maybe the paper has a short and long versions). These comments can also be simply discussion between various co-authors, so it would be nice if they carry tags, like the name of the author. And then have a macro facility to view only certain subclasses of comments and make them invisible (i.e. just leave a flag or some other indicator which do not modify the typesetting) if the user wants. This should not be difficult to code, is something similar to the versioning markup we already have, but I think it would be a useful addition to everyday workflows.
It could also be a way to edit the metadata in the document.

Of course one has (at least) two options to design such a facility: make the additional content editable as part of the document (as in the proposal above), or keep it in the document as always invisible and make it editable only via some separate GUI element, i.e. a dialog with an embedded editor (like we have now for search and replace, for example, or for the macro editor). I think I would prefer the first approach, though.

Thoughts, ideas, comments, on such a facility?

ps: on a similar direction a document can have a “draft” mode where markups like \todo or these comments are visible and a “final” mode, where they are invisible.

Note that this topic is connected with “Tricks for drafts”:

Joris already implemented some comment support :slight_smile: I’ve looked at it and wrote a description of the implementation here:

https://texmacs.github.io/notes/docs/comments-in-texmacs.html

3 Likes

My current solution for comments is just to have a separate TeXmacs document, which works fine. This works just as the latter method. In this regards, the first approach sounds more interesting.

I wonder how the collaborative experience is like on the current TeXmacs implementation. It works great as an independent contributor to a publication, but I have a hard time imaging how it works when there more than 1 people are editing on the same document.

I’ve tried the new comment facilities added for the next version (1.99.17) and they seems good, Joris made a great work there. Also there is some collaborative features in the workings for the (near) future.

Awesome. Can’t wait for those! What’s left is for me to convince (force) my collaborators to adopt TeXmacs :slight_smile: .