<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Matthias Pospiech &#187; LaTeX</title>
	<atom:link href="http://www.matthiaspospiech.de/blog/category/latex/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.matthiaspospiech.de</link>
	<description></description>
	<lastBuildDate>Sun, 08 Jan 2012 16:47:39 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=</generator>
		<item>
		<title>Erstellung von Bachelor und Masterarbeiten mit LaTeX</title>
		<link>http://www.matthiaspospiech.de/blog/2011/12/09/erstellung-von-bachelor-und-masterarbeiten-mit-latex/</link>
		<comments>http://www.matthiaspospiech.de/blog/2011/12/09/erstellung-von-bachelor-und-masterarbeiten-mit-latex/#comments</comments>
		<pubDate>Fri, 09 Dec 2011 07:22:29 +0000</pubDate>
		<dc:creator>pospiech</dc:creator>
				<category><![CDATA[LaTeX]]></category>
		<category><![CDATA[Vortrag]]></category>

		<guid isPermaLink="false">http://www.matthiaspospiech.de/?p=625</guid>
		<description><![CDATA[Im Rahmen meiner Lehrverpflichtungen an der Leibniz Universit&#228;t Hannover habe ich die folgende Vorlesung zur Erstellung von Bachelor und Masterarbeiten mit LaTeX gehalten Die Verlesung richtetete sich an Studenten mit Vorkenntnissen in LaTeX, da die Inhalte hier die speziellen Probleme beim Schreiben von Abschlussarbeiten sein sollten. Effektiv habe ich aber auch grundlegende Kenntnisse wiederholt. Die [...]
<div class="related-posts">
<h4>Related Posts</h4>
<ol>
		<li><a href="http://www.matthiaspospiech.de/blog/2011/05/15/latex-einfuehrung/" rel="bookmark">LaTeX Einf&#252;hrung</a><!-- (12.4)--></li>
		<li><a href="http://www.matthiaspospiech.de/blog/2011/10/16/einfuhrung-in-bibliographien-mit-latex-biblatex-und-biber/" rel="bookmark">Einf&#252;hrung in Bibliographien mit LaTeX, biblatex und biber.</a><!-- (7.4)--></li>
		<li><a href="http://www.matthiaspospiech.de/blog/2007/08/08/latex-wiki/" rel="bookmark">LaTeX Wiki</a><!-- (7.1)--></li>
	</ol>
</div>
]]></description>
			<content:encoded><![CDATA[<p>Im Rahmen meiner Lehrverpflichtungen an der Leibniz Universit&#228;t Hannover habe ich die folgende Vorlesung zur Erstellung von Bachelor und Masterarbeiten mit LaTeX gehalten</p>
<ul>
	<li>Note: There is a file embedded within this post, please visit this post to download the file.</li>
	<li>Note: There is a file embedded within this post, please visit this post to download the file.</li>
</ul>

<p>Die Verlesung richtetete sich an Studenten mit Vorkenntnissen in LaTeX, da die Inhalte hier die speziellen Probleme beim Schreiben von Abschlussarbeiten sein sollten. Effektiv habe ich aber auch grundlegende Kenntnisse wiederholt. Die folgenden Kenntnisse wurde in der Vorlesungsank&#252;ndigung vorausgesetzt:</p> 
<ul>
	<li>Syntax von Klassen, Befehlen, Umgebungen und Sonderzeichen</li>
	<li>Grundlegende Pakete f&#252;r die Pr&#228;ambel (babel, inputenc, graphicx, amsmath, . . .).</li>
	<li>Textsatz (Kapitel, Abschnitte, Listen, Paragraphen)</li>
	<li>Mathematik: einzeilige Formeln</li>
	<li>Einbinden von Bildern</li>
	<li>einfache Tabellen</li>
</ul>

<p>Dementsprechend waren die teilnehmenden Studenten mehrheitlich am Ende ihres Bachelor oder Anfang des Masterstudiums. Die meisten kamen aus meiner Fakult&#228;t (Mathematik/Physik), aber es waren auch Informatiker und Lehramtstudenten dabei.</p>

<p>Voraussetzung f&#252;r den Kurs war eine vollst&#228;ndige Installation von Miktex 2.9 oder TeX Live 2011, sowie der Editor <a href="http://sourceforge.net/projects/texstudio/" class="liexternal">TexStudio</a>. Der Editor selber stellte f&#252;r keinen der Studenten ein Problem dar. Allerdings ist es empfehlenswert die voreingestellten Optionen anzupassen. Problematisch waren hingegen die Distributionen. Fast alle Studenten hatten nur die Minimalversion von Miktex installiert, die nicht ann&#228;hernd ausreicht. Und die Installation von TeXLive unter Linux, spezieller Ubunutu ist eine Katastrophe. Die Version der Distribution ist von 2009 und damit f&#252;r den Kurs nicht verwendbar, da ich siunitx und biblatex verwende. Eine manuelle Installation von der 2011er Version nach der <a href="http://www.tug.org/texlive/quickinstall.html" class="liexternal">Originalanleitung</a> funktioniert nicht. Man muss auf spezielle Ubunutu Anleitungen zur&#252;ckgreifen. Effektiv hatte die mehrheit der Studenten zu Beginn der Vorlesung ein nicht verwendbares LaTeX System.</p>

<p>Die Vorlesung umfasste 6 Vorlesungstermine mit jeweils 2-3 Zeitstunden. Die Inhalte waren:</p>

<ul>
	<li>Installation, Vorkenntnisse, Begriffe, Editor (TexStudio)</li>
	<li>Kapitel, &#220;berschriften, Paragraphen</li>
	<li>Strukturierung des Inhaltes</li>
	<li>Verweise</li>
	<li>Seitenlayout</li>
	<li>Aufteilung komplexer Dokumente</li>
	<li>Schriften</li>
	<li>Silbentrennung</li>
	<li>Literaturverzeichnis (mit biblatex und biber)</li>
	<li>Literatur erstellen und verwalten (JabRef)</li>
	<li>Mathematik und Einheiten (siunitx)</li>
	<li>Abbildungen und Beschriftungen</li>
	<li>Tabellen</li>
	<li>Fragen und Antworten</li>
	<li>sonstiges (tikz/pgf, pgfplots)</li>
</ul>




<div class="related-posts">
<h4>Related Posts</h4>
<ol>
		<li><a href="http://www.matthiaspospiech.de/blog/2011/05/15/latex-einfuehrung/" rel="bookmark">LaTeX Einf&#252;hrung</a><!-- (12.4)--></li>
		<li><a href="http://www.matthiaspospiech.de/blog/2011/10/16/einfuhrung-in-bibliographien-mit-latex-biblatex-und-biber/" rel="bookmark">Einf&#252;hrung in Bibliographien mit LaTeX, biblatex und biber.</a><!-- (7.4)--></li>
		<li><a href="http://www.matthiaspospiech.de/blog/2007/08/08/latex-wiki/" rel="bookmark">LaTeX Wiki</a><!-- (7.1)--></li>
	</ol>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.matthiaspospiech.de/blog/2011/12/09/erstellung-von-bachelor-und-masterarbeiten-mit-latex/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Einf&#252;hrung in Bibliographien mit LaTeX, biblatex und biber.</title>
		<link>http://www.matthiaspospiech.de/blog/2011/10/16/einfuhrung-in-bibliographien-mit-latex-biblatex-und-biber/</link>
		<comments>http://www.matthiaspospiech.de/blog/2011/10/16/einfuhrung-in-bibliographien-mit-latex-biblatex-und-biber/#comments</comments>
		<pubDate>Sun, 16 Oct 2011 11:24:25 +0000</pubDate>
		<dc:creator>pospiech</dc:creator>
				<category><![CDATA[LaTeX]]></category>
		<category><![CDATA[biber]]></category>
		<category><![CDATA[bibtex]]></category>
		<category><![CDATA[Word]]></category>

		<guid isPermaLink="false">http://www.matthiaspospiech.de/?p=622</guid>
		<description><![CDATA[Im Rahmen eines Arbeitsgruppenseminars der AG Morgner wurde der folgende Vortrag zur Einf&#252;hrung in Bibliographien mit LaTeX gehalten. Zielpublikum waren Masterstudenten und Doktoranden, die zuvor schon mit Bibtex gearbeitet hatten. Related Posts C++ Vortrag: Grundlagen und Objektorientierte Programmierung 2 Erstellung von Bachelor und Masterarbeiten mit LaTeX LaTeX Einf&#252;hrung
<div class="related-posts">
<h4>Related Posts</h4>
<ol>
		<li><a href="http://www.matthiaspospiech.de/blog/2010/09/07/c-vortrag-grundlagen-und-objektorientierte-programmierung-2/" rel="bookmark">C++ Vortrag: Grundlagen und Objektorientierte Programmierung 2</a><!-- (10.4)--></li>
		<li><a href="http://www.matthiaspospiech.de/blog/2011/12/09/erstellung-von-bachelor-und-masterarbeiten-mit-latex/" rel="bookmark">Erstellung von Bachelor und Masterarbeiten mit LaTeX</a><!-- (8.8)--></li>
		<li><a href="http://www.matthiaspospiech.de/blog/2011/05/15/latex-einfuehrung/" rel="bookmark">LaTeX Einf&#252;hrung</a><!-- (7.3)--></li>
	</ol>
</div>
]]></description>
			<content:encoded><![CDATA[<p>Im Rahmen eines Arbeitsgruppenseminars der 
<a href="http://www.iqo.uni-hannover.de/ultrafastlaseroptics.html" title="AG Morgner" class="liexternal">AG Morgner</a> 
wurde der folgende Vortrag zur Einf&#252;hrung in Bibliographien mit LaTeX gehalten. Zielpublikum 
waren Masterstudenten und Doktoranden, die zuvor schon mit Bibtex gearbeitet hatten.</p>
<ul>
	<li>Note: There is a file embedded within this post, please visit this post to download the file.</li>
	<li>Note: There is a file embedded within this post, please visit this post to download the file.</li>
</ul>


<div class="related-posts">
<h4>Related Posts</h4>
<ol>
		<li><a href="http://www.matthiaspospiech.de/blog/2010/09/07/c-vortrag-grundlagen-und-objektorientierte-programmierung-2/" rel="bookmark">C++ Vortrag: Grundlagen und Objektorientierte Programmierung 2</a><!-- (10.4)--></li>
		<li><a href="http://www.matthiaspospiech.de/blog/2011/12/09/erstellung-von-bachelor-und-masterarbeiten-mit-latex/" rel="bookmark">Erstellung von Bachelor und Masterarbeiten mit LaTeX</a><!-- (8.8)--></li>
		<li><a href="http://www.matthiaspospiech.de/blog/2011/05/15/latex-einfuehrung/" rel="bookmark">LaTeX Einf&#252;hrung</a><!-- (7.3)--></li>
	</ol>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.matthiaspospiech.de/blog/2011/10/16/einfuhrung-in-bibliographien-mit-latex-biblatex-und-biber/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>LaTeX-Vorlage f&#252;r Protokolle</title>
		<link>http://www.matthiaspospiech.de/blog/2011/05/15/latex-vorlage-fuer-protokolle/</link>
		<comments>http://www.matthiaspospiech.de/blog/2011/05/15/latex-vorlage-fuer-protokolle/#comments</comments>
		<pubDate>Sun, 15 May 2011 21:08:45 +0000</pubDate>
		<dc:creator>pospiech</dc:creator>
				<category><![CDATA[LaTeX]]></category>
		<category><![CDATA[Protokoll]]></category>
		<category><![CDATA[Vorlage]]></category>

		<guid isPermaLink="false">http://www.matthiaspospiech.de/?p=534</guid>
		<description><![CDATA[Neue LaTeX-Vorlage zur Erstellung von Labor-Protokollen: Die Vorlage beruht auf Koma Script (scrartcl) und ist f&#252;r pdflatex ausgelegt (kein LuaTeX oder XeteX). Unter anderem werden diese Pakete verwendet: inputenc, grffile, fontenc, textcomp, lmodern, babel, xcolor, graphicx, epstopdf, caption, amsmath, siunitx, booktabs, tabularx, setspace, scrpage2, microtype. Anpassungen im Layout wurden mit koma script Optionen sowie den [...]
<div class="related-posts">
<h4>Related Posts</h4>
<ol>
		<li><a href="http://www.matthiaspospiech.de/blog/2007/06/25/syntaxhighlighting-von-latex-in-webseiten/" rel="bookmark">Syntaxhighlighting von LaTeX in Webseiten</a><!-- (11.5)--></li>
		<li><a href="http://www.matthiaspospiech.de/blog/2008/08/04/alternatives-syntaxhighlighting/" rel="bookmark">Alternatives Syntaxhighlighting</a><!-- (10.3)--></li>
		<li><a href="http://www.matthiaspospiech.de/blog/2011/12/09/erstellung-von-bachelor-und-masterarbeiten-mit-latex/" rel="bookmark">Erstellung von Bachelor und Masterarbeiten mit LaTeX</a><!-- (10.2)--></li>
	</ol>
</div>
]]></description>
			<content:encoded><![CDATA[<p>Neue LaTeX-Vorlage zur Erstellung von Labor-Protokollen:</p>
Note: There is a file embedded within this post, please visit this post to download the file.

<p>Die Vorlage beruht auf Koma Script (scrartcl) und ist f&#252;r pdflatex ausgelegt (kein LuaTeX oder XeteX).
Unter anderem werden diese Pakete verwendet: inputenc, grffile, fontenc, textcomp, lmodern, babel, xcolor, graphicx, epstopdf, caption, amsmath, siunitx, booktabs, tabularx, setspace, scrpage2, microtype. Anpassungen im Layout wurden mit koma script Optionen sowie den Einstellungsm&#246;glichkeiten der Pakete caption und scrpage2 vorgenommen.</p>

<div class="related-posts">
<h4>Related Posts</h4>
<ol>
		<li><a href="http://www.matthiaspospiech.de/blog/2007/06/25/syntaxhighlighting-von-latex-in-webseiten/" rel="bookmark">Syntaxhighlighting von LaTeX in Webseiten</a><!-- (11.5)--></li>
		<li><a href="http://www.matthiaspospiech.de/blog/2008/08/04/alternatives-syntaxhighlighting/" rel="bookmark">Alternatives Syntaxhighlighting</a><!-- (10.3)--></li>
		<li><a href="http://www.matthiaspospiech.de/blog/2011/12/09/erstellung-von-bachelor-und-masterarbeiten-mit-latex/" rel="bookmark">Erstellung von Bachelor und Masterarbeiten mit LaTeX</a><!-- (10.2)--></li>
	</ol>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.matthiaspospiech.de/blog/2011/05/15/latex-vorlage-fuer-protokolle/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>LaTeX Einf&#252;hrung</title>
		<link>http://www.matthiaspospiech.de/blog/2011/05/15/latex-einfuehrung/</link>
		<comments>http://www.matthiaspospiech.de/blog/2011/05/15/latex-einfuehrung/#comments</comments>
		<pubDate>Sun, 15 May 2011 16:44:24 +0000</pubDate>
		<dc:creator>pospiech</dc:creator>
				<category><![CDATA[LaTeX]]></category>
		<category><![CDATA[Einführung]]></category>
		<category><![CDATA[Vortrag]]></category>

		<guid isPermaLink="false">http://www.matthiaspospiech.de/?p=528</guid>
		<description><![CDATA[Im Rahmen eines Workshops der jDPG Hannover wurde der folgende Vortrag zur Einf&#252;hrung in LaTeX gehalten: Das Publikum bestand aus Physik-Studenten des 2ten Semesters. Der Vortrag und die dazu abgehaltenen &#220;bungen umfassten 4 Stunden. Dieser Zeitraum reichte aus, um grundlegende Konzepte zu erkl&#228;ren, allerdings nicht um alle ben&#246;tigten Inhalte zum Schreiben einer Abschlussarbeit zu behandeln. [...]
<div class="related-posts">
<h4>Related Posts</h4>
<ol>
		<li><a href="http://www.matthiaspospiech.de/blog/2011/12/09/erstellung-von-bachelor-und-masterarbeiten-mit-latex/" rel="bookmark">Erstellung von Bachelor und Masterarbeiten mit LaTeX</a><!-- (11.2)--></li>
		<li><a href="http://www.matthiaspospiech.de/blog/2007/08/08/latex-wiki/" rel="bookmark">LaTeX Wiki</a><!-- (6.4)--></li>
		<li><a href="http://www.matthiaspospiech.de/blog/2011/10/16/einfuhrung-in-bibliographien-mit-latex-biblatex-und-biber/" rel="bookmark">Einf&#252;hrung in Bibliographien mit LaTeX, biblatex und biber.</a><!-- (6.4)--></li>
	</ol>
</div>
]]></description>
			<content:encoded><![CDATA[<p>Im Rahmen eines Workshops der <a href="http://www.dpg-physik.de/dpg/gliederung/junge/rg/hannover/index.html" class="liexternal">jDPG Hannover</a> wurde der folgende Vortrag zur Einf&#252;hrung in LaTeX gehalten:</p>
<ul>
	<li>Note: There is a file embedded within this post, please visit this post to download the file.</li>
	<li>Note: There is a file embedded within this post, please visit this post to download the file.</li>
	<li>Note: There is a file embedded within this post, please visit this post to download the file.</li>
</ul>

<p>Das Publikum bestand aus Physik-Studenten des 2ten Semesters. Der Vortrag und die dazu abgehaltenen &#220;bungen umfassten 4 Stunden. Dieser Zeitraum reichte aus, um grundlegende Konzepte zu erkl&#228;ren, allerdings nicht um alle ben&#246;tigten Inhalte zum Schreiben einer Abschlussarbeit zu behandeln. Insbesondere Labels/Referenzen, Zitate und Literaturverzeichnisse sowie die Strukturierung in verschiedene Dokumente mit <code>\input</code> bzw <code>\include</code> war in diesem Zeitrahmen nicht mehr m&#246;glich. Das Ziele war allerdings auch zun&#228;chst die Studenten zu bef&#228;higen 3-5 seitige Praktikumsberichte anzufertigen, wof&#252;r diese Inhalte nicht ben&#246;tigt werden.</p>

<p>Voraussetzung f&#252;r den Kurs war eine vollst&#228;ndige Installation von Miktex 2.9 oder TeX Live 2010, sowie der Editor <a href="http://texmakerx.sourceforge.net/" class="liexternal">TexMakerX</a>. Im vorangegangenen Jahr war TeXnicCenter als Editor verwendet worden, was aber dazu gef&#252;hrt hatte, dass viele Studenten prim&#228;r Probleme mit dem Editor hatte. Derartige Probleme konnten diesmal nicht beobachtet werden. Interessanterweise war der Tabellenassistent von besonderem Interesse. </p>

In den &#220;bungen hatten die Studenten, soweit ich das mitbekommen habe, die folgenden Probleme:
<ul>
	<li>Der Unterschied in den Optionen zwischen article und scrartcl war verwirrend. Da ich nicht auf die Analyse von Fehlermeldungen im Vortrag eingegangen bin, hatten die Studenten auch nicht auf die Warnungen geachtet (&#8216;unused option&#8217;).</li>
	<li>Da <code>\text</code>, <code>\mathrm</code> und <code>\si</code> (siunitx) im Mathematikmodus aufrechte Schriften erzeugen wurde der Unterschied zwischen den Befehlen nicht klar.</li>
</ul>

Konzeptionell w&#252;rde ich beim n&#228;chsten Mal, sofern mehr Zeit zur Verf&#252;gung steht
<ul>
	<li>den grundlegenden Umgang mit einem Texteditor mit Tastaturkommandos &#252;ben lassen,</li>
	<li>den Unterschied zwischen Distribution und Editor st&#228;rker hervorheben (wie auch immer), </li>
	<li>das Verstehen von Fehlermeldungen und das Erstellen eines Minimalbeispiels behandeln </li>
	<li>sowie das Auffinden und gezielte Lesen von Dokumentationen ein&#252;ben.</li>
</ul>

<div class="related-posts">
<h4>Related Posts</h4>
<ol>
		<li><a href="http://www.matthiaspospiech.de/blog/2011/12/09/erstellung-von-bachelor-und-masterarbeiten-mit-latex/" rel="bookmark">Erstellung von Bachelor und Masterarbeiten mit LaTeX</a><!-- (11.2)--></li>
		<li><a href="http://www.matthiaspospiech.de/blog/2007/08/08/latex-wiki/" rel="bookmark">LaTeX Wiki</a><!-- (6.4)--></li>
		<li><a href="http://www.matthiaspospiech.de/blog/2011/10/16/einfuhrung-in-bibliographien-mit-latex-biblatex-und-biber/" rel="bookmark">Einf&#252;hrung in Bibliographien mit LaTeX, biblatex und biber.</a><!-- (6.4)--></li>
	</ol>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.matthiaspospiech.de/blog/2011/05/15/latex-einfuehrung/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Installation of Fonts in Miktex</title>
		<link>http://www.matthiaspospiech.de/blog/2008/10/07/installation-of-fonts-in-miktex/</link>
		<comments>http://www.matthiaspospiech.de/blog/2008/10/07/installation-of-fonts-in-miktex/#comments</comments>
		<pubDate>Tue, 07 Oct 2008 09:31:42 +0000</pubDate>
		<dc:creator>pospiech</dc:creator>
				<category><![CDATA[LaTeX]]></category>
		<category><![CDATA[Fonts]]></category>
		<category><![CDATA[Miktex]]></category>

		<guid isPermaLink="false">http://www.matthiaspospiech.de/blog/2008/10/07/installation-of-fonts-in-miktex/</guid>
		<description><![CDATA[I have several Type1 fonts which need to be installed such that LaTeX knows about them. To achive this under Miktex you have to follow these steps: Setup you localtexmf tree with the fonts or copy your localtexmf tree from a different installation into the corresponding Miktex directory. Run initexmf --edit-config-file updmap. That will open [...]
<div class="related-posts">
<h4>Related Posts</h4>
<ol>
		<li><a href="http://www.matthiaspospiech.de/blog/2007/04/03/installation-of-opensuse-102/" rel="bookmark">Installation of openSuse 10.2</a><!-- (6.7)--></li>
		<li><a href="http://www.matthiaspospiech.de/blog/2010/10/24/batch-script-for-automatic-backup-using-winrar/" rel="bookmark">batch script for automatic backup using winrar</a><!-- (6)--></li>
		<li><a href="http://www.matthiaspospiech.de/blog/2007/03/11/grub-installation/" rel="bookmark">Grub installation</a><!-- (5.5)--></li>
	</ol>
</div>
]]></description>
			<content:encoded><![CDATA[<p>I have several Type1 fonts which need to be installed such that LaTeX knows about them. To achive this under Miktex you have to follow these steps:</p>
<ol>
	<li>Setup you localtexmf tree with the fonts or copy your localtexmf tree from a different installation into the corresponding Miktex directory.</li>
	<li>Run <code>initexmf --edit-config-file updmap</code>. That will open an editor.</li>
	<li>Insert in that file all map files in the following form:<pre><code>Map xyz.map</code></pre> Save the file afterwards.</li>
	<li>Run <code>initexmf --mkmaps</code> to rebuild the font map files.</li>
</ol>







<div class="related-posts">
<h4>Related Posts</h4>
<ol>
		<li><a href="http://www.matthiaspospiech.de/blog/2007/04/03/installation-of-opensuse-102/" rel="bookmark">Installation of openSuse 10.2</a><!-- (6.7)--></li>
		<li><a href="http://www.matthiaspospiech.de/blog/2010/10/24/batch-script-for-automatic-backup-using-winrar/" rel="bookmark">batch script for automatic backup using winrar</a><!-- (6)--></li>
		<li><a href="http://www.matthiaspospiech.de/blog/2007/03/11/grub-installation/" rel="bookmark">Grub installation</a><!-- (5.5)--></li>
	</ol>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.matthiaspospiech.de/blog/2008/10/07/installation-of-fonts-in-miktex/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Alternatives Syntaxhighlighting</title>
		<link>http://www.matthiaspospiech.de/blog/2008/08/04/alternatives-syntaxhighlighting/</link>
		<comments>http://www.matthiaspospiech.de/blog/2008/08/04/alternatives-syntaxhighlighting/#comments</comments>
		<pubDate>Mon, 04 Aug 2008 19:40:27 +0000</pubDate>
		<dc:creator>pospiech</dc:creator>
				<category><![CDATA[LaTeX]]></category>
		<category><![CDATA[Geshi]]></category>

		<guid isPermaLink="false">http://www.matthiaspospiech.de/blog/2008/08/04/alternatives-syntaxhighlighting/</guid>
		<description><![CDATA[Hier das neue Syntaxhighlighting von LaTeX in geshi % Beispieldokument \documentclass[a4paper, 11pt,german]{scrartcl} \usepackage{lmodern} \usepackage{textcomp} \usepackage[german]{babel} \usepackage[T1]{fontenc} \usepackage[latin1]{inputenc} \usepackage{graphicx} &#160; \makeatletter % Check for 'draft' mode - commands. \newcommand{\IfDraft}[1]{\ifx\@draft\@undefined \else #1 \fi} \makeatother &#160; \begin{document} $ a = b + c $ \begin{equation} a = b + c \end{equation} \begin{figure} \includegraphics{Bild.png} \end{figure} \section{Einleitung} Dies ist ein [...]
<div class="related-posts">
<h4>Related Posts</h4>
<ol>
		<li><a href="http://www.matthiaspospiech.de/blog/2007/06/25/syntaxhighlighting-von-latex-in-webseiten/" rel="bookmark">Syntaxhighlighting von LaTeX in Webseiten</a><!-- (19.9)--></li>
		<li><a href="http://www.matthiaspospiech.de/blog/2007/08/17/laserstrahlvermessung/" rel="bookmark">Laserstrahlvermessung</a><!-- (6.7)--></li>
		<li><a href="http://www.matthiaspospiech.de/blog/2008/04/16/definition-von-makros-und-umgebungen/" rel="bookmark">Definition von Makros und Umgebungen</a><!-- (6.6)--></li>
	</ol>
</div>
]]></description>
			<content:encoded><![CDATA[<p>Hier das neue Syntaxhighlighting von LaTeX in geshi</p>


<div class="wp_syntax"><div class="code"><pre class="latex" style="font-family:monospace;"><span style="color: #2C922C; font-style: italic;">% Beispieldokument</span>
<span style="color: #E02020; ">\</span><span style="color: #800000;">documentclass</span><span style="color: #E02020; ">[</span><span style="color: #C08020; font-weight: normal;">a4paper, 11pt,german</span><span style="color: #E02020; ">]{</span><span style="color: #2020C0; font-weight: normal;">scrartcl</span><span style="color: #E02020; ">}</span>
<span style="color: #E02020; ">\</span><span style="color: #800000;">usepackage</span><span style="color: #E02020; ">{</span><span style="color: #2020C0; font-weight: normal;">lmodern</span><span style="color: #E02020; ">}</span>
<span style="color: #E02020; ">\</span><span style="color: #800000;">usepackage</span><span style="color: #E02020; ">{</span><span style="color: #2020C0; font-weight: normal;">textcomp</span><span style="color: #E02020; ">}</span>
<span style="color: #E02020; ">\</span><span style="color: #800000;">usepackage</span><span style="color: #E02020; ">[</span><span style="color: #C08020; font-weight: normal;">german</span><span style="color: #E02020; ">]{</span><span style="color: #2020C0; font-weight: normal;">babel</span><span style="color: #E02020; ">}</span>
<span style="color: #E02020; ">\</span><span style="color: #800000;">usepackage</span><span style="color: #E02020; ">[</span><span style="color: #C08020; font-weight: normal;">T1</span><span style="color: #E02020; ">]{</span><span style="color: #2020C0; font-weight: normal;">fontenc</span><span style="color: #E02020; ">}</span>
<span style="color: #E02020; ">\</span><span style="color: #800000;">usepackage</span><span style="color: #E02020; ">[</span><span style="color: #C08020; font-weight: normal;">latin1</span><span style="color: #E02020; ">]{</span><span style="color: #2020C0; font-weight: normal;">inputenc</span><span style="color: #E02020; ">}</span>
<span style="color: #E02020; ">\</span><span style="color: #800000;">usepackage</span><span style="color: #E02020; ">{</span><span style="color: #2020C0; font-weight: normal;">graphicx</span><span style="color: #E02020; ">}</span>
&nbsp;
<span style="color: #E02020; ">\</span><span style="color: #800000;">makeatletter</span>
<span style="color: #2C922C; font-style: italic;">% Check for 'draft' mode - commands.</span>
<span style="color: #E02020; ">\</span><span style="color: #800000;">newcommand</span><span style="color: #E02020; ">{</span><span style="color: #2020C0; font-weight: normal;"><span style="color: #800000; font-weight: normal;">\IfDraft</span></span><span style="color: #E02020; ">}[</span><span style="color: #C08020; font-weight: normal;">1</span><span style="color: #E02020; ">]{</span><span style="color: #2020C0; font-weight: normal;">\<span style="color: #800000;">ifx</span><span style="color: #E00000; font-weight: normal;">\@draft</span><span style="color: #E00000; font-weight: normal;">\@undefined</span> <span style="color: #E02020; ">\</span><span style="color: #800000;">else</span> #1 <span style="color: #E02020; ">\</span><span style="color: #800000;">fi</span></span><span style="color: #E02020; ">}</span>
<span style="color: #E02020; ">\</span><span style="color: #800000;">makeatother</span>
&nbsp;
<span style="color: #C00000; font-weight: normal;">\begin</span><span style="color: #E02020; ">{</span><span style="color: #2020C0; font-weight: normal;"><span style="color: #0000D0; font-weight: normal;">document</span></span><span style="color: #E02020; ">}</span>
	<span style="color: #8020E0; font-weight: normal;">$ a = b + c $</span>
	<span style="color: #C00000; font-weight: normal;">\begin</span><span style="color: #E02020; ">{</span><span style="color: #2020C0; font-weight: normal;"><span style="color: #0000D0; font-weight: normal;">equation</span></span><span style="color: #E02020; ">}</span><span style="color: #8020E0; font-weight: normal;">
		a = b + c
	</span><span style="color: #C00000; font-weight: normal;">\end</span><span style="color: #E02020; ">{</span><span style="color: #2020C0; font-weight: normal;"><span style="color: #0000D0; font-weight: normal;">equation</span></span><span style="color: #E02020; ">}</span>
	<span style="color: #C00000; font-weight: normal;">\begin</span><span style="color: #E02020; ">{</span><span style="color: #2020C0; font-weight: normal;"><span style="color: #0000D0; font-weight: normal;">figure</span></span><span style="color: #E02020; ">}</span>
		<span style="color: #E02020; ">\</span><span style="color: #800000;">includegraphics</span><span style="color: #E02020; ">{</span><span style="color: #2020C0; font-weight: normal;">Bild.png</span><span style="color: #E02020; ">}</span>
	<span style="color: #C00000; font-weight: normal;">\end</span><span style="color: #E02020; ">{</span><span style="color: #2020C0; font-weight: normal;"><span style="color: #0000D0; font-weight: normal;">figure</span></span><span style="color: #E02020; ">}</span>
	<span style="color: #E02020; ">\</span><span style="color: #800000;">section</span><span style="color: #E02020; ">{</span><span style="color: #2020C0; font-weight: normal;">Einleitung</span><span style="color: #E02020; ">}</span>
	Dies ist ein beliebig langer Satz ohne konkreten Hintergrund.
	<span style="color: #E02020; ">\</span><span style="color: #800000;">cite</span><span style="color: #E02020; ">[</span><span style="color: #C08020; font-weight: normal;">S. 22</span><span style="color: #E02020; ">]{</span><span style="color: #2020C0; font-weight: normal;">Mustermann</span><span style="color: #E02020; ">}</span>
	<span style="color: #C00000; font-weight: normal;">\begin</span><span style="color: #E02020; ">{</span><span style="color: #2020C0; font-weight: normal;"><span style="color: #0000D0; font-weight: normal;">table</span></span><span style="color: #E02020; ">}[</span><span style="color: #C08020; font-weight: normal;">tb</span><span style="color: #E02020; ">]</span>
		<span style="color: #E02020; ">\</span><span style="color: #800000;">centering</span>
		<span style="color: #C00000; font-weight: normal;">\begin</span><span style="color: #E02020; ">{</span><span style="color: #2020C0; font-weight: normal;"><span style="color: #0000D0; font-weight: normal;">tabular</span></span><span style="color: #E02020; ">}{</span><span style="color: #2020C0; font-weight: normal;">ll</span><span style="color: #E02020; ">}</span>
			links Spalte <span style="color: #E02020; ">&amp;</span> rechte Spalte <span style="color: #E02020; ">\\</span>
		<span style="color: #C00000; font-weight: normal;">\end</span><span style="color: #E02020; ">{</span><span style="color: #2020C0; font-weight: normal;"><span style="color: #0000D0; font-weight: normal;">tabular</span></span><span style="color: #E02020; ">}</span>
		<span style="color: #E02020; ">\</span><span style="color: #800000;">caption</span><span style="color: #E02020; ">[</span><span style="color: #C08020; font-weight: normal;">Eine Testtabelle</span><span style="color: #E02020; ">]{</span><span style="color: #2020C0; font-weight: normal;">Testtabelle</span><span style="color: #E02020; ">}</span>
		<span style="color: #E02020; ">\</span><span style="color: #800000;">label</span><span style="color: #E02020; ">{</span><span style="color: #2020C0; font-weight: normal;">tab:test</span><span style="color: #E02020; ">}</span>
	<span style="color: #C00000; font-weight: normal;">\end</span><span style="color: #E02020; ">{</span><span style="color: #2020C0; font-weight: normal;"><span style="color: #0000D0; font-weight: normal;">table</span></span><span style="color: #E02020; ">}</span>
	Besondere Befehle: <span style="color: #800000; font-weight: normal;">\_</span>, <span style="color: #800000; font-weight: normal;">\&amp;</span>, <span style="color: #800000; font-weight: normal;">\%</span> sollten auch funktionieren.
	<span style="color: #E02020; ">\</span><span style="color: #800000;">subsection</span>*<span style="color: #E02020; ">{</span><span style="color: #2020C0; font-weight: normal;">Erläuterung</span><span style="color: #E02020; ">}</span>
	Verschachtelte Befehle: 
	<span style="color: #2C922C; font-style: italic;">% Command for margin text with usefull style</span>
	<span style="color: #E02020; ">\</span><span style="color: #800000;">newcommand</span><span style="color: #E02020; ">{</span><span style="color: #2020C0; font-weight: normal;"><span style="color: #800000; font-weight: normal;">\marginlabel</span></span><span style="color: #E02020; ">}[</span><span style="color: #C08020; font-weight: normal;">1</span><span style="color: #E02020; ">]{</span><span style="color: #2020C0; font-weight: normal;">
		<span style="color: #E02020; ">\</span><span style="color: #800000;">mbox</span>{</span><span style="color: #2020C0; font-weight: normal;">}<span style="color: #800000; font-weight: normal;">\marginline</span><span style="color: #E02020; ">{\</span><span style="color: #800000;">hspace</span>{0pt</span><span style="color: #E02020; ">}</span><span style="color: #800000; font-weight: normal;">\footnotesize</span><span style="color: #E02020; ">\</span><span style="color: #800000;">sffamily</span> #1<span style="color: #E02020; ">}</span><span style="color: #2C922C; font-style: italic;">%</span>
	<span style="color: #E02020; ">}</span><span style="color: #2C922C; font-style: italic;">%</span>
<span style="color: #C00000; font-weight: normal;">\end</span><span style="color: #E02020; ">{</span><span style="color: #2020C0; font-weight: normal;"><span style="color: #0000D0; font-weight: normal;">document</span></span><span style="color: #E02020; ">}</span></pre></div></div>




<div class="related-posts">
<h4>Related Posts</h4>
<ol>
		<li><a href="http://www.matthiaspospiech.de/blog/2007/06/25/syntaxhighlighting-von-latex-in-webseiten/" rel="bookmark">Syntaxhighlighting von LaTeX in Webseiten</a><!-- (19.9)--></li>
		<li><a href="http://www.matthiaspospiech.de/blog/2007/08/17/laserstrahlvermessung/" rel="bookmark">Laserstrahlvermessung</a><!-- (6.7)--></li>
		<li><a href="http://www.matthiaspospiech.de/blog/2008/04/16/definition-von-makros-und-umgebungen/" rel="bookmark">Definition von Makros und Umgebungen</a><!-- (6.6)--></li>
	</ol>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.matthiaspospiech.de/blog/2008/08/04/alternatives-syntaxhighlighting/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Tutorial zu \expandafter</title>
		<link>http://www.matthiaspospiech.de/blog/2008/04/18/tutorial-zu-expandafter/</link>
		<comments>http://www.matthiaspospiech.de/blog/2008/04/18/tutorial-zu-expandafter/#comments</comments>
		<pubDate>Fri, 18 Apr 2008 21:53:00 +0000</pubDate>
		<dc:creator>pospiech</dc:creator>
				<category><![CDATA[LaTeX]]></category>

		<guid isPermaLink="false">http://www.matthiaspospiech.de/blog/2008/04/18/tutorial-zu-expandafter/</guid>
		<description><![CDATA[Folgendes PDF konnten ich dazu im Internet finden: tb20bechtolsheim.pdf. Es ist zwar uralt (von 1988) aber da sich TeX nicht ge&#228;ndert hat sollte der Inhalt weiterhin g&#252;ltig sein. Hier zwei Beispiele daraus. Dazu bezeichne ich im Folgenden die Befehle mit \a\b und expandierte Werte mit (a), (b) sowie zwischengespeicherte Werte mit S(a), S(b) usw. Die [...]
<div class="related-posts">
<h4>Related Posts</h4>
<ol>
		<li><a href="http://www.matthiaspospiech.de/blog/2008/04/13/latex-variablen-if-abfragen-und-schleifen/" rel="bookmark">LaTeX Variablen, If Abfragen und Schleifen</a><!-- (6.9)--></li>
		<li><a href="http://www.matthiaspospiech.de/blog/2008/04/16/definition-von-makros-und-umgebungen/" rel="bookmark">Definition von Makros und Umgebungen</a><!-- (5.6)--></li>
		<li><a href="http://www.matthiaspospiech.de/blog/2011/05/15/latex-einfuehrung/" rel="bookmark">LaTeX Einf&#252;hrung</a><!-- (5.2)--></li>
	</ol>
</div>
]]></description>
			<content:encoded><![CDATA[Folgendes PDF konnten ich dazu im Internet finden:
<a href="http://www.tug.org/TUGboat/Articles/tb09-1/tb20bechtolsheim.pdf" class="lipdf">tb20bechtolsheim.pdf</a>. 

Es ist zwar uralt (von 1988) aber da sich TeX nicht ge&#228;ndert hat sollte der Inhalt weiterhin g&#252;ltig sein.

Hier zwei Beispiele daraus. Dazu bezeichne ich im Folgenden die Befehle mit \a\b und expandierte Werte mit (a), (b) sowie zwischengespeicherte Werte mit S(a), S(b) usw. <br />
Die \expandafter bezeichne und nummeriere ich mit \ex1 \exp2.

Die Beispiel demonstrieren jeweils ein umgekehrte Expansion der Befehle
<ul>
	<li>Reihenfolge b, a


<div class="wp_syntax"><div class="code"><pre class="latex" style="font-family:monospace;"><span style="color: #800000; font-weight: normal;">\ex</span>1<span style="color: #800000; font-weight: normal;">\a</span><span style="color: #800000; font-weight: normal;">\b</span>
S(<span style="color: #800000; font-weight: normal;">\a</span>) (b)
<span style="color: #800000; font-weight: normal;">\a</span> (b)
(a) (b)</pre></div></div>



</li>
	<li>Reihenfolge c, b, a


<div class="wp_syntax"><div class="code"><pre class="latex" style="font-family:monospace;"><span style="color: #800000; font-weight: normal;">\ex</span>1<span style="color: #800000; font-weight: normal;">\ex</span>2<span style="color: #800000; font-weight: normal;">\ex</span>3<span style="color: #800000; font-weight: normal;">\a</span><span style="color: #800000; font-weight: normal;">\ex</span>4<span style="color: #800000; font-weight: normal;">\b</span><span style="color: #800000; font-weight: normal;">\c</span>
S(<span style="color: #800000; font-weight: normal;">\ex</span>2)<span style="color: #800000; font-weight: normal;">\ex</span>3<span style="color: #800000; font-weight: normal;">\a</span><span style="color: #800000; font-weight: normal;">\ex</span>4<span style="color: #800000; font-weight: normal;">\b</span><span style="color: #800000; font-weight: normal;">\c</span>
S(<span style="color: #800000; font-weight: normal;">\ex</span>2)S(<span style="color: #800000; font-weight: normal;">\a</span>)<span style="color: #800000; font-weight: normal;">\ex</span>4<span style="color: #800000; font-weight: normal;">\b</span><span style="color: #800000; font-weight: normal;">\c</span>
S(<span style="color: #800000; font-weight: normal;">\ex</span>2)S(<span style="color: #800000; font-weight: normal;">\a</span>)S(<span style="color: #800000; font-weight: normal;">\b</span>)<span style="color: #800000; font-weight: normal;">\c</span>
S(<span style="color: #800000; font-weight: normal;">\ex</span>2)S(<span style="color: #800000; font-weight: normal;">\a</span>)S(<span style="color: #800000; font-weight: normal;">\b</span>)(c)
<span style="color: #800000; font-weight: normal;">\ex</span>2<span style="color: #800000; font-weight: normal;">\a</span><span style="color: #800000; font-weight: normal;">\b</span>(c)
S(<span style="color: #800000; font-weight: normal;">\a</span>)<span style="color: #800000; font-weight: normal;">\b</span>(c)
S(<span style="color: #800000; font-weight: normal;">\a</span>)(b)(c)
<span style="color: #800000; font-weight: normal;">\a</span>(b)(c)
(a)(b)(c)</pre></div></div>



</li>
</ul>



<div class="related-posts">
<h4>Related Posts</h4>
<ol>
		<li><a href="http://www.matthiaspospiech.de/blog/2008/04/13/latex-variablen-if-abfragen-und-schleifen/" rel="bookmark">LaTeX Variablen, If Abfragen und Schleifen</a><!-- (6.9)--></li>
		<li><a href="http://www.matthiaspospiech.de/blog/2008/04/16/definition-von-makros-und-umgebungen/" rel="bookmark">Definition von Makros und Umgebungen</a><!-- (5.6)--></li>
		<li><a href="http://www.matthiaspospiech.de/blog/2011/05/15/latex-einfuehrung/" rel="bookmark">LaTeX Einf&#252;hrung</a><!-- (5.2)--></li>
	</ol>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.matthiaspospiech.de/blog/2008/04/18/tutorial-zu-expandafter/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Definition von Makros und Umgebungen</title>
		<link>http://www.matthiaspospiech.de/blog/2008/04/16/definition-von-makros-und-umgebungen/</link>
		<comments>http://www.matthiaspospiech.de/blog/2008/04/16/definition-von-makros-und-umgebungen/#comments</comments>
		<pubDate>Wed, 16 Apr 2008 20:58:35 +0000</pubDate>
		<dc:creator>pospiech</dc:creator>
				<category><![CDATA[LaTeX]]></category>

		<guid isPermaLink="false">http://www.matthiaspospiech.de/blog/2008/04/16/definition-von-markos-und-umgebungen/</guid>
		<description><![CDATA[LaTeX kennt Befehlen (commands) und Umgebungen (environments). Der Unterschied ist das ein Befehl direkt abgearbeitet wird wohingegen eine Umgebung zu Beginn und zum Ende der Umgebung Code ausf&#252;hrt. F&#252;r ausf&#252;hrliche Beispiele zur Nutzung von selbstdefinierten Befehl und Umgebungen bitte ich weitere LaTeX Literatur zu Rate zu ziehen. Hier werde ich nur auf die grunds&#228;tzliche Syntax [...]
<div class="related-posts">
<h4>Related Posts</h4>
<ol>
		<li><a href="http://www.matthiaspospiech.de/blog/2008/08/04/alternatives-syntaxhighlighting/" rel="bookmark">Alternatives Syntaxhighlighting</a><!-- (7.8)--></li>
		<li><a href="http://www.matthiaspospiech.de/blog/2008/04/13/latex-variablen-if-abfragen-und-schleifen/" rel="bookmark">LaTeX Variablen, If Abfragen und Schleifen</a><!-- (6.6)--></li>
		<li><a href="http://www.matthiaspospiech.de/blog/2008/04/18/tutorial-zu-expandafter/" rel="bookmark">Tutorial zu \expandafter</a><!-- (5)--></li>
	</ol>
</div>
]]></description>
			<content:encoded><![CDATA[LaTeX kennt Befehlen (commands) und Umgebungen (environments). Der Unterschied ist das ein Befehl direkt abgearbeitet wird wohingegen eine Umgebung zu Beginn und zum Ende der Umgebung Code ausf&#252;hrt. F&#252;r ausf&#252;hrliche Beispiele zur Nutzung von selbstdefinierten Befehl und Umgebungen bitte ich weitere LaTeX Literatur zu Rate zu ziehen. Hier werde ich nur auf die grunds&#228;tzliche Syntax eingehen.

<a id="toc"></a><ol class="toc"><li><a href="http://www.matthiaspospiech.de/blog/2008/04/16/definition-von-makros-und-umgebungen/#toc-neue-befehle" class="liinternal">Neue Befehle</a><ol><li><a href="http://www.matthiaspospiech.de/blog/2008/04/16/definition-von-makros-und-umgebungen/#toc-lange-und-kurze-befehle" class="liinternal">Lange und kurze Befehle</a></li><li><a href="http://www.matthiaspospiech.de/blog/2008/04/16/definition-von-makros-und-umgebungen/#toc-optionale-argumente" class="liinternal">Optionale Argumente</a></li><li><a href="http://www.matthiaspospiech.de/blog/2008/04/16/definition-von-makros-und-umgebungen/#toc-mehrfache-optionale-argumente" class="liinternal">Mehrfache optionale Argumente</a></li><li><a href="http://www.matthiaspospiech.de/blog/2008/04/16/definition-von-makros-und-umgebungen/#toc-verschachtelte-befehle" class="liinternal">Verschachtelte Befehle</a></li><li><a href="http://www.matthiaspospiech.de/blog/2008/04/16/definition-von-makros-und-umgebungen/#toc-befehle-mit" class="liinternal">Befehle mit *</a></li></ol></li><li><a href="http://www.matthiaspospiech.de/blog/2008/04/16/definition-von-makros-und-umgebungen/#toc-umgebungen" class="liinternal">Umgebungen</a></li><li><a href="http://www.matthiaspospiech.de/blog/2008/04/16/definition-von-makros-und-umgebungen/#toc-protect-fragile-und-robust" class="liinternal">Protect, Fragile und Robust</a></li></ol>

<span id="more-174"></span>
<h3 id="toc-neue-befehle">Neue Befehle</h3>

Ein neuer Befehl wird definiert &#252;ber


<div class="wp_syntax"><div class="code"><pre class="latex" style="font-family:monospace;"><span style="color: #2C922C; font-style: italic;">% \newcommand{cmd}[narg]{command definition}</span>
<span style="color: #E02020; ">\</span><span style="color: #800000;">newcommand</span><span style="color: #E02020; ">{</span><span style="color: #2020C0; font-weight: normal;"><span style="color: #800000; font-weight: normal;">\figureref</span></span><span style="color: #E02020; ">}[</span><span style="color: #C08020; font-weight: normal;">1</span><span style="color: #E02020; ">]{</span><span style="color: #2020C0; font-weight: normal;">(Abbildung \<span style="color: #800000;">ref</span>{#1</span><span style="color: #E02020; ">}</span>)<span style="color: #E02020; ">}</span><span style="color: #2C922C; font-style: italic;">%</span></pre></div></div>



<p>Dabei sind bis zu 9 Argumente (narg) m&#246;glich. Diese werden abgerufen &#252;ber #1, &#8230;, #9. </p>

<p>Wie man mehr als 9 Argumente &#252;begeben kann ist in der englischen FAQ erkl&#228;rt:<a href="http://www.tex.ac.uk/cgi-bin/texfaq2html?label=moren9" class="liexternal">http://www.tex.ac.uk/cgi-bin/texfaq2html?label=moren9</a>. Eine solche Anzahl von Argumenten ist jedoch nicht zu empfehlen. Besser ist es eine key=value Syntax zu verwenden.</p>



<p>Ist ein Befehl schon definiert l&#246;st ein <code>\newcommand</code> einen Fehler aus.</p>

<p>zur Definition gibt es noch weitere Befehle, jeweils mit der gleichen Syntax:</p>
<ul>
	<li><code>\renewcommand</code>: definiert ein bestehenden Befehl um. L&#246;st einen Fehler aus falls der Befehl noch nicht exisiter.</li>
	<li><code>\providecommand</code>: definiert einen Befehl unabh&#228;ngig davon ob er schon existierte oder nicht.</li>
	<li><code>\DeclareRobustCommand</code>: wie <code>\newcommand</code>, definiert allerdings einen<em><a href="#protect" class="liinternal">robusten</a></em> Befehl.</li>
</ul>

<h4 id="toc-lange-und-kurze-befehle">Lange und kurze Befehle</h4>
<p>Lange Befehle, dass sind alle die mit den vorgestellten Befehle <code>\newcommand</code>, <code>\renewcommand</code>, <code>\providecommand</code> usw. erzeugt werden erlauben Paragraphenumbr&#252;che in den Argumenten. </p>

Es gibt auch alle Befehle mit einem *


<div class="wp_syntax"><div class="code"><pre class="latex" style="font-family:monospace;"><span style="color: #E02020; ">\</span><span style="color: #800000;">newcommand</span>*
<span style="color: #E02020; ">\</span><span style="color: #800000;">renewcommand</span>*
<span style="color: #800000; font-weight: normal;">\providecommand*</span>
...</pre></div></div>



<p>die dann <em>kurze</em> Befehle erzeugen, die dann keine Paragraphenumbr&#252;che in den Argumenten erlauben.</p>

<p>Intern sind die langen Befehl als <code>\long\def</code> definiert und die kurzen nur als <code>\def</code></p>

<h4 id="toc-optionale-argumente">Optionale Argumente</h4>
Die Syntax f&#252;r einen Befehl mit optionalem Argument ist wie folgt


<div class="wp_syntax"><div class="code"><pre class="latex" style="font-family:monospace;"><span style="color: #E02020; ">\</span><span style="color: #800000;">newcommand</span><span style="color: #E02020; ">{</span><span style="color: #2020C0; font-weight: normal;">cmd</span><span style="color: #E02020; ">}[</span><span style="color: #C08020; font-weight: normal;">narg</span><span style="color: #E02020; ">][</span><span style="color: #C08020; font-weight: normal;">default</span><span style="color: #E02020; ">]{</span><span style="color: #2020C0; font-weight: normal;">command definition</span><span style="color: #E02020; ">}</span></pre></div></div>



<p>In diesem Fall hat das Optionale Argument die Nummer #1 und wird durch den default Wert ersetzt wenn der optionale Parameter nicht genutzt wird.</p>

Im Falle von


<div class="wp_syntax"><div class="code"><pre class="latex" style="font-family:monospace;"><span style="color: #E02020; ">\</span><span style="color: #800000;">newcommand</span><span style="color: #E02020; ">{</span><span style="color: #2020C0; font-weight: normal;"><span style="color: #800000; font-weight: normal;">\foobar</span></span><span style="color: #E02020; ">}[</span><span style="color: #C08020; font-weight: normal;">1</span><span style="color: #E02020; ">][</span><span style="color: #C08020; font-weight: normal;">2</span><span style="color: #E02020; ">]{</span><span style="color: #2020C0; font-weight: normal;">#1</span><span style="color: #E02020; ">}</span></pre></div></div>



gibt es nur ein optionales Argument. Die Ausgabe ist also standardm&#228;&#223;ig &#8220;2&#8243;, es sein denn man schreibt <code>\foobar[3]</code> was dann &#8220;3&#8243; ausgibt.

<h4 id="toc-mehrfache-optionale-argumente">Mehrfache optionale Argumente</h4>
F&#252;r die L&#246;sung gibt es mehrere Pakete. Zum einen das <a href="http://www.ctan.org/tex-archive/macros/latex/contrib/sauerj/optparams.pdf" class="lipdf">optparams</a> Paket welches die folgende Syntax bietet


<div class="wp_syntax"><div class="code"><pre class="latex" style="font-family:monospace;"><span style="color: #800000; font-weight: normal;">\long</span><span style="color: #E02020; ">\</span><span style="color: #800000;">def</span><span style="color: #800000; font-weight: normal;">\test</span>@<span style="color: #E02020; ">[</span><span style="color: #C08020; font-weight: normal;">#1</span><span style="color: #E02020; ">][</span><span style="color: #C08020; font-weight: normal;">#2</span><span style="color: #E02020; ">][</span><span style="color: #C08020; font-weight: normal;">#3</span><span style="color: #E02020; ">][</span><span style="color: #C08020; font-weight: normal;">#4</span><span style="color: #E02020; ">]{</span><span style="color: #2C922C; font-style: italic;">%</span>
	(#1) (#2) (#3) (#4)
<span style="color: #E02020; ">}</span>
<span style="color: #E02020; ">\</span><span style="color: #800000;">newcommand</span><span style="color: #E02020; ">{</span><span style="color: #2020C0; font-weight: normal;"><span style="color: #800000; font-weight: normal;">\test</span></span><span style="color: #E02020; ">}{</span><span style="color: #2C922C; font-style: italic;">%</span>
	<span style="color: #800000; font-weight: normal;">\optparams</span><span style="color: #E02020; ">{</span><span style="color: #2020C0; font-weight: normal;"><span style="color: #800000; font-weight: normal;">\test</span>@</span><span style="color: #E02020; ">}{</span><span style="color: #2020C0; font-weight: normal;">[<span style="color: #C08020; font-weight: normal;">one</span><span style="color: #E02020; ">][</span><span style="color: #C08020; font-weight: normal;">two</span><span style="color: #E02020; ">][</span><span style="color: #C08020; font-weight: normal;">three</span><span style="color: #E02020; ">][</span><span style="color: #C08020; font-weight: normal;">four</span>]</span><span style="color: #E02020; ">}</span><span style="color: #2C922C; font-style: italic;">%</span>
<span style="color: #E02020; ">}</span></pre></div></div>



Hiernach gibt es bis zu 4 optionale Parameter, so dass sich folgende Ausgaben ergeben:


<div class="wp_syntax"><div class="code"><pre class="latex" style="font-family:monospace;"><span style="color: #800000; font-weight: normal;">\test</span><span style="color: #E02020; ">[</span><span style="color: #C08020; font-weight: normal;">this</span><span style="color: #E02020; ">]</span> <span style="color: #2C922C; font-style: italic;">% ergibt &quot;(this) (two) (three) (four)&quot;</span>
<span style="color: #800000; font-weight: normal;">\test</span><span style="color: #E02020; ">[</span><span style="color: #C08020; font-weight: normal;">this</span><span style="color: #E02020; ">][</span><span style="color: #C08020; font-weight: normal;">is</span><span style="color: #E02020; ">]</span> <span style="color: #2C922C; font-style: italic;">% ergibt  &quot;(this) (is) (three) (four)&quot;</span>
<span style="color: #800000; font-weight: normal;">\test</span><span style="color: #E02020; ">[</span><span style="color: #C08020; font-weight: normal;">this</span><span style="color: #E02020; ">][</span><span style="color: #C08020; font-weight: normal;">is</span><span style="color: #E02020; ">][</span><span style="color: #C08020; font-weight: normal;">a</span><span style="color: #E02020; ">]</span><span style="color: #2C922C; font-style: italic;">% ergibt &quot;(this) (is) (a) (four)&quot;</span>
<span style="color: #800000; font-weight: normal;">\test</span><span style="color: #E02020; ">[</span><span style="color: #C08020; font-weight: normal;">this</span><span style="color: #E02020; ">][</span><span style="color: #C08020; font-weight: normal;">is</span><span style="color: #E02020; ">][</span><span style="color: #C08020; font-weight: normal;">a</span><span style="color: #E02020; ">][</span><span style="color: #C08020; font-weight: normal;">test</span><span style="color: #E02020; ">]</span><span style="color: #2C922C; font-style: italic;">% ergibt  &quot;(this) (is) (a) (test)&quot;</span></pre></div></div>



Ein nichtoptionales Argument wird dann wie folgt definiert


<div class="wp_syntax"><div class="code"><pre class="latex" style="font-family:monospace;"><span style="color: #800000; font-weight: normal;">\long</span><span style="color: #E02020; ">\</span><span style="color: #800000;">def</span><span style="color: #800000; font-weight: normal;">\test</span>@<span style="color: #E02020; ">[</span><span style="color: #C08020; font-weight: normal;">#1</span><span style="color: #E02020; ">][</span><span style="color: #C08020; font-weight: normal;">#2</span><span style="color: #E02020; ">][</span><span style="color: #C08020; font-weight: normal;">#3</span><span style="color: #E02020; ">][</span><span style="color: #C08020; font-weight: normal;">#4</span><span style="color: #E02020; ">]</span>#5<span style="color: #E02020; ">{</span><span style="color: #2C922C; font-style: italic;">%</span>
	(#1) (#2) (#3) (#4) #5
<span style="color: #E02020; ">}</span>
<span style="color: #E02020; ">\</span><span style="color: #800000;">newcommand</span><span style="color: #E02020; ">{</span><span style="color: #2020C0; font-weight: normal;"><span style="color: #800000; font-weight: normal;">\test</span></span><span style="color: #E02020; ">}{</span><span style="color: #2C922C; font-style: italic;">%</span>
	<span style="color: #800000; font-weight: normal;">\optparams</span><span style="color: #E02020; ">{</span><span style="color: #2020C0; font-weight: normal;"><span style="color: #800000; font-weight: normal;">\test</span>@</span><span style="color: #E02020; ">}{</span><span style="color: #2020C0; font-weight: normal;">[<span style="color: #C08020; font-weight: normal;">one</span><span style="color: #E02020; ">][</span><span style="color: #C08020; font-weight: normal;">two</span><span style="color: #E02020; ">][</span><span style="color: #C08020; font-weight: normal;">three</span><span style="color: #E02020; ">][</span><span style="color: #C08020; font-weight: normal;">four</span>]</span><span style="color: #E02020; ">}</span><span style="color: #2C922C; font-style: italic;">%</span>
<span style="color: #E02020; ">}</span></pre></div></div>



<p>Allerdings muss bei dieser Methode der erste Befehl &#252;ber ein \def definiert werden da ein \newcommand diese Syntax nicht versteht.</p>

<p>Zum Anderen gibt es das wesentlich m&#228;chtigere Paket <a href="http://ftp.gwdg.de/pub/ctan/macros/latex/contrib/xargs/xargs.pdf" class="lipdf">xargs</a> welches eine sehr flexible L&#246;sung bietet.</p>
<p>In diesem Paket werden die Befehle</p>


<div class="wp_syntax"><div class="code"><pre class="latex" style="font-family:monospace;"><span style="color: #800000; font-weight: normal;">\newcommandx</span>
<span style="color: #800000; font-weight: normal;">\renewcommandx</span>
<span style="color: #800000; font-weight: normal;">\providecommandx</span>
<span style="color: #800000; font-weight: normal;">\DeclareRobustCommandx</span>
<span style="color: #800000; font-weight: normal;">\CheckCommandx</span>
<span style="color: #800000; font-weight: normal;">\newenvironmentx</span>
<span style="color: #800000; font-weight: normal;">\renewenvironmentx</span></pre></div></div>



<p>
definiert, welche sich durch die vordefiniertem jeweils durch das angehangene x unterscheiden und eine etwas andere Syntax bieten:</p>


<div class="wp_syntax"><div class="code"><pre class="latex" style="font-family:monospace;"><span style="color: #800000; font-weight: normal;">\newcommandx*</span><span style="color: #E02020; ">{</span><span style="color: #2020C0; font-weight: normal;">command</span><span style="color: #E02020; ">}[</span><span style="color: #C08020; font-weight: normal;">number</span><span style="color: #E02020; ">][</span><span style="color: #C08020; font-weight: normal;">list</span><span style="color: #E02020; ">]{</span><span style="color: #2020C0; font-weight: normal;">definition</span><span style="color: #E02020; ">}</span>
<span style="color: #2C922C; font-style: italic;">% zum Vergleich</span>
<span style="color: #E02020; ">\</span><span style="color: #800000;">newcommand</span>*<span style="color: #E02020; ">{</span><span style="color: #2020C0; font-weight: normal;">command</span><span style="color: #E02020; ">}[</span><span style="color: #C08020; font-weight: normal;">number</span><span style="color: #E02020; ">]{</span><span style="color: #2020C0; font-weight: normal;">definition</span><span style="color: #E02020; ">}</span></pre></div></div>



<p>Die Definition eines Befehls unterscheidet sich somit in der Definition von <em>list</em>. Das folgende Beispiel definiert zwei optionale Argumente</p>


<div class="wp_syntax"><div class="code"><pre class="latex" style="font-family:monospace;"><span style="color: #800000; font-weight: normal;">\newcommandx*</span><span style="color: #800000; font-weight: normal;">\coord</span><span style="color: #E02020; ">[</span><span style="color: #C08020; font-weight: normal;">3</span><span style="color: #E02020; ">][</span><span style="color: #C08020; font-weight: normal;">1=1, 3=n</span><span style="color: #E02020; ">]{</span><span style="color: #2020C0; font-weight: normal;">(#2_{#1</span><span style="color: #E02020; ">}</span>,<span style="color: #800000; font-weight: normal;">\ldots</span>,#2_<span style="color: #E02020; ">{</span><span style="color: #2020C0; font-weight: normal;">#3</span><span style="color: #E02020; ">}</span>)<span style="color: #E02020; ">}</span>
<span style="color: #8020E0; font-weight: normal;">$<span style="color: #800000; font-weight: normal;">\coord</span><span style="color: #E02020; ">{</span><span style="color: #2020C0; font-weight: normal;">x</span>}$</span> <span style="color: #2C922C; font-style: italic;">% (x1, . . . , xn)</span>
<span style="color: #8020E0; font-weight: normal;">$<span style="color: #800000; font-weight: normal;">\coord</span><span style="color: #E02020; ">[</span><span style="color: #C08020; font-weight: normal;">0</span><span style="color: #E02020; ">]{</span><span style="color: #2020C0; font-weight: normal;">y</span>}$</span> <span style="color: #2C922C; font-style: italic;">% (y0, . . . , yn)</span>
<span style="color: #8020E0; font-weight: normal;">$<span style="color: #800000; font-weight: normal;">\coord</span><span style="color: #E02020; ">{</span><span style="color: #2020C0; font-weight: normal;">z</span><span style="color: #E02020; ">}[</span><span style="color: #C08020; font-weight: normal;">m</span>]$</span> <span style="color: #2C922C; font-style: italic;">% (z1, . . . , zm)</span>
<span style="color: #8020E0; font-weight: normal;">$<span style="color: #800000; font-weight: normal;">\coord</span><span style="color: #E02020; ">[</span><span style="color: #C08020; font-weight: normal;">0</span><span style="color: #E02020; ">]{</span><span style="color: #2020C0; font-weight: normal;">t</span><span style="color: #E02020; ">}[</span><span style="color: #C08020; font-weight: normal;">m</span>]$</span> <span style="color: #2C922C; font-style: italic;">% (t0, . . . , tm)</span></pre></div></div>



<p>Der &#8216;value&#8217; Wert bei der Liste gibt dabei den Standardwert an.</p>

<p>Um ein optionales Argument zu &#252;bergehen, also nicht anzugeben, aber das darauffolgende anzugeben muss man der Liste den Wert &#8220;usedefault&#8221; hinzuf&#252;gen. Das Beispiel sieht dann wie folgt aus</p>


<div class="wp_syntax"><div class="code"><pre class="latex" style="font-family:monospace;"><span style="color: #800000; font-weight: normal;">\newcommandx*</span><span style="color: #800000; font-weight: normal;">\coord</span><span style="color: #E02020; ">[</span><span style="color: #C08020; font-weight: normal;">3</span><span style="color: #E02020; ">][</span><span style="color: #C08020; font-weight: normal;">2=1,3=n,usedefault</span><span style="color: #E02020; ">]{</span><span style="color: #2020C0; font-weight: normal;">(#2_{#1</span><span style="color: #E02020; ">}</span>,<span style="color: #800000; font-weight: normal;">\ldots</span>,#2_<span style="color: #E02020; ">{</span><span style="color: #2020C0; font-weight: normal;">#3</span><span style="color: #E02020; ">}</span>)<span style="color: #E02020; ">}</span>
<span style="color: #8020E0; font-weight: normal;">$<span style="color: #800000; font-weight: normal;">\coord</span><span style="color: #E02020; ">{</span><span style="color: #2020C0; font-weight: normal;">x</span>}$</span> <span style="color: #2C922C; font-style: italic;">% (1x, . . . , 1n)</span>
<span style="color: #8020E0; font-weight: normal;">$<span style="color: #800000; font-weight: normal;">\coord</span><span style="color: #E02020; ">{</span><span style="color: #2020C0; font-weight: normal;">y</span><span style="color: #E02020; ">}[</span><span style="color: #C08020; font-weight: normal;">0</span>]$</span> <span style="color: #2C922C; font-style: italic;">% (0y, . . . , 0n)</span>
<span style="color: #8020E0; font-weight: normal;">$<span style="color: #800000; font-weight: normal;">\coord</span><span style="color: #E02020; ">{</span><span style="color: #2020C0; font-weight: normal;">z</span><span style="color: #E02020; ">}[</span><span style="color: #C08020; font-weight: normal;">][m</span>]$</span> <span style="color: #2C922C; font-style: italic;">% (1z, . . . , 1m)</span>
<span style="color: #8020E0; font-weight: normal;">$<span style="color: #800000; font-weight: normal;">\coord</span><span style="color: #E02020; ">{</span><span style="color: #2020C0; font-weight: normal;">t</span><span style="color: #E02020; ">}[</span><span style="color: #C08020; font-weight: normal;">0</span><span style="color: #E02020; ">][</span><span style="color: #C08020; font-weight: normal;">m</span>]$</span> <span style="color: #2C922C; font-style: italic;">% (0t, . . . , 0m)</span></pre></div></div>



F&#252;r weitere M&#246;glichkeiten und potenzielle Probleme bitte die Dokumentation des Paketes zu Rate ziehen.


<h4 id="toc-verschachtelte-befehle">Verschachtelte Befehle</h4>
M&#246;chte man einen Befehl definieren, der einen weiteren Befehl umdefiniert ben&#246;tigt man je nach Tiefer der Verschachtelung vorgestellte Raouten (#). Hier ein Beispiel:


<div class="wp_syntax"><div class="code"><pre class="latex" style="font-family:monospace;"><span style="color: #E02020; ">\</span><span style="color: #800000;">newcommand</span><span style="color: #800000; font-weight: normal;">\TextZwischenAnfangUndEnde</span><span style="color: #E02020; ">[</span><span style="color: #C08020; font-weight: normal;">1</span><span style="color: #E02020; ">]{</span><span style="color: #2020C0; font-weight: normal;">Anfang <span style="color: #800000; font-weight: normal;">\ldots</span> #1 <span style="color: #800000; font-weight: normal;">\ldots</span> Ende</span><span style="color: #E02020; ">}</span>
<span style="color: #E02020; ">\</span><span style="color: #800000;">newcommand</span><span style="color: #800000; font-weight: normal;">\NeuerAnfangUndEnde</span><span style="color: #E02020; ">[</span><span style="color: #C08020; font-weight: normal;">2</span><span style="color: #E02020; ">]{</span><span style="color: #2C922C; font-style: italic;">%</span>
   <span style="color: #E02020; ">\</span><span style="color: #800000;">renewcommand</span><span style="color: #800000; font-weight: normal;">\TextZwischenAnfangUndEnde</span><span style="color: #E02020; ">[</span><span style="color: #C08020; font-weight: normal;">1</span><span style="color: #E02020; ">]{</span><span style="color: #2020C0; font-weight: normal;">#1 <span style="color: #800000; font-weight: normal;">\ldots</span> ##1 <span style="color: #800000; font-weight: normal;">\ldots</span> #2</span><span style="color: #E02020; ">}</span><span style="color: #2C922C; font-style: italic;">%</span>
<span style="color: #E02020; ">}</span></pre></div></div>




<p>Mit der Voreingestellten Definition von <code>\TextZwischenAnfangUndEnde</code> erh&#228;lt man dann die Ausgabe</p>
<img src='/latexrender/pictures/a7f2d8cf52b26ac248185f68b240a30d.png' title='\newcommand\TextZwischenAnfangUndEnde[1]{Anfang \ldots #1 \ldots Ende}\TextZwischenAnfangUndEnde{Das Maerchen}' alt='\newcommand\TextZwischenAnfangUndEnde[1]{Anfang \ldots #1 \ldots Ende}\TextZwischenAnfangUndEnde{Das Maerchen}' align=absmiddle>

<p>Benutzt man nun den Befehl zum Umdefinieren</p>


<div class="wp_syntax"><div class="code"><pre class="latex" style="font-family:monospace;"><span style="color: #800000; font-weight: normal;">\NeuerAnfangUndEnde</span><span style="color: #E02020; ">{</span><span style="color: #2020C0; font-weight: normal;">Es war einmal</span><span style="color: #E02020; ">}{</span><span style="color: #2020C0; font-weight: normal;">Sie lebten gluecklich bis an ihr Lebensende</span><span style="color: #E02020; ">}</span>
<span style="color: #800000; font-weight: normal;">\TextZwischenAnfangUndEnde</span><span style="color: #E02020; ">{</span><span style="color: #2020C0; font-weight: normal;">Das Maerchen</span><span style="color: #E02020; ">}</span></pre></div></div>



<p>so erh&#228;lt man</p>
<img src='/latexrender/pictures/a44defad7d6dbfe1bef434b1c41754cc.png' title='\newcommand\TextZwischenAnfangUndEnde[1]{Anfang \ldots #1 \ldots Ende}\newcommand\NeuerAnfangUndEnde[2]{   \renewcommand\TextZwischenAnfangUndEnde[1]{#1 \ldots ##1 \ldots #2}}\NeuerAnfangUndEnde{Es war einmal}{Sie lebten gluecklich bis an ihr Lebensende}\TextZwischenAnfangUndEnde{Das Maerchen}' alt='\newcommand\TextZwischenAnfangUndEnde[1]{Anfang \ldots #1 \ldots Ende}\newcommand\NeuerAnfangUndEnde[2]{   \renewcommand\TextZwischenAnfangUndEnde[1]{#1 \ldots ##1 \ldots #2}}\NeuerAnfangUndEnde{Es war einmal}{Sie lebten gluecklich bis an ihr Lebensende}\TextZwischenAnfangUndEnde{Das Maerchen}' align=absmiddle>

<h4 id="toc-befehle-mit">Befehle mit *</h4>
Vielleicht nicht die optimale, aber eine M&#246;glichkeit diesen Unterschied abzufangen bietet der Befehl <code>\@ifnextchar</code> mit der folgenden Notation


<div class="wp_syntax"><div class="code"><pre class="latex" style="font-family:monospace;"><span style="color: #E02020; ">\</span><span style="color: #800000;">newcommand</span><span style="color: #E02020; ">{</span><span style="color: #2020C0; font-weight: normal;"><span style="color: #800000; font-weight: normal;">\fancy</span></span><span style="color: #E02020; ">}{</span><span style="color: #2020C0; font-weight: normal;"><span style="color: #E00000; font-weight: normal;">\@ifnextchar*</span>{Befehl mit *</span><span style="color: #E02020; ">}{</span><span style="color: #2020C0; font-weight: normal;">Befehl ohne *</span><span style="color: #E02020; ">}</span> sonstiges<span style="color: #E02020; ">}</span></pre></div></div>




<h3 id="toc-umgebungen">Umgebungen</h3>
Umgebungen werden definiert &#252;ber


<div class="wp_syntax"><div class="code"><pre class="latex" style="font-family:monospace;"><span style="color: #E02020; ">\</span><span style="color: #800000;">newenvironment</span><span style="color: #E02020; ">{</span><span style="color: #2020C0; font-weight: normal;">cmd</span><span style="color: #E02020; ">}[</span><span style="color: #C08020; font-weight: normal;">narg</span><span style="color: #E02020; ">]{</span><span style="color: #2020C0; font-weight: normal;">begin definition</span><span style="color: #E02020; ">}{</span><span style="color: #2020C0; font-weight: normal;">end definition</span><span style="color: #E02020; ">}</span>
<span style="color: #E02020; ">\</span><span style="color: #800000;">renewenvironment</span><span style="color: #E02020; ">{</span><span style="color: #2020C0; font-weight: normal;">cmd</span><span style="color: #E02020; ">}[</span><span style="color: #C08020; font-weight: normal;">narg</span><span style="color: #E02020; ">]{</span><span style="color: #2020C0; font-weight: normal;">begin definition</span><span style="color: #E02020; ">}{</span><span style="color: #2020C0; font-weight: normal;">end definition</span><span style="color: #E02020; ">}</span>
<span style="color: #2C922C; font-style: italic;">% Erste Argument optional</span>
<span style="color: #E02020; ">\</span><span style="color: #800000;">newenvironment</span><span style="color: #E02020; ">{</span><span style="color: #2020C0; font-weight: normal;">cmd</span><span style="color: #E02020; ">}[</span><span style="color: #C08020; font-weight: normal;">narg</span><span style="color: #E02020; ">][</span><span style="color: #C08020; font-weight: normal;">optional</span><span style="color: #E02020; ">]{</span><span style="color: #2020C0; font-weight: normal;">begin definition</span><span style="color: #E02020; ">}{</span><span style="color: #2020C0; font-weight: normal;">end definition</span><span style="color: #E02020; ">}</span></pre></div></div>




M&#246;chte man in der Anfangs oder Ende Sequenz weitere Umgebungen einbringen so kann man diese nicht &#252;ber <code>\begin{<env>}</code> und <code>\end{<env>}</code> definieren. Stattdessen ben&#246;tigt man die &#228;quivalenten normalen Befehle. Hier ein Beispiel


<div class="wp_syntax"><div class="code"><pre class="latex" style="font-family:monospace;"><span style="color: #2C922C; font-style: italic;">% \newenvironment{myquote}[1]{\small\begin{quote}}{\end{quote}} % funktioniert nicht!</span>
<span style="color: #E02020; ">\</span><span style="color: #800000;">newenvironment</span><span style="color: #E02020; ">{</span><span style="color: #2020C0; font-weight: normal;">myquote</span><span style="color: #E02020; ">}[</span><span style="color: #C08020; font-weight: normal;">1</span><span style="color: #E02020; ">]{</span><span style="color: #2020C0; font-weight: normal;"><span style="color: #800000; font-weight: normal;">\small</span><span style="color: #800000; font-weight: normal;">\quote</span></span><span style="color: #E02020; ">}{</span><span style="color: #2020C0; font-weight: normal;"><span style="color: #800000; font-weight: normal;">\endquote</span></span><span style="color: #E02020; ">}</span> <span style="color: #2C922C; font-style: italic;">% funktioniert</span></pre></div></div>




<a name="protect"></a>
<h3 id="toc-protect-fragile-und-robust">Protect, Fragile und Robust</h3>
Angeleht an einen Text aus der <a href="http://www.tex.ac.uk/cgi-bin/texfaq2html?label=protect" class="liexternal">englische FAQ</a>:

LaTeX definiert Befehle deren Daten sp&#228;ter nocheinmal eingelesen werden. Diese Daten k&#246;nnen dann Argumetne von anderen Befehlen sein. Dies kann z.B. vorkommen bei Inhaltsverzeichnissen die aus aux Dateien wieder eingelesen werden und Daten die in den Kopf und Fusszeilen landen.

Diese Befehle werden bei ihrer Ausf&#252;hrung und damit dem Speichern der Werte direkt expandiert. Manchmal erzeugt das einen Fehler wenn die Daten sp&#228;ter nochmal eingelesen werden. Dies kann verhindert werden indem man ein <code>\protect</code> vor einen Befehl stellt:


<div class="wp_syntax"><div class="code"><pre class="latex" style="font-family:monospace;"><span style="color: #800000; font-weight: normal;">\protect</span><span style="color: #800000; font-weight: normal;">\somecommand</span></pre></div></div>



In diesem Fall wird \somecommand nicht expandiert.

<p><em>Fragile Befehle</em> sind dann solche die in ung&#252;ltigem TeX Code beim Speichern resultieren, wohingegen <em>Robuste Befehle</em> in g&#252;ltigen Code beim Speichern expandieren. </p>


<div class="related-posts">
<h4>Related Posts</h4>
<ol>
		<li><a href="http://www.matthiaspospiech.de/blog/2008/08/04/alternatives-syntaxhighlighting/" rel="bookmark">Alternatives Syntaxhighlighting</a><!-- (7.8)--></li>
		<li><a href="http://www.matthiaspospiech.de/blog/2008/04/13/latex-variablen-if-abfragen-und-schleifen/" rel="bookmark">LaTeX Variablen, If Abfragen und Schleifen</a><!-- (6.6)--></li>
		<li><a href="http://www.matthiaspospiech.de/blog/2008/04/18/tutorial-zu-expandafter/" rel="bookmark">Tutorial zu \expandafter</a><!-- (5)--></li>
	</ol>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.matthiaspospiech.de/blog/2008/04/16/definition-von-makros-und-umgebungen/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>LaTeX Variablen, If Abfragen und Schleifen</title>
		<link>http://www.matthiaspospiech.de/blog/2008/04/13/latex-variablen-if-abfragen-und-schleifen/</link>
		<comments>http://www.matthiaspospiech.de/blog/2008/04/13/latex-variablen-if-abfragen-und-schleifen/#comments</comments>
		<pubDate>Sun, 13 Apr 2008 20:33:35 +0000</pubDate>
		<dc:creator>pospiech</dc:creator>
				<category><![CDATA[LaTeX]]></category>

		<guid isPermaLink="false">http://www.matthiaspospiech.de/blog/2008/04/13/latex-klassen-and-packet-programming/</guid>
		<description><![CDATA[Programmieren in TeX / LaTeXVariablen von TeX / LaTeXZ&#228;hlervariablen (counter)L&#228;ngenvariablen (length)Wahrheitswerte (boolean)Rechnen innerhalb von TeXIf Abfrage\ifcase AnweisungTeX FunktionenLaTeX FunktionenSchleifen\whiledo (nur LaTex)\loop (TeX)For Schleife (LaTeX) Programmieren in TeX / LaTeX Eine umfassende Dokumentation zur Programmierung von LaTeX Klassen und Paketen gibt es leider nicht. In den Anf&#228;ngen kommt man zwar mit dem LaTeX Begleiter und dem [...]
<div class="related-posts">
<h4>Related Posts</h4>
<ol>
		<li><a href="http://www.matthiaspospiech.de/blog/2007/08/08/latex-wiki/" rel="bookmark">LaTeX Wiki</a><!-- (6.4)--></li>
		<li><a href="http://www.matthiaspospiech.de/blog/2008/07/20/bbclone-in-mediawiki/" rel="bookmark">bbclone in mediawiki</a><!-- (6.4)--></li>
		<li><a href="http://www.matthiaspospiech.de/blog/2011/12/09/erstellung-von-bachelor-und-masterarbeiten-mit-latex/" rel="bookmark">Erstellung von Bachelor und Masterarbeiten mit LaTeX</a><!-- (6.2)--></li>
	</ol>
</div>
]]></description>
			<content:encoded><![CDATA[<a id="toc"></a><ol class="toc"><li><a href="http://www.matthiaspospiech.de/blog/2008/04/13/latex-variablen-if-abfragen-und-schleifen/#toc-programmieren-in-tex-latex" class="liinternal">Programmieren in TeX / LaTeX</a></li><li><a href="http://www.matthiaspospiech.de/blog/2008/04/13/latex-variablen-if-abfragen-und-schleifen/#toc-variablen-von-tex-latex" class="liinternal">Variablen von TeX / LaTeX</a><ol><li><a href="http://www.matthiaspospiech.de/blog/2008/04/13/latex-variablen-if-abfragen-und-schleifen/#toc-zhlervariablen-counter" class="liinternal">Z&#228;hlervariablen (counter)</a></li><li><a href="http://www.matthiaspospiech.de/blog/2008/04/13/latex-variablen-if-abfragen-und-schleifen/#toc-lngenvariablen-length" class="liinternal">L&#228;ngenvariablen (length)</a></li><li><a href="http://www.matthiaspospiech.de/blog/2008/04/13/latex-variablen-if-abfragen-und-schleifen/#toc-wahrheitswerte-boolean" class="liinternal">Wahrheitswerte (boolean)</a></li></ol></li><li><a href="http://www.matthiaspospiech.de/blog/2008/04/13/latex-variablen-if-abfragen-und-schleifen/#toc-rechnen-innerhalb-von-tex" class="liinternal">Rechnen innerhalb von TeX</a></li><li><a href="http://www.matthiaspospiech.de/blog/2008/04/13/latex-variablen-if-abfragen-und-schleifen/#toc-if-abfrage" class="liinternal">If Abfrage</a><ol><li><a href="http://www.matthiaspospiech.de/blog/2008/04/13/latex-variablen-if-abfragen-und-schleifen/#toc-ifcase-anweisung" class="liinternal"><code>\ifcase</code> Anweisung</a></li></ol></li><li><a href="http://www.matthiaspospiech.de/blog/2008/04/13/latex-variablen-if-abfragen-und-schleifen/#toc-tex-funktionen" class="liinternal">TeX Funktionen</a></li><li><a href="http://www.matthiaspospiech.de/blog/2008/04/13/latex-variablen-if-abfragen-und-schleifen/#toc-latex-funktionen" class="liinternal">LaTeX Funktionen</a></li><li><a href="http://www.matthiaspospiech.de/blog/2008/04/13/latex-variablen-if-abfragen-und-schleifen/#toc-schleifen" class="liinternal">Schleifen</a><ol><li><a href="http://www.matthiaspospiech.de/blog/2008/04/13/latex-variablen-if-abfragen-und-schleifen/#toc-whiledo-nur-latex" class="liinternal">\whiledo (nur LaTex)</a></li><li><a href="http://www.matthiaspospiech.de/blog/2008/04/13/latex-variablen-if-abfragen-und-schleifen/#toc-loop-tex" class="liinternal">\loop (TeX)</a></li><li><a href="http://www.matthiaspospiech.de/blog/2008/04/13/latex-variablen-if-abfragen-und-schleifen/#toc-for-schleife-latex" class="liinternal">For Schleife (LaTeX)</a></li></ol></li></ol>

<h3 id="toc-programmieren-in-tex-latex">Programmieren in TeX / LaTeX</h3>

<p>Eine umfassende Dokumentation zur Programmierung von LaTeX Klassen und Paketen gibt es leider nicht. In den Anf&#228;ngen kommt man zwar mit dem <em>LaTeX Begleiter</em> und dem <em>clsguide.pdf</em> in das Thema hinein, hat dann aber nicht zum Anschlie&#223;en. H&#228;ufig wird man bei dem Thema auf das TeXBook verwiesen welches TeX und PlainTeX in aller Ausf&#252;hrlichkeit erkl&#228;rt aber ganz offensichtlich alle LaTeX Befehle ausl&#228;sst die einem die Programmierung erheblich vereinfachen k&#246;nnen bzw. notwendig zur LaTeX Klassen und Paket Programmierung sind. Im Folgenden versuche ich meine Erkenntnisse (vielleicht in einer Serie) hier darzustellen.<p>

<p>F&#252;r die TeX Kommandoes empfehle ich ebenfalls in diese Liste zu schauen: <a href="http://www.tug.org/utilities/plain/cseq.html" class="liexternal">TeX Primitive Control Sequences</a>.</p>

<span id="more-173"></span>

<h3 id="toc-variablen-von-tex-latex">Variablen von TeX / LaTeX</h3>
Es gibt Z&#228;hlervariablen (int), L&#228;ngenvariablen (float) und Wahrheitswerte (bool) sowie Makros die Strings und Befehle enthalten k&#246;nnen. Eine Klassische Einteilung in int, float, bool, string gibt es nicht. 

<h4 id="toc-zhlervariablen-counter">Z&#228;hlervariablen (counter)</h4>

Counter speichern Integer Werte. Die Deklaration erfolgt &#252;ber


<div class="wp_syntax"><div class="code"><pre class="latex" style="font-family:monospace;"><span style="color: #800000; font-weight: normal;">\newcounter</span><span style="color: #E02020; ">{</span><span style="color: #2020C0; font-weight: normal;">mycounter</span><span style="color: #E02020; ">}</span></pre></div></div>




Der Wert wird dabei mit 0 initialisiert. Eine Ver&#228;nderung erfolgt &#252;ber


<div class="wp_syntax"><div class="code"><pre class="latex" style="font-family:monospace;"><span style="color: #800000; font-weight: normal;">\setcounter</span><span style="color: #E02020; ">{</span><span style="color: #2020C0; font-weight: normal;">mycounter</span><span style="color: #E02020; ">}{</span><span style="color: #2020C0; font-weight: normal;">2</span><span style="color: #E02020; ">}</span></pre></div></div>




Den Wert erh&#228;lt man als Zahl &#252;ber


<div class="wp_syntax"><div class="code"><pre class="latex" style="font-family:monospace;"><span style="color: #800000; font-weight: normal;">\value</span><span style="color: #E02020; ">{</span><span style="color: #2020C0; font-weight: normal;">mycounter</span><span style="color: #E02020; ">}</span></pre></div></div>




diese Ausgabe ist allerdings nur innerhalb der Programmierung nutzbar.
Die Textausgabe hingegen erh&#228;lt man durch ein Voranstellen von <code>\the</code>


<div class="wp_syntax"><div class="code"><pre class="latex" style="font-family:monospace;"><span style="color: #800000; font-weight: normal;">\themycounter</span></pre></div></div>



m&#246;chte man die Ausgabe in einer bestimmten Notation ist dies m&#246;glich durch


<div class="wp_syntax"><div class="code"><pre class="latex" style="font-family:monospace;"><span style="color: #800000; font-weight: normal;">\arabic</span><span style="color: #E02020; ">{</span><span style="color: #2020C0; font-weight: normal;">mycnt</span><span style="color: #E02020; ">}</span>  <span style="color: #2C922C; font-style: italic;">% Wert von mycounter als Textstring in arabischen Ziffern</span>
<span style="color: #800000; font-weight: normal;">\roman</span><span style="color: #E02020; ">{</span><span style="color: #2020C0; font-weight: normal;">mycnt</span><span style="color: #E02020; ">}</span>  <span style="color: #2C922C; font-style: italic;">% Wert von mycounter als Textstring in römischen Ziffern</span></pre></div></div>




von diesen Notationen gibt es weitere die hier nicht aufgef&#252;hrt sind.

Zur Rechnung stehen Counter nicht direkt zur Verf&#252;gung. Man kann sie jedoch einstellen und erh&#246;hen:


<div class="wp_syntax"><div class="code"><pre class="latex" style="font-family:monospace;"><span style="color: #800000; font-weight: normal;">\setcounter</span><span style="color: #E02020; ">{</span><span style="color: #2020C0; font-weight: normal;">mycounter</span><span style="color: #E02020; ">}{</span><span style="color: #2020C0; font-weight: normal;">2</span><span style="color: #E02020; ">}</span>     <span style="color: #2C922C; font-style: italic;">% mycounter = 2</span>
<span style="color: #800000; font-weight: normal;">\addtocounter</span><span style="color: #E02020; ">{</span><span style="color: #2020C0; font-weight: normal;">mycounter</span><span style="color: #E02020; ">}{</span><span style="color: #2020C0; font-weight: normal;">4</span><span style="color: #E02020; ">}</span>  <span style="color: #2C922C; font-style: italic;">% mycounter = 6</span>
<span style="color: #800000; font-weight: normal;">\addtocounter</span><span style="color: #E02020; ">{</span><span style="color: #2020C0; font-weight: normal;">mycounter</span><span style="color: #E02020; ">}{</span><span style="color: #2020C0; font-weight: normal;"><span style="color: #800000; font-weight: normal;">\value</span>{othercounter</span><span style="color: #E02020; ">}}</span></pre></div></div>




Eine Erh&#246;hung speziell um 1 erfolgt &#252;ber


<div class="wp_syntax"><div class="code"><pre class="latex" style="font-family:monospace;"><span style="color: #800000; font-weight: normal;">\stepcounter</span><span style="color: #E02020; ">{</span><span style="color: #2020C0; font-weight: normal;">mycounter</span><span style="color: #E02020; ">}</span> <span style="color: #2C922C; font-style: italic;">% Zähler um 1 inkrementieren</span></pre></div></div>




<h4 id="toc-lngenvariablen-length">L&#228;ngenvariablen (length)</h4>
Die L&#228;ngenvariablen entsprechen Flieskommazahlen (float) in eine gew&#246;hnlichen Programmiersprache. Diese L&#228;ngen werden in Abh&#228;ngigkeit einer Ma&#223;einheit (mm, cm, pt. . . ) abgespeichert. Die Definition und Zuweisung erfolgt analog zu den countern


<div class="wp_syntax"><div class="code"><pre class="latex" style="font-family:monospace;"><span style="color: #800000; font-weight: normal;">\newlength</span><span style="color: #E02020; ">{</span><span style="color: #2020C0; font-weight: normal;"><span style="color: #800000; font-weight: normal;">\mylen</span></span><span style="color: #E02020; ">}</span> <span style="color: #2C922C; font-style: italic;">%Deklaration</span>
<span style="color: #E02020; ">\</span><span style="color: #800000;">setlength</span><span style="color: #E02020; ">{</span><span style="color: #2020C0; font-weight: normal;"><span style="color: #800000; font-weight: normal;">\mylen</span></span><span style="color: #E02020; ">}{</span><span style="color: #2020C0; font-weight: normal;">&lt;NeueLänge&gt;</span><span style="color: #E02020; ">}</span> <span style="color: #2C922C; font-style: italic;">%Zuweisung</span>
<span style="color: #800000; font-weight: normal;">\addtolength</span><span style="color: #E02020; ">{</span><span style="color: #2020C0; font-weight: normal;"><span style="color: #800000; font-weight: normal;">\mylen</span></span><span style="color: #E02020; ">}{</span><span style="color: #2020C0; font-weight: normal;">&lt;ZusatzLänge&gt;</span><span style="color: #E02020; ">}</span> <span style="color: #2C922C; font-style: italic;">% Operator</span></pre></div></div>




L&#228;ngen k&#246;nnen auch variabel sein:


<div class="wp_syntax"><div class="code"><pre class="latex" style="font-family:monospace;"><span style="color: #E02020; ">\</span><span style="color: #800000;">setlength</span><span style="color: #E02020; ">{</span><span style="color: #2020C0; font-weight: normal;"><span style="color: #800000; font-weight: normal;">\mylen</span></span><span style="color: #E02020; ">}{</span><span style="color: #2020C0; font-weight: normal;">&lt;NeueLänge&gt;plus &lt;P&gt; minus &lt;M&gt;</span><span style="color: #E02020; ">}</span></pre></div></div>




Die Textausgabe  erh&#228;lt man durch ein Voranstellen von <code>\the</code>


<div class="wp_syntax"><div class="code"><pre class="latex" style="font-family:monospace;"><span style="color: #800000; font-weight: normal;">\the</span><span style="color: #800000; font-weight: normal;">\mylen</span></pre></div></div>




Die Ausgabe zwischen Countern und L&#228;ngen ist somit unterschiedlich


<div class="wp_syntax"><div class="code"><pre class="latex" style="font-family:monospace;"><span style="color: #800000; font-weight: normal;">\newcounter</span><span style="color: #E02020; ">{</span><span style="color: #2020C0; font-weight: normal;">mycounter</span><span style="color: #E02020; ">}</span>
<span style="color: #800000; font-weight: normal;">\themycounter</span>
<span style="color: #800000; font-weight: normal;">\newlength</span><span style="color: #E02020; ">{</span><span style="color: #2020C0; font-weight: normal;"><span style="color: #800000; font-weight: normal;">\mylength</span></span><span style="color: #E02020; ">}</span>
<span style="color: #800000; font-weight: normal;">\the</span><span style="color: #800000; font-weight: normal;">\mylength</span></pre></div></div>




Die jeweiligen TeX &#196;quivalente werden jedoch beide mit \the vorgestellt ausgegeben.


<div class="wp_syntax"><div class="code"><pre class="latex" style="font-family:monospace;"><span style="color: #800000; font-weight: normal;">\newcount</span><span style="color: #800000; font-weight: normal;">\mycounter</span>
<span style="color: #800000; font-weight: normal;">\the</span><span style="color: #800000; font-weight: normal;">\mycounter</span>
<span style="color: #800000; font-weight: normal;">\newskip</span><span style="color: #800000; font-weight: normal;">\mylength</span>
<span style="color: #800000; font-weight: normal;">\the</span><span style="color: #800000; font-weight: normal;">\mylength</span></pre></div></div>




Eine interessante Funktion in diesem Zusammenhang ist <code>\settowidth</code> welche die L&#228;nge eines Textes vermisst und in einem L&#228;ngenregister speichert.


<div class="wp_syntax"><div class="code"><pre class="latex" style="font-family:monospace;"><span style="color: #800000; font-weight: normal;">\settowidth</span><span style="color: #E02020; ">{</span><span style="color: #2020C0; font-weight: normal;"><span style="color: #800000; font-weight: normal;">\mylen</span></span><span style="color: #E02020; ">}{</span><span style="color: #2020C0; font-weight: normal;">Text</span><span style="color: #E02020; ">}</span> <span style="color: #2C922C; font-style: italic;">% misst die Breite von &quot;Text&quot;</span></pre></div></div>




<h4 id="toc-wahrheitswerte-boolean">Wahrheitswerte (boolean)</h4>
Die Wahrheitswerte entsprechen boolschen Variablen in eine gew&#246;hnlichen Programmiersprache. Hierf&#252;r wird das Paket <em>ifthen</em> ben&#246;tigt. Die Definition und Zuweisung erfolgt analog zu den Countern und L&#228;ngen


<div class="wp_syntax"><div class="code"><pre class="latex" style="font-family:monospace;"><span style="color: #800000; font-weight: normal;">\newboolean</span><span style="color: #E02020; ">{</span><span style="color: #2020C0; font-weight: normal;">boolvar</span><span style="color: #E02020; ">}</span> <span style="color: #2C922C; font-style: italic;">%Deklaration</span>
<span style="color: #800000; font-weight: normal;">\setboolean</span><span style="color: #E02020; ">{</span><span style="color: #2020C0; font-weight: normal;">boolvar</span><span style="color: #E02020; ">}{</span><span style="color: #2020C0; font-weight: normal;">false</span><span style="color: #E02020; ">}</span> <span style="color: #2C922C; font-style: italic;">%Zuweisung</span></pre></div></div>



Eine Abfrage des Werten erfolgt &#252;ber


<div class="wp_syntax"><div class="code"><pre class="latex" style="font-family:monospace;"><span style="color: #800000; font-weight: normal;">\boolean</span><span style="color: #E02020; ">{</span><span style="color: #2020C0; font-weight: normal;">boolvar</span><span style="color: #E02020; ">}</span></pre></div></div>




welcher z.B. bei if Abfragen genutzt wird


<div class="wp_syntax"><div class="code"><pre class="latex" style="font-family:monospace;"><span style="color: #800000; font-weight: normal;">\ifthenelse</span><span style="color: #E02020; ">{</span><span style="color: #2020C0; font-weight: normal;"><span style="color: #800000; font-weight: normal;">\boolean</span>{boolvar</span><span style="color: #E02020; ">}}{</span><span style="color: #2020C0; font-weight: normal;">}{</span><span style="color: #E02020; ">}</span></pre></div></div>




<h3 id="toc-rechnen-innerhalb-von-tex">Rechnen innerhalb von TeX</h3>
<ul>
	<li><code>\advance</code><br />


<div class="wp_syntax"><div class="code"><pre class="latex" style="font-family:monospace;"><span style="color: #800000; font-weight: normal;">\advance</span>&lt;Numerische Variable&gt; by &lt;Zahl&gt;</pre></div></div>



</li>
	<li><code>\divide</code><br />


<div class="wp_syntax"><div class="code"><pre class="latex" style="font-family:monospace;"><span style="color: #800000; font-weight: normal;">\divide</span>&lt;Numerische Variable&gt; by &lt;Zahl&gt;</pre></div></div>



</li>
	<li><code>\multiply</code><br />


<div class="wp_syntax"><div class="code"><pre class="latex" style="font-family:monospace;"><span style="color: #800000; font-weight: normal;">\multiply</span>&lt;Numerische Variable&gt; by &lt;Zahl&gt;</pre></div></div>



</li>
</ul>

<h3 id="toc-if-abfrage">If Abfrage</h3>
TeX kennt die Struktur


<div class="wp_syntax"><div class="code"><pre class="latex" style="font-family:monospace;"><span style="color: #800000; font-weight: normal;">\if</span>
...
<span style="color: #E02020; ">\</span><span style="color: #800000;">else</span>
...
<span style="color: #E02020; ">\</span><span style="color: #800000;">fi</span></pre></div></div>




wobei es eine gr&#246;&#223;ere Anzahl von vordefinierten If-Abragen gibt


<div class="wp_syntax"><div class="code"><pre class="latex" style="font-family:monospace;"><span style="color: #800000; font-weight: normal;">\ifundefined</span>
<span style="color: #800000; font-weight: normal;">\ifnum</span>
<span style="color: #800000; font-weight: normal;">\ifodd</span>
<span style="color: #800000; font-weight: normal;">\ifdim</span>
<span style="color: #800000; font-weight: normal;">\iftrue</span>
<span style="color: #800000; font-weight: normal;">\iffalse</span>
<span style="color: #E02020; ">\</span><span style="color: #800000;">ifx</span>
...</pre></div></div>




Hier einige Beispiel dazu 

<ul>
	<li>Test ob der Wert eines  Counter <code>\count0</code> kleiner ist als 100


<div class="wp_syntax"><div class="code"><pre class="latex" style="font-family:monospace;"><span style="color: #800000; font-weight: normal;">\ifnum</span><span style="color: #800000; font-weight: normal;">\count</span>0&lt;100
...
<span style="color: #E02020; ">\</span><span style="color: #800000;">else</span> ... <span style="color: #E02020; ">\</span><span style="color: #800000;">fi</span></pre></div></div>



</li>
	<li>Vergleich zweier Integerwerte


<div class="wp_syntax"><div class="code"><pre class="latex" style="font-family:monospace;"><span style="color: #2C922C; font-style: italic;">% Alles TeX und kein LaTeX Code!</span>
<span style="color: #800000; font-weight: normal;">\newcount</span><span style="color: #800000; font-weight: normal;">\WertA</span>
<span style="color: #800000; font-weight: normal;">\newcount</span><span style="color: #800000; font-weight: normal;">\WertB</span>
<span style="color: #800000; font-weight: normal;">\WertA</span>=20
<span style="color: #800000; font-weight: normal;">\WertB</span>=<span style="color: #800000; font-weight: normal;">\WertA</span>
<span style="color: #800000; font-weight: normal;">\ifnum</span><span style="color: #800000; font-weight: normal;">\WertA</span>=<span style="color: #800000; font-weight: normal;">\WertB</span>
	Werte stimmen überein
<span style="color: #E02020; ">\</span><span style="color: #800000;">fi</span></pre></div></div>



</li>
	<li>Vergleich von Dimensionswerten (L&#228;ngen): <code>\ifdim</code>


<div class="wp_syntax"><div class="code"><pre class="latex" style="font-family:monospace;"><span style="color: #800000; font-weight: normal;">\newlength</span><span style="color: #E02020; ">{</span><span style="color: #2020C0; font-weight: normal;"><span style="color: #800000; font-weight: normal;">\firstlen</span></span><span style="color: #E02020; ">}</span> 
<span style="color: #800000; font-weight: normal;">\newlength</span><span style="color: #E02020; ">{</span><span style="color: #2020C0; font-weight: normal;"><span style="color: #800000; font-weight: normal;">\secondlen</span></span><span style="color: #E02020; ">}</span> 
<span style="color: #800000; font-weight: normal;">\settowidth</span><span style="color: #E02020; ">{</span><span style="color: #2020C0; font-weight: normal;"><span style="color: #800000; font-weight: normal;">\firstlen</span></span><span style="color: #E02020; ">}{</span><span style="color: #2020C0; font-weight: normal;">Text</span><span style="color: #E02020; ">}</span> <span style="color: #2C922C; font-style: italic;">% misst die Breite von &quot;Text&quot;</span>
<span style="color: #800000; font-weight: normal;">\settowidth</span><span style="color: #E02020; ">{</span><span style="color: #2020C0; font-weight: normal;"><span style="color: #800000; font-weight: normal;">\secondlen</span></span><span style="color: #E02020; ">}{</span><span style="color: #2020C0; font-weight: normal;">anderer Text</span><span style="color: #E02020; ">}</span> <span style="color: #2C922C; font-style: italic;">% misst die Breite von &quot;anderer Text&quot;</span>
<span style="color: #800000; font-weight: normal;">\ifdim</span><span style="color: #800000; font-weight: normal;">\firstlen</span>=<span style="color: #800000; font-weight: normal;">\secondlen</span>
	Werte sind gleich und haben die Länge <span style="color: #800000; font-weight: normal;">\thefirstlen</span>
<span style="color: #E02020; ">\</span><span style="color: #800000;">else</span>
	Werte sind ungleich
<span style="color: #E02020; ">\</span><span style="color: #800000;">fi</span></pre></div></div>



Latex kennt das Kommando <code>\lengthtest{1pt < 2pt}</code> was dem <code>\ifdim</code> entspricht.
</li>
	<li>Testen ob eine Makro definiert ist (eine Definition als <code>\relax</code> reicht daf&#252;r aus)


<div class="wp_syntax"><div class="code"><pre class="latex" style="font-family:monospace;"><span style="color: #800000; font-weight: normal;">\ifundefined</span><span style="color: #E02020; ">{</span><span style="color: #2020C0; font-weight: normal;">TeX</span><span style="color: #E02020; ">}</span> 
	true text 
<span style="color: #E02020; ">\</span><span style="color: #800000;">else</span> 
	false text 
<span style="color: #E02020; ">\</span><span style="color: #800000;">fi</span></pre></div></div>



hierf&#252;r gibt es allerdings noch weitere M&#246;glichkeiten, siehe dazu auch <a href="/blog/2007/05/31/existenz-von-paketen-pruefen/" class="liinternal">Existenz von Paketen pr&#252;fen</a>
</li>
	<li>Testen von 'Gleichheit' zweier Makros ohne Sie zu expandieren: <code>\ifx</code>. Hier ein Beispiel aus dem TeXBook


<div class="wp_syntax"><div class="code"><pre class="latex" style="font-family:monospace;"><span style="color: #E02020; ">\</span><span style="color: #800000;">def</span><span style="color: #800000; font-weight: normal;">\a</span><span style="color: #E02020; ">{</span><span style="color: #2020C0; font-weight: normal;"><span style="color: #800000; font-weight: normal;">\c</span></span><span style="color: #E02020; ">}</span> 
<span style="color: #E02020; ">\</span><span style="color: #800000;">def</span><span style="color: #800000; font-weight: normal;">\b</span><span style="color: #E02020; ">{</span><span style="color: #2020C0; font-weight: normal;"><span style="color: #800000; font-weight: normal;">\d</span></span><span style="color: #E02020; ">}</span>
<span style="color: #E02020; ">\</span><span style="color: #800000;">def</span><span style="color: #800000; font-weight: normal;">\c</span><span style="color: #E02020; ">{</span><span style="color: #2020C0; font-weight: normal;"><span style="color: #800000; font-weight: normal;">\e</span></span><span style="color: #E02020; ">}</span> 
<span style="color: #E02020; ">\</span><span style="color: #800000;">def</span><span style="color: #800000; font-weight: normal;">\d</span><span style="color: #E02020; ">{</span><span style="color: #2020C0; font-weight: normal;"><span style="color: #800000; font-weight: normal;">\e</span></span><span style="color: #E02020; ">}</span> 
<span style="color: #E02020; ">\</span><span style="color: #800000;">def</span><span style="color: #800000; font-weight: normal;">\e</span><span style="color: #E02020; ">{</span><span style="color: #2020C0; font-weight: normal;">A</span><span style="color: #E02020; ">}</span>
<span style="color: #E02020; ">\</span><span style="color: #800000;">ifx</span><span style="color: #800000; font-weight: normal;">\c</span><span style="color: #800000; font-weight: normal;">\d</span>
	 wahr
<span style="color: #E02020; ">\</span><span style="color: #800000;">fi</span>
<span style="color: #E02020; ">\</span><span style="color: #800000;">ifx</span><span style="color: #800000; font-weight: normal;">\a</span><span style="color: #800000; font-weight: normal;">\b</span>
	 nicht wahr
<span style="color: #E02020; ">\</span><span style="color: #800000;">fi</span></pre></div></div>



Die Frage wann das Ergebnis true zur&#252;ckgibt ist komplex und wird vom TeXBook wie folgt beschrieben
<blockquote>
The condition is true if (a) the two tokens are not macros, and they both represent the same (character code, category code) pair or the same TEX primitive or the same \font or \chardef or \countdef, etc.; or if (b) the two tokens are macros, and they both have the same status with respect to \long and \outer, and they both have the same parameters and &ldquo;top level&rdquo; expansion.
</blockquote>
</li>
</ul>
LaTeX bietet zum Testen von If Abfragen noch die Befehle <code>\equal {\Makro }{ ABC }</code>, <code>\and</code>, <code>\or</code>, <code>\not</code> sowie zum Schachteln von Bedingungen die Klammern , <code>\(</code> und , <code>\)</code>.

<p>Weitere M&#246;glichkeiten zu If-Anweisungen sind hier dargestellt:
<a href="http://handyfloss.wordpress.com/2007/08/29/latex-programming-how-to-implement-conditionals/" title="LaTeX programming: how to implement conditionals" target="_blank" class="liexternal"></a></p>

<h4 id="toc-ifcase-anweisung"><code>\ifcase</code> Anweisung</h4>
Diese Abfrage ist vergleichbar mit einer switch Anweisung. Sie hat die Syntax


<div class="wp_syntax"><div class="code"><pre class="latex" style="font-family:monospace;"><span style="color: #800000; font-weight: normal;">\ifcase</span><span style="color: #800000; font-weight: normal;">\number</span> 
         text for case 0 
<span style="color: #800000; font-weight: normal;">\or</span> 
         text for case 1 
<span style="color: #800000; font-weight: normal;">\or</span>
         ...
<span style="color: #800000; font-weight: normal;">\or</span>
          text for case n
 <span style="color: #E02020; ">\</span><span style="color: #800000;">else</span> 
         text for all other cases 
<span style="color: #E02020; ">\</span><span style="color: #800000;">fi</span></pre></div></div>



Hierbei wird &#252;ber die Zahlen von \number die Anweisung ausgew&#228;hlt.

<h3 id="toc-tex-funktionen">TeX Funktionen</h3>
Nur eine Auswahl...
<ul>
	<li><code>\string</code><br /> gibt ein folgendes Kommando inklusive dem Backspace aus</li>
	<li><code>\relax</code><br />Donald Knuth schreibt dazu das es TeX sagt:"do nothing." Dar&#252;ber hinaus f&#252;hrt es dazu dass Makros die auf darauffolgende Tokens agieren mit diesem Befehl keine weiteren Token aktzeptieren.</li>
</ul>

<h3 id="toc-latex-funktionen">LaTeX Funktionen</h3>
Nur eine Auswahl...
<ul>
	<li><code>\g@addto@macro</code><br /> 
H&#228;ngt weitere Befehle an ein bestehendes Makro an


<div class="wp_syntax"><div class="code"><pre class="latex" style="font-family:monospace;"><span style="color: #800000; font-weight: normal;">\g</span>@addto@macro<span style="color: #E02020; ">{</span><span style="color: #2020C0; font-weight: normal;">\&lt;macroname&gt;</span><span style="color: #E02020; ">}{</span><span style="color: #2020C0; font-weight: normal;">&lt;Zus. Befehle&gt;</span><span style="color: #E02020; ">}</span></pre></div></div>



</li>
</ul>

<h3 id="toc-schleifen">Schleifen</h3>
<h4 id="toc-whiledo-nur-latex">\whiledo (nur LaTex)</h4>
Ben&#246;tigt das Paket <em>ifthen</em>. Im Beispiel wird zus&#228;tzlich das Paket <em>pifont</em> ben&#246;tigt.


<div class="wp_syntax"><div class="code"><pre class="latex" style="font-family:monospace;"><span style="color: #800000; font-weight: normal;">\newcounter</span><span style="color: #E02020; ">{</span><span style="color: #2020C0; font-weight: normal;">ctra</span><span style="color: #E02020; ">}</span>
<span style="color: #800000; font-weight: normal;">\setcounter</span><span style="color: #E02020; ">{</span><span style="color: #2020C0; font-weight: normal;">ctra</span><span style="color: #E02020; ">}{</span><span style="color: #2020C0; font-weight: normal;">1</span><span style="color: #E02020; ">}</span>
<span style="color: #800000; font-weight: normal;">\whiledo</span> <span style="color: #E02020; ">{</span><span style="color: #2020C0; font-weight: normal;"><span style="color: #800000; font-weight: normal;">\value</span>{ctra</span><span style="color: #E02020; ">}</span> &lt; 7<span style="color: #E02020; ">}</span><span style="color: #2C922C; font-style: italic;">%</span>
<span style="color: #E02020; ">{</span><span style="color: #2C922C; font-style: italic;">%</span>
<span style="color: #800000; font-weight: normal;">\thectra</span> <span style="color: #E02020; ">{</span><span style="color: #2020C0; font-weight: normal;"><span style="color: #800000; font-weight: normal;">\large</span> <span style="color: #800000; font-weight: normal;">\ding</span>{111</span><span style="color: #E02020; ">}}</span><span style="color: #2C922C; font-style: italic;">%</span>
<span style="color: #800000; font-weight: normal;">\stepcounter</span> <span style="color: #E02020; ">{</span><span style="color: #2020C0; font-weight: normal;">ctra</span><span style="color: #E02020; ">}</span><span style="color: #2C922C; font-style: italic;">%</span>
<span style="color: #E02020; ">}</span></pre></div></div>



Ausgabe:<br/>
<img src='/latexrender/pictures/96a775588b27c131ca26ee379f8fdee8.png' title='\newcounter{ctra}\setcounter{ctra}{1}\whiledo {\value{ctra} &lt; 7}{\thectra {\large \ding{111}}\stepcounter {ctra}}' alt='\newcounter{ctra}\setcounter{ctra}{1}\whiledo {\value{ctra} &lt; 7}{\thectra {\large \ding{111}}\stepcounter {ctra}}' align=absmiddle>

<h4 id="toc-loop-tex">\loop (TeX)</h4>


<div class="wp_syntax"><div class="code"><pre class="latex" style="font-family:monospace;"><span style="color: #800000; font-weight: normal;">\loop</span>
	<span style="color: #800000; font-weight: normal;">\ifnum</span><span style="color: #800000; font-weight: normal;">\n</span>&gt;0 <span style="color: #2C922C; font-style: italic;">% Abbruchbedingung (\if ohne \fi)</span>
...
<span style="color: #800000; font-weight: normal;">\repeat</span></pre></div></div>




<h4 id="toc-for-schleife-latex">For Schleife (LaTeX)</h4>
Das <em>forloop</em> Paket stellt eine for Schleife zur Verf&#252;gung.


<div class="wp_syntax"><div class="code"><pre class="latex" style="font-family:monospace;"><span style="color: #800000; font-weight: normal;">\newcounter</span><span style="color: #E02020; ">{</span><span style="color: #2020C0; font-weight: normal;">ct</span><span style="color: #E02020; ">}</span>
<span style="color: #800000; font-weight: normal;">\forloop</span><span style="color: #E02020; ">{</span><span style="color: #2020C0; font-weight: normal;">ct</span><span style="color: #E02020; ">}{</span><span style="color: #2020C0; font-weight: normal;">1</span><span style="color: #E02020; ">}{</span><span style="color: #2020C0; font-weight: normal;"><span style="color: #800000; font-weight: normal;">\value</span>{ct</span><span style="color: #E02020; ">}</span> &lt; 5<span style="color: #E02020; ">}</span><span style="color: #2C922C; font-style: italic;">%</span>
<span style="color: #E02020; ">{</span><span style="color: #2C922C; font-style: italic;">%</span>
	<span style="color: #800000; font-weight: normal;">\arabic</span><span style="color: #E02020; ">{</span><span style="color: #2020C0; font-weight: normal;">ct</span><span style="color: #E02020; ">}</span>
<span style="color: #E02020; ">}</span></pre></div></div>



Ausgabe:<br/>
<img src='/latexrender/pictures/040bfdd7faff0ef7a15fd9ed06d00cda.png' title='\newcommand{\forloop}[5][1]{\setcounter{#2}{#3}\ifthenelse{#4}{#5\addtocounter{#2}{#1}    \forloop[#1]{#2}{\value{#2}}{#4}{#5}}{}}\newcounter{ct}\forloop{ct}{1}{\value{ct} &lt; 5}{\arabic{ct}}' alt='\newcommand{\forloop}[5][1]{\setcounter{#2}{#3}\ifthenelse{#4}{#5\addtocounter{#2}{#1}    \forloop[#1]{#2}{\value{#2}}{#4}{#5}}{}}\newcounter{ct}\forloop{ct}{1}{\value{ct} &lt; 5}{\arabic{ct}}' align=absmiddle>

<div class="related-posts">
<h4>Related Posts</h4>
<ol>
		<li><a href="http://www.matthiaspospiech.de/blog/2007/08/08/latex-wiki/" rel="bookmark">LaTeX Wiki</a><!-- (6.4)--></li>
		<li><a href="http://www.matthiaspospiech.de/blog/2008/07/20/bbclone-in-mediawiki/" rel="bookmark">bbclone in mediawiki</a><!-- (6.4)--></li>
		<li><a href="http://www.matthiaspospiech.de/blog/2011/12/09/erstellung-von-bachelor-und-masterarbeiten-mit-latex/" rel="bookmark">Erstellung von Bachelor und Masterarbeiten mit LaTeX</a><!-- (6.2)--></li>
	</ol>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.matthiaspospiech.de/blog/2008/04/13/latex-variablen-if-abfragen-und-schleifen/feed/</wfw:commentRss>
		<slash:comments>18</slash:comments>
		</item>
		<item>
		<title>LaTeX Wiki</title>
		<link>http://www.matthiaspospiech.de/blog/2007/08/08/latex-wiki/</link>
		<comments>http://www.matthiaspospiech.de/blog/2007/08/08/latex-wiki/#comments</comments>
		<pubDate>Wed, 08 Aug 2007 08:52:49 +0000</pubDate>
		<dc:creator>pospiech</dc:creator>
				<category><![CDATA[LaTeX]]></category>
		<category><![CDATA[wikis]]></category>
		<category><![CDATA[wiki]]></category>

		<guid isPermaLink="false">http://www.matthiaspospiech.de/blog/2007/08/08/latex-wiki/</guid>
		<description><![CDATA[HintergrundInhalteExistierende LaTeX Wikiswww.latexwiki.org Hintergrund Die LaTeX Community verf&#252;gt &#252;ber eine Vielzahl an Webseiten, darunter jedoch nur sehr wenige die als zentrale Anlaufstellen gelten k&#246;nnen. Dass der Bedarf an Webseiten zum Thema LaTeX gro&#223; ist kann ich an den Besucherzahlen meiner Seiten einsehen, da diese pro Monat in der Gr&#246;&#223;enordnung von 20.000 Hits liege. Meine eigene [...]
<div class="related-posts">
<h4>Related Posts</h4>
<ol>
		<li><a href="http://www.matthiaspospiech.de/blog/2007/07/22/mediawiki-and-latex/" rel="bookmark">mediawiki and LaTeX</a><!-- (7.7)--></li>
		<li><a href="http://www.matthiaspospiech.de/blog/2007/08/08/converting-latex-output-into-images-on-a-webserver/" rel="bookmark">Converting LaTeX output into images on a webserver</a><!-- (7.1)--></li>
		<li><a href="http://www.matthiaspospiech.de/blog/2007/06/25/syntaxhighlighting-von-latex-in-webseiten/" rel="bookmark">Syntaxhighlighting von LaTeX in Webseiten</a><!-- (6.7)--></li>
	</ol>
</div>
]]></description>
			<content:encoded><![CDATA[<a id="toc"></a><ol class="toc"><li><a href="http://www.matthiaspospiech.de/blog/2007/08/08/latex-wiki/#toc-hintergrund" class="liinternal">Hintergrund</a></li><li><a href="http://www.matthiaspospiech.de/blog/2007/08/08/latex-wiki/#toc-inhalte" class="liinternal">Inhalte</a></li><li><a href="http://www.matthiaspospiech.de/blog/2007/08/08/latex-wiki/#toc-existierende-latex-wikis" class="liinternal">Existierende LaTeX Wikis</a></li><li><a href="http://www.matthiaspospiech.de/blog/2007/08/08/latex-wiki/#toc-www-latexwiki-org" class="liinternal">www.latexwiki.org</a></li></ol>

<h3 id="toc-hintergrund">Hintergrund</h3>
Die LaTeX Community verf&#252;gt &#252;ber eine Vielzahl an Webseiten, darunter jedoch nur sehr wenige die als zentrale Anlaufstellen gelten k&#246;nnen. Dass der Bedarf an Webseiten zum Thema LaTeX gro&#223; ist kann ich an den Besucherzahlen meiner Seiten einsehen, da diese pro Monat in der Gr&#246;&#223;enordnung von 20.000 Hits liege. Meine eigene Seite ist jedoch von mir nicht daf&#252;r ausgelegt von verschiedenen Autoren bearbeitet zu werden (auch wenn das durchaus m&#246;glich w&#228;re). Dies w&#252;rde jedoch ein Wiki erm&#246;glichen. Dabei stellt sich ganz grunds&#228;tzlich die Frage welche Inhalte in einem solchen Wiki enthalten sein k&#246;nnten.

<span id="more-147"></span>

<h3 id="toc-inhalte">Inhalte</h3>
M&#246;gliche Inhalte eines LaTeX Wikis
<ul>
	<li>Verlinkung und Beschreibung der wesentlichen Dokumentation und Webseiten sortiert nach Themen. Das ist der Ausgangspunkt dieser Seite und sehr erfolgreich.</li>
	<li>Erstellung von kleinen Tutorials (Howtos). Diese gibt es nat&#252;rlich auch als Dokumente (pdf) und FAQs. Hier steht jedoch die M&#246;glichkeit der schnellen Verf&#252;gbarkeit im Vordergrund. Sollte ein Artikel im Wiki ausgereift sein kann man noch immer ein Dokument daraus machen.</li>
	<li>Ein &#196;quivalent zu selfhtml. Mit der M&#246;glichkeit den Quellcode und das LaTeX Ergebnis darzustellen ergeben sich M&#246;glichkeiten die in der Form bislang nicht online verf&#252;gbar sind.</li>
	<li>Jedoch keine Erstellung oder Duplikation von Dokumentationen, da diese besser in Dokumenten aufgehoben sind</li>
</ul>

<h3 id="toc-existierende-latex-wikis">Existierende LaTeX Wikis</h3>
Betrachten wir zuerst die existierenden LaTeX Wiki Webseiten:
<ul>
	<li><a href="http://latex.wissens-quelle.de/" class="liexternal">http://latex.wissens-quelle.de/</a></li>
	<li><a href="http://www.wurmloch.ch/latexwiki/" class="liexternal">http://www.wurmloch.ch/latexwiki/</a></li>
	<li><a href="http://www.kkittel.de/wiki/index.php?title=Hauptseite" class="liexternal">http://www.kkittel.de/wiki/</a></li>
</ul>

Die beiden ersten Webseiten erscheinen mir keine optimale L&#246;sung f&#252;r eine LaTeX Wiki zu sein. Die erste hat eine mir vollkommen unbekannte Wikisoftware, so dass ich vermute dass diese vom Autor selbst programmiert wurde. Dies erscheint mir kein guter Ausgangspunkt f&#252;r sp&#228;tere &#196;nderungen an den M&#246;glichkeiten der Wikisoftware zu sein, vergleicht man diese mit den Extensions die mediawiki bietet (z.B. Export nach latex, xml oder pdf). Zudem enth&#228;lt die Seite fast keinen Inhalt. Die zweite Seite hat ebenso wie die erste einen merkw&#252;rdigen Dom&#228;nennamen. Sie basiert auf mediawiki, enth&#228;lt jedoch anscheint keine wikitex Extension. Leider ist die Seite ohne Stuktur auf der Startseite und enth&#228;lt relativ wenig Inhalt (siehe <a href="http://www.wurmloch.ch/latexwiki/index.php?title=Spezial:Alle_Seiten" class="liexternal">Spezial:Alle Seiten</a>), der zudem h&#228;ufig Fehler enth&#228;lt die in <a href="ftp://ftp.dante.de/pub/tex/info/german/l2tabu/l2tabu.pdf" class="lipdf">l2tabu.pdf</a> dokumentiert sind.
Die dritte Webseite besticht durch eine sehr &#252;bersichtliche Startseite. Leider ist auch diese Seite an die Dom&#228;ne des Administrators gebunden und hat leider als Editor nur den Administrator. Von den Inhalten her ist diese Seite wie die anderen auch relativ leer, dennoch besticht die Gegen&#252;berstellung von Quellcode und Ergebnissen, wie z.B. bei <a href="http://www.kkittel.de/wiki/index.php?title=Einfache_Listen" class="liexternal">Einfache Listen</a>. Leider beruht dies ebenfalls nicht auf wikitex, sondern nutzt hochgeladene Bilder.

Nicht unerw&#228;hnt bleiben sollten die wikibooks (<a href="http://en.wikibooks.org/wiki/LaTeX" class="liexternal">http://en.wikibooks.org/wiki/LaTeX</a>) zu LaTeX. Diese beruhen selbstverst&#228;ndlich auf einem Wiki haben jedoch ein sehr klaren und eingegrenzten Aufgabenbereich und sind daher kein LaTeX Wiki in dem hier beschriebenen Sinne.

<h3 id="toc-www-latexwiki-org">www.latexwiki.org</h3>
Aufgrund der Diskussion im <a href="http://www.mrunix.de/forums/forumdisplay.php?f=38" class="liexternal">LaTeX Forum</a> zur <a href="http://www.mrunix.de/forums/showthread.php?t=52196" class="liexternal">Erstellung eines LaTeX Wikis</a> habe ich ein Wiki mit mediawiki aufgesetzt, dass &#252;ber ausreichend Erweiterungen verf&#252;gt die mir notwendig und sinnvoll erscheinen, sowie die M&#246;glichkeit bietet LaTeX auf der Webseite mittels wikitex &#252;bersetzen zu lassen. Daf&#252;r musste ich allerdings wikitex ein wenig umschreiben.

Diese Wiki ist inzwischen online unter: <a href="http://www.latexwiki.org/" class="liexternal">http://www.latexwiki.org/</a>. 

Auf folgende Unterseiten m&#246;chte ich dabei hinweisen:
<ul>
	<li><a href="http://www.latexwiki.org/Erweiterungen" class="liexternal">Erweiterungen</a> Syntaxhighlighting und LaTeX Ausgabe</li>
	<li><a href="http://www.latexwiki.org/LaTeX_Community" class="liexternal">LaTeX Community</a></li>
</ul>

Die Struktur der Webseite ist bislang nur eine Vorstellung dessen was m&#246;glich ist und was mir sinnvoll erschien. Da ich die Webseite nicht als mein Projekt ansehe ist es jedem registrierten Benutzer freigestellt dies umzustellen.
Die Startseite bedarf jedoch in jeder Weise noch einer &#220;berarbeitung.

Ich hoffe das diese Webseite in Zukunft auch genutzt und vor allem mit Inhalten gef&#252;llt wird.





<div class="related-posts">
<h4>Related Posts</h4>
<ol>
		<li><a href="http://www.matthiaspospiech.de/blog/2007/07/22/mediawiki-and-latex/" rel="bookmark">mediawiki and LaTeX</a><!-- (7.7)--></li>
		<li><a href="http://www.matthiaspospiech.de/blog/2007/08/08/converting-latex-output-into-images-on-a-webserver/" rel="bookmark">Converting LaTeX output into images on a webserver</a><!-- (7.1)--></li>
		<li><a href="http://www.matthiaspospiech.de/blog/2007/06/25/syntaxhighlighting-von-latex-in-webseiten/" rel="bookmark">Syntaxhighlighting von LaTeX in Webseiten</a><!-- (6.7)--></li>
	</ol>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.matthiaspospiech.de/blog/2007/08/08/latex-wiki/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

<!-- Dynamic page generated in 2.398 seconds. -->
<!-- Cached page generated by WP-Super-Cache on 2012-01-24 21:13:03 -->

