Paket auf CTAN hochladen?

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: Paket auf CTAN hochladen?

von Epllus » Do 7. Feb 2013, 14:03

Ich ist der Code vollständig in LaTeX2e Syntax geschrieben (habe das Paket expl3 etc. rausgenommen).

Dann werde ich mal die Doku schreiben (mittels dostrip; habe schon die passende Anleitung gefunden)

Grüße
Epllus

von Besserwisser » Do 7. Feb 2013, 09:04

Wenn Du eine Anleitung dazu schreibst, spricht meiner Meinung nach nichts dagegen. Ideal wäre natürlich, wenn Du docstrip (bzw. docstripx) verwenden würdest. Bevor Du das machst, hätte ich aber noch eine Frage:

Warum lädst Du expl3, schaltest die Syntax hin und her, verwendest selbst aber kein expl3? Für \usetikzlibrary ist es nicht notwendig, auf expl-Syntax umzuschalten. Statt \ProvidesExplPackage könntest Du auch einfach \ProvidesPackage verwenden. Damit hättest Du ein normales LaTeX2e-Paket. Wenn Du hingegen expl3 verwenden möchtest, dann solltest Du das auch durchgehend tun und nicht nur für \ProvidesExplPackage. Du könntest das beispielsweise nutzen, um Deinen Symbolen optionale Argumente für die Größe beizubringen. Natürlich könnte man auch das mit LaTeX2e-Syntax.

Paket auf CTAN hochladen?

von Epllus » Mi 6. Feb 2013, 22:39

Während eines Projekts definierte ich mittels "tikz" Symbole zur visuellen Darstellung von (Küchen)Gegenständen und weil ich Spaß an der Sache hatte, kamen auch noch ein paar Emoticons dazu.
Aus Gründen der Übersichtlichkeit (und aus Neugier) packte ich diese Symbole in eine eigene .sty Datei, besorgte mir ein paar Codesegmente aus dem Internet für die Einbindung von "\usetikzlibrary" und irgendwie überlege ich mir jetzt, ob ich nicht vielleicht diese .sty Datei auf CTAN hochlade.

Allerdings bin ich mir unsicher ob ich das tun sollte und wollte nachfragen, ob es wirklich eine "gute" Idee ist, diese Datei hochzuladen, vor allem wenn man (wie ich) keine Ahnung von programmieren hat, oder ob das jugendlicher Übermut (und zu viel Neugier) ist und ich es lieber bleiben lassen soll.

Um es anders zu formulieren: Ist es eine "gute" Idee, wenn jemand, der von LaTeX Programmierung keine Ahnung hat ein Paket, das hauptsächlich aus tikz-code besteht auf CTAN hochladet? Oder sollte ich es lieber sein lassen.

Anbei, ein paar Beispiel mit ein paar Code-Segmenten:
\RequirePackage{filecontents}
\begin{filecontents}{tikzsymbols.sty}
\RequirePackage{expl3}[2012/12/21]
\ProvidesExplPackage{tikzsymbols}{2013/01/19} {0.1}{Some symbols created with tikz.}
\RequirePackage{xargs}
\RequirePackage{tikz}
\RequirePackage{xspace}
\RequirePackage{etoolbox}
\ExplSyntaxOff
\patchcmd
  {\use@@tikzlibrary}
  {\input tikzlibrary\pgf@temp .code.tex}
  {%
    \@pushfilename
    \input tikzlibrary\pgf@temp .code.tex %
    \@popfilename
  }%
  {}{}
\ExplSyntaxOn
\usetikzlibrary{arrows,decorations.pathmorphing,backgrounds,positioning,fit,petri,trees}%
\ExplSyntaxOff
\newcommand{\MySymbolAfterSymbolinput}{\xspace}

