Quantcast
Channel: Antworten auf: Wie kann ich mir eine Sammlung paketunabhängiger Befehle anlegen?
Viewing all articles
Browse latest Browse all 3

Antwort von ctansearch

$
0
0
Open in writeLaTeX
\documentclass[a4paper]{article}\usepackage[utf8]{inputenc}\usepackage[T1]{fontenc}\usepackage[ngerman]{babel}\usepackage{filecontents}\begin{filecontents*}{usecommands.sty}%Eine Sammlung von paketunabhängigen Befehlen%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%       ****************************************%       *              USECOMMANDS  %       ****************************************%%% This file may be distributed and/or modified under the%% conditions of the LaTeX Project Public License, either version 1.2%% of this license or (at your option) any later version.%% The lambe version of this license is in%%    http://www.latex-project.org/lppl.txt%% and version 1.2 or later is part of all distributions of LaTeX%% version 1999/12/01 or later.%%ab hier nicht verändern\ProvidesPackage{usecommands}\RequirePackage{xcolor}%Dies ist eine Sammlung von Befehlen, für die es sich nicht lohnt, ein eigenes%Paket zu erstellen.\newcounter{usecommands}\newcommand{\tb}{\textbackslash}%\newcommand{\usecommands}{\setcounter{usecommands}{1}}%\newcommand{\origin}{usecommands.sty:\ }%\newcommand\newnotestype[1]{%\newcounter{#1note}%\expandafter\newwrite\csname the#1notes\endcsname%\expandafter\immediate\expandafter\openout%\csname the#1notes\endcsname=\jobname.#1\relax%\expandafter\newcommand\csname  #1note\endcsname[1]{%\refstepcounter{#1note}%{%\textcolor{red}{\small\textsuperscript{%\raisebox{1ex}{\hbox{\kern-0.0em c\csname
          the#1note\endcsname\kern-0.0em}}%}}%}%\expandafter\immediate\expandafter\write\csname the#1notes\endcsname{c\csname the#1note\endcsname\ \unexpanded{##1  \parskip=0pt \par}}%}%%\expandafter\newcommand\csname display#1notes\endcsname[1]{%\vspace{1\baselineskip}%\expandafter\immediate\expandafter\closeout%\csname the#1notes\endcsname%\par\small\textbf{##1}\par%\input\jobname.#1%}%}%\newnotestype{use}%\AtEndDocument{\ifnum\theusecommands=1\displayusenotes{usecommands}\fi}%%%bis hierhin nicht verändern\newcommand{\minitab}{%\parskip=1\baselineskip%\par%\begin{tabular}[c]{ccc}%Äpfel&Orangen&Pflaumen\\%
Limonen&Mandarinen&Bananen\\%\end{tabular}%\ifnum\theusecommands=1 \usenote{\origin\textit{unknown} Kleine Tabelle}\fi\par}%\newcommand{\mytext}{%\parskip=1\baselineskip%\par%\begin{quote}{``Ein Zitat''}\end{quote}%\ifnum\theusecommands=1 \usenote{\origin\textit{unknown} mytext}\fi\par}%\newcommand{\myitem}{%\parskip=1\baselineskip%\par%\begin{itemize}\itemÄpfel
\item Bohnen
\end{itemize}%\ifnum\theusecommands=1 \usenote{\origin\textit{unknown} myitem}\fi\par}%\newcommand{\myfatletter}[1]{%\parskip=1\baselineskip%\par%\textbf{#1}\ifnum\theusecommands=1 \usenote{\origin\textit{ctansearch} myfatletter}\fi\par}%\endinput%\end{filecontents*}\usepackage{usecommands}\begin{document}\usecommands
Viel Text. Viel Text. Viel Text. Viel Text. Viel Text. Viel Text. Viel
Text. Viel Text. Viel Text. Viel Text. \myfatletter{Viel Text.} Viel Text. Viel Text. \minitab
Viel Text. Viel Text. Viel Text. Viel Text. Viel Text. Viel Text. Viel
Text. \myitem Viel Text. Viel Text. Viel Text. Viel Text. Viel Text\mytext  Viel Text.\myitem\end{document}

Viewing all articles
Browse latest Browse all 3

Latest Images

Trending Articles