Closed kohlhase closed 2 years ago
You mean like \ifstexhtml
? ;)
A more interesting example are bibliographies I think. Those we do want in the html, but they should only be actually served by e.g. MMT iff the current document fragment is not served as part of a larger document, in which case they're probably already captured by a bigger bibliography at the end. So we'd need an equivalent for \ifinputref
that still processes the content and puts it in the html, but marks it with some class which MMT knows to set to display:none
if it's not the "top-level document"
You mean like
\ifstexhtml
? ;)
Ah, I had forgotten that. Yes, something like that.
Only that (for the tocs) I now have to do \ifnotes\ifstexhtml\ifinputref.....
I will probably do something more convenient.
Only that (for the tocs) I now have to do
\ifnotes\ifstexhtml\ifinputref.....
I will probably do something more convenient.
careful, you probably mean \ifnotes\ifstexhtml\else\ifinputref...
;)
A more interesting example are bibliographies I think.
indeed. but I think they (together with indices and tocs and such things) are in the category of "generated content".
So conceptually there should not really be a problem for this class.
careful, you probably mean
\ifnotes\ifstexhtml\else\ifinputref...
;)
sure I wanted to say more that I have to care about all three switches.
Only that (for the tocs) I now have to do
\ifnotes\ifstexhtml\ifinputref.....
I will probably do something more convenient.
But in gerenal, that's fair - you want to check three distinct conditions, and it seems to me there's no clear overarching "meta-condition" that covers all three in principle.
I would suggest either something like \def\notespdfnoinput#1{\ifnotes\ifstexhtml\else\ifinputref\else#1\fi\fi\fi}
, or - since I suspect that this only occurs for the TOC - do an
\AtBeginDocument{\let\miko@old@toc\tableofcontents\def\tableofcontents{\ifnotes\ifstexhtml\else\ifinputref\else\miko@old@toc\fi\fi\fi}}
A more interesting example are bibliographies I think.
But even more interesting is the case of the syllabus. That is not generated content in the sense of above. But it is also part of the document boilerplate, and the document boilerplate needs to be handled differently, since it is heavily shared between documents in our context.
But even more interesting is the case of the syllabus.
I'm not entirely sure I understand the issues regarding the syllabus - isn't that only included in the top-level notes anyway? Are there multiple occurences? (Also: afaik, it's alway input using \inputref
, right? So ultimately it's not much of an issue if it comes up multiple times, since it's collapsed anyway...)
In the end I defined two macros \tociftopnotesnl
and tociftopnotes
in preamble.tex
that integrated the three switches.
Some stuff I have in (e.g.) the AI notes is only generated there for having suitably self-contained PDF documents. An example are the table of contents in the fragment files. They are useful to have in the PDfs, but should not enter the online course materials. Another example are the syllabi in the
notes/slides-part*.tex
documents. They should not be included either. And I am sure there are more situations like these. For this we should have a mechanism that formats them inpdflatex
, but not inRusTeX
. @Jazzpirate suggests just setting\tableofcontents
to\relax
, but I do not think that is going to be sufficient.