\DeclareRobustCommand{\Kochtopf}[1][1]{%
\begin{tikzpicture}[x=2ex,y=2.2ex, line width=0.07ex*#1,scale=#1]
\draw[rounded corners=0.2ex*#1] (0,0.5) -- (0,0) -- (1,0) -- (1,0.5);
\draw(0,0.4) arc (90:270:0.1);
\draw(1,0.4) arc (90:-90:0.1);
\draw (0,0.5) -- (1,0.5) .. controls (1,0.6) and (0,0.6) .. (0,0.5);
\draw (0.6,0.585) arc (0:180:0.1);
\draw[decorate,decoration={snake,amplitude=.12ex*#1,segment length=0.93ex*#1}] (0,0.35) -- (1,0.35);
\draw (0.1,0.25) circle (0.04);
\draw (0.3,0.2) circle (0.04);
\draw (0.13, 0.125) circle (0.04);
\draw (0.6,0.25) circle (0.04);
\draw (0.45,0.1) circle (0.04);
\draw (0.88,0.2) circle (0.04);
\draw (0.7,0.11) circle (0.04);
\end{tikzpicture}%
\MySymbolAfterSymbolinput%
}

\DeclareRobustCommand{\Schneebesen}[1][1]{%
\begin{tikzpicture}[y=2.1ex,x=1.4ex, scale=#1]
\draw[line width=0.01ex*(#1-.#1*3)] (0,0) .. controls (0.2,0.0) and 		(0.2,0.2) .. 		(0,0.4);
\draw[line width=0.01ex*(#1-.#1*3)] (0,0) .. controls (-0.2,0.0) and 		(-0.2,0.2) .. 	(0,0.4);
\draw[line width=0.01ex*(#1-.#1*3)] (0,0) .. controls (-0.1,0.0) and 		(-0.1,0.2) .. 	(0,0.4);
\draw[line width=0.01ex*(#1-.#1*3)] (0,0) .. controls (0.1,0.0) and 		(0.1,0.2) .. 		(0,0.4);
\draw[line width=0.01ex*(#1-.#1*3)] (0,0) .. controls (-0.15,0.0) and 	(-0.15,0.2) .. 	(0,0.4);
\draw[line width=0.01ex*(#1-.#1*3)] (0,0) .. controls (0.15,0.0) and 	(0.15,0.2) .. 	(0,0.4);
\draw[line width=0.01ex*(#1-.#1*3)] (0,0) .. controls (-0.05,0.0) and	(-0.05,0.2) .. 	(0,0.4);
\draw[line width=0.01ex*(#1-.#1*3)] (0,0) .. controls (0.05,0.0) and 	(0.05,0.2) .. 	(0,0.4);
\draw[line width=0.01ex*(#1-.#1*3)] (0,0) --(0,0.4);
\fill[line width=0.05ex*#1, rounded corners=0.07ex*#1] (-0.05,0.37) -- (0.05,0.37) -- (0.05,0.75) -- (-0.05,0.75) -- cycle;
\end{tikzpicture}%
\MySymbolAfterSymbolinput%
}


\DeclareRobustCommandx{\Winkey}[2][1=1,2={opacity=0} ,usedefault]{%
\begin{tikzpicture}[x=2.4ex, y=2.4ex, line width=0.12ex*#1,scale=#1]
\fill[#2, line width=0.12ex*#1] (0,0) circle (0.33);
\draw[line width=0.12ex*#1] (0,0) circle (0.33);
\draw(0.15,0.1) -- (0.05,0.1);
\fill (-0.1,0.1) circle (0.05);
\draw (-0.2,-0.1) .. controls (-0.1,-0.2) and (0.15,-0.2) .. (0.2,0);
\end{tikzpicture}%
\MySymbolAfterSymbolinput%
}
% Zwinkerndes Smiley
\DeclareRobustCommandx{\dWinkey}[2][1=1,2=yellow,usedefault]{%
\begin{tikzpicture}[x=2.4ex, y=2.4ex, line width=0.12ex*#1,scale=#1]
\shade[ball color=#2] (0,0) circle (0.33);
\draw(0.15,0.1) -- (0.05,0.1);
\shade[ball color=black] (-0.1,0.1) circle (0.05);
\draw (-0.2,-0.1) .. controls (-0.1,-0.2) and (0.15,-0.2) .. (0.2,0);
\end{tikzpicture}%
\MySymbolAfterSymbolinput%
}

\DeclareRobustCommandx{\Cat}[1][1=1,usedefault]{%
\begin{tikzpicture}[x=2.33ex,y=2.33ex, line width=0.093ex*#1,scale=#1]
\draw (0,0) circle (0.3);
\draw[rounded corners=0.163ex*#1] (-0.3,0) -- (-0.35,0.5) -- (0,0.3);
\draw[rounded corners=0.163ex*#1] (0,0.3) -- (0.35,0.5) -- (0.3,0);
\fill (-0.15,.15) circle (0.05);
\fill (0.15,.15) circle (0.05);
\draw[rounded corners=0.175ex*#1,yshift=-0.12ex] (0,0) -- (0,-0.1) -- (-0.1,-0.095);
\draw[rounded corners=0.175ex*#1,yshift=-0.12ex] (0,0) -- (0,-0.1) -- (0.1,-0.095);
\draw[rounded corners=.12ex*#1,yshift=-.15ex, line width=0.03em*(#1-.#1)] (-0.1,0.1) -- (0,0) -- (0.1,0.1) -- cycle ;
\draw[line width=0.035ex*#1](-0.1,-0.05)..controls(-0.25,0)and(-0.35,0).. (-0.4,-0.05);
\draw[line width=0.035ex*#1, ](-0.1,-0.05)..controls(-0.25,-0.01)and(-0.35,-0.09).. (-0.4,-0.14);
\draw[line width=0.035ex*#1, ](-0.1,-0.05)..controls(-0.25,-0.045)and(-0.35,-0.13).. (-0.4,-0.23);
\draw[line width=0.035ex*#1](0.1,-0.05)..controls(0.25,0)and(0.35,0).. (0.4,-0.05);
\draw[line width=0.035ex*#1 ](0.1,-0.05)..controls(0.25,-0.01)and(0.35,-0.09).. (0.4,-0.14);
\draw[line width=0.035ex*#1](0.1,-0.05)..controls(0.25,-0.045)and(0.35,-0.13).. (0.4,-0.23);
\end{tikzpicture}%
\MySymbolAfterSymbolinput%
}

\end{filecontents}
\documentclass{scrartcl}
\usepackage{tikzsymbols}
\begin{document}
Dies ist \Cat eine Katze, ein \Kochtopf Kochtopf, ein zwinkerndes Smiley \Winkey und noch eins \dWinkey etc. 

Eine große Katze \Cat[4] etc.
\end{document}

Nach oben