todonotes: [inline] anzeigen, alle anderen ausblenden

Antwort erstellen


Diese Frage dient dazu, das automatisierte Versenden von Formularen durch Spam-Bots zu verhindern.
Smilies
:D :) :( :o :shock: :? 8) :lol: :-x :P :oops: :cry: :evil: :twisted: :roll: :wink: :!: :?: :idea: :arrow: :| :mrgreen:

BBCode ist eingeschaltet
[img] ist eingeschaltet
[flash] ist ausgeschaltet
[url] ist eingeschaltet
Smilies sind eingeschaltet

Die letzten Beiträge des Themas

Ich habe die Datenschutzerklärung gelesen und bin damit einverstanden.

   

Wenn du eine Datei oder mehrere Dateien anhängen möchtest, gib die Details unten ein.

Ansicht erweitern Die letzten Beiträge des Themas: todonotes: [inline] anzeigen, alle anderen ausblenden

von OKraftDD » Mi 13. Jan 2016, 13:23

Mir wurde geholfen:

You can have a look at the source code of the todonotes packages here on Github. In the file todonotes.dtx, on line 1618, todonotes defines the command \@todonotes@drawMarginNoteWithLine which prints the non-inline note. A simple way to remove all non-inline notes is to redefine this command to do nothing:
% Don't print any [non-inline] notes
\makeatletter
\renewcommand{\@todonotes@drawMarginNoteWithLine}{}
\makeatother
There is one problem with this approach: The ToDo note is still shown in the List of ToDo's. The command which adds items to the List of ToDo's is defined on lines 1649ff. To remove the non-inline notes, you can add an \if clause, which checks whether the current ToDo note is [inline] or not, and only call the command if it is inline:
% Remove [non-inline] notes from List of Todo's
\makeatletter
\renewcommand{\@todonotes@addElementToListOfTodos}{%
    % New: check if note is [inline]
    \if@todonotes@inlinenote%
    % if yes: print!, if no: do nothing
    \if@todonotes@colorinlistoftodos%
    \addcontentsline{tdo}{todo}{%
        \fcolorbox{\@todonotes@currentbordercolor}%
        {\@todonotes@currentbackgroundcolor}%
        {\textcolor{\@todonotes@currentbackgroundcolor}{o}}%
        \ \@todonotes@caption}%
    \else%
    \addcontentsline{tdo}{todo}{\@todonotes@caption}%
    \fi%
    \else%
    \fi}%
\makeatother

todonotes: [inline] anzeigen, alle anderen ausblenden

von OKraftDD » Di 12. Jan 2016, 23:21

Hallo Zusammen,

ich verwende das Todo-Paket
\usepackage{todonotes}
bei die Erstellung meiner Thesis.

Funktioniert soweit alles erst mal wunderbar.
\todo[inline]{Todo 1: Kommentare/ Todos zum Status - für Prof. / Lektor relevant}
\todo{Todo 2: Kommentare für den internen Gebrauch, also nur mich}
Nun möchte ich gern beim Generieren des Dokuments temporär die Todos der Kategorie 2 ausblenden, ohne alle Todos einzeln anfassen zu müssen. Da geht doch bestimmt etwas mit
\newcommand{}[]{}
oder?

Hier noch ein Minimalbeispiel:
\documentclass[%
]{scrreprt}

\usepackage{blindtext}  %lorem ipsum
\usepackage[colorinlistoftodos, ngerman]{todonotes}

\begin{document}

% list of todos
\listoftodos{}

% lorem ipsum
\blindtext
%Todo #1: comments/ todos about status for professor or lecture
\todo[inline]{Todo \#1: comments/ todos about status for professor or lecture}
% lorem ipsum
\blindtext
%Todo #2: comments for internal use. Just for me.
\todo{Todo \#2: comments for internal use. Just for me.}
% lorem ipsum
\blindtext

\end{document}
Bitte seid so nett und helft mir.

Danke euch!

OKraftDD

---

Das selbe Thema in einem anderen Forum: http://tex.stackexchange.com/questions/ ... all-others

Nach oben