I give a CellTag to my Input Cell, but the output cell would also inherit the CellTag.
Is it possible to control not inherit the CellTag?
Sometimes I need the output cell with the CellTag, but sometimes I don't need...
Application
I found another method is use another tags to do the same thing.
I want to select some cells with some tags, cells with "Ignore" tag will be omitted, only Input Style Cells with"Ignore1" tag will be omitted, Output Style Cells with "Ignore1" tag will be kept.
for example, I select the cells without "Ignore" and "Ignore1" tags.
Select[NotebookRead@Cells[EvaluationNotebook[]],
FreeQ[#, CellTags -> "Ignore"]&&FreeQ[#, CellTags -> "Ignore1"] &]
but this omit the output cells with "Ignore1", how to include these output cells?
This is my sub question, if the original question is unsolvable.
so the condition could be.
condition=FreeQ[#, CellTags -> "Ignore"] && (#[[2]] === "Output" &&
MemberQ[#, CellTags -> "Ignore1"]) &
One method
We've add a CellTags->"Ignore"
in the Input cell, just add a new CellTag, the the Output cell by CellPrint will tagged by new tag Hello
!
CellPrint@Cell["Test",CellTags->"Hello"]