The term "tags" can be understood to mean that which is used to organize and make text more understandable (as in TeX.SE).
The term "tags" can also be understood as something used to manipulate the text (as in the multiaudience package and tagging package)
For instance:
- Is there an easy way to tag content in a LaTeX document? has several great solutions for tagging and showing/indexing tagged content;
- The multiaudience,optional and tagging packages allow text to either be compiled or not compiled depending on the "tags" in effect within the source.
But, to the best of my knowledge, there does not exist a solution that combines the two approaches set out above. This may be just my ignorance to an already existing solution or way of working.
So, in the spirit of "you got peanut butter on my chocolate", I'm looking for a "tagging" that does the following:
- Works with any flavor of TeX (Not LyX)
- Listing all tags;
- Listing all tags with reference to where in the document they appear;
- Listing only certain tags (for instance if there are 101 tags only listing the 5 that you might care about), or the flip side by listing all but some tags;
- These same tags, as is done in the
multiaudience
andtagging
packages, can also be used (without adding to the tag itself) to compile or not compile the "tagged" content.
Uses:
- To help analyze complex documents;
- To help structure complex documents;
- To help collaboration by "chopping down" the task of editing a particular subject to size by use of tags;
- To focus study of complex documents by use of tags;
- To allow for creation of simplified document assembly for different "audiences";
- To allow for simplified document assembly for different "clauses" to permit several uses for the same document.
- To assist with both collaboration and study by use of categories of "clauses" and categories of "audiences" by using tags.
Related post: Turning parts of text on and off where @cmhughes uses etoolbox
and the verbatim
packages together to show or hide text.
comment
package. Although it is not designed to do all you ask, you can do things like\includecomment{fordummies} \excludecomment{forexperts}
if you nest your paragraphs in the right environments. However, I think marking up a long and complex document with multiple tags the way you describe will prove to be more work than the pay-off will provide. (E.g., if the document is complex and requires study, the time will probably be better spent on studying it.)branchs
of LyX. They can be labelled by groups, listed (no page showed but linked to) filtered to reduce the list and activated/deactivated by groups . All at the LyX level (the exported LaTeX code will not have traces of the branches, only the content of the activated branches when exported).