![]() |
Professional Typesetting |
Bibliographies formatting is complicated, and over the years this has led to the development of a lot of BibTeX styles and tools like custom-bib. For biblatex users the output style can be altered from within LaTeX, and while there is not yet an equivalent of custom-bib for biblatex there is some excellent advice available for developing new styles.
One of the key ideas of is to make it possible to address the citation styles in fields where BibTeX could never provide the correct tools. That shows up most obviously in humanities, where the position of citations in the output needs to feed back into how they appear. Life gets even more complicated when you consider areas that need specialised fields included in their bibliographies: a classic example is law. There are already developments under-way to help support these situation, for example Biber-based flexible data model. Addressing the needs of style authors properly requires co-ordination between the core biblatex team and the style creators, and between different style authors. The question of how to achieve this communication came up recently on TeX-sx.
There are at least a couple of obvious ways for people to stay in touch with each other. First, where there is a need for a specific function to be added to biblatex, the package GitHub site is the place to go. Adding issues makes sure that they don’t get lost in direct e-mails, and also ensures that anyone with a point of view can comment. Secondly, for more open discuss TUG have a bibliography mailing list. To date, this has not been very heavy in terms of traffic, but it would be an ideal forum to co-ordinate effort. It’s publicly archived and anyone can join, so there is no danger of loosing important comments.
Of course, there are other ways to communicate too! All of the team are active on TeX-sx, and when we can we pick up biblatex issues and add them to the to do list. Direct e-mail works too, and I’m sure some style authors will go for direct communication. The key thing is to use the power of biblatex to make life easier for the end-user.
Hier jetzt der finale Teil unserer Reihe, der Anpassung des originalen komplexen XSL Sheets auf unsere Bedürfnisse:
Die erste Anforderung ist leicht umzusetzen, wir setzen statt des original Match auf das “map” Element einfach unseren ein:
<xsl:template match="map"> <xsl:text> \documentclass[ngerman]{scrreprt} \usepackage[utf8]{inputenc} \usepackage[]{babel} \usepackage[T1]{fontenc} \author{Uwe Ziegenhagen} \title{</xsl:text><xsl:value-of select="node/@TEXT"/><xsl:text>} \begin{document} \maketitle \tableofcontents </xsl:text> <xsl:apply-templates/> <xsl:text> \end{document} </xsl:text> </xsl:template>
”
Was die zweite Anforderung angeht: Wir haben ja schon im dritten Teil unserer Reihe gesehen, dass der Call auf das “itemize” Matching problemlos ausgeführt werden kann, selbst wenn die entsprechenden Mindmaps viel kleiner sind. Es reicht daher, in der XSLT Datei einfach im subparagraph Teil die IF Abfrage zu entfernen:
<!-- <xsl:if test="current()/node/richcontent/html/body/p/@text"> --> <xsl:call-template name="itemization"></xsl:call-template> <!-- </xsl:if> -->
Hier jetzt die finale Version, wie sie aktuell bei mir im Einsatz ist: mm2latexr_richcontent_v1.02_uwe. Der erzeugte TeX Code ist bei den itemizes nicht besonders gut eingerückt, aber auf absehbare Zeit kann ich damit leben.
For a while now we’ve been promising to update the floating point functions in LaTeX3 to provide an expandable approach to calculations. We are now making good progress in swapping the old code for the new material. There are still a few things to be decided, but the general plan looks pretty clear.
The new code lets you parse floating point expressions in the same way you can for integers. So you can write
\fp_eval:n { 10 / 3 + 0.35 }
and get the output
3.683333333333333
without needing to worry about working with dimensions. Even more usefully, there are a range of built in mathematical functions, so things like
\fp_eval:n { sin ( pi / 3 ) }
gives
0.8660254037844386
as you’d want.
You might pick up from the above output that the new FPU works to a higher accuracy than the old one: 16 significant figures. That’s been done without a bad performance hit: great credit goes to Bruno Le Floch for the work on this. Of course, you don’t have to have 16 figure output: the code includes rounding functions and various display options, so for example
\fp_eval:n { round ( sin ( pi / 3 ) , 3 ) }
At the moment you’ll have to grab the latest development code to get this new version as part of expl3, but it will be in the next CTAN snapshot some time in June. You might also find that not every function you want implemented is available: for example, there are currently no inverse trigonometric functions. Those are all on the to do list, but there not needed for typesetting so may be a little while.
Setzt man Tabellen im Querformat, muss man den Kopf für die Bildschirmanzeige drehen, was auf Dauer lästig ist. Das pdflscape Paket behebt diesen Umstand, indem es die entsprechenden PDF Seiten ebenfalls dreht.
\documentclass{scrartcl} \usepackage{pdflscape} \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} \usepackage{booktabs} \usepackage[]{blindtext} \begin{document} \blindtext \clearpage \begin{landscape} \blindtext \end{landscape} \end{document}
Karl Berry hat heute bekanntgegeben, daß TeX Live 2011 eingefroren wurde. Es wird also von nun an keine weiteren Updates mehr für diese Version der TeX-Distribution geben. Alle weiteren Neuerungen fließen dem derzeitigen Fahrplan zufolge noch bis Ende Mai in die Nachfolgeversion TeX Live 2012 ein. Der Release ist für Mitte Juni 2012 vorgesehen. Danach wird die DVD erstellt und an die Mitglieder der TeX-Anwendervereinigungen versandt. Bis dahin laufen die Pretests für TeX Live 2012 und MacTeX, an denen sich jeder beteiligen kann.
Unter http://www.organspendeausweis.org/Organspendeausweis.pdf kann man eine Vorlage für den Organspendeausweis herunterladen. Mit LaTeX lässt sich diese Vorlage recht einfach ausfüllen.
\documentclass{scrartcl} \usepackage[a4paper,landscape,top=0pt,bottom=0pt,left=0pt,right=0pt]{geometry} \usepackage[ngerman]{babel} \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} \usepackage{booktabs} \usepackage[]{graphicx} \usepackage{rotating} \setlength{\parindent}{0pt} \usepackage[absolute,overlay]{textpos} \setlength{\TPHorizModule}{1mm} \setlength{\TPVertModule}{1mm} \begin{document} \includegraphics[scale=0.999]{Organspendeausweis.pdf} \begin{textblock*}{50mm}(42mm,122mm) \texttt{Mustermann, Max} \end{textblock*} \begin{textblock*}{50mm}(95mm,122mm) \texttt{01.02.1923} \end{textblock*} \begin{textblock*}{50mm}(42mm,128mm) \texttt{Musterweg 18} \end{textblock*} \begin{textblock*}{50mm}(80mm,128mm) \texttt{12345~Musterdorf} \end{textblock*} \begin{textblock*}{50mm}(110.5mm,87.25mm) \texttt{X} \end{textblock*} \begin{textblock*}{50mm}(88mm,45mm) \begin{turn}{180}\texttt{12.05.2012}\end{turn} \end{textblock*} %%%%%%%%%%%%%%%%%%%%%%%%% \begin{textblock*}{50mm}(172mm,122mm) \texttt{Mustermann, Max} \end{textblock*} \begin{textblock*}{50mm}(225mm,122mm) \texttt{01.02.1923} \end{textblock*} \begin{textblock*}{50mm}(172mm,128mm) \texttt{Musterweg 18} \end{textblock*} \begin{textblock*}{50mm}(210mm,128mm) \texttt{12345~Musterdorf} \end{textblock*} \begin{textblock*}{50mm}(241mm,87.25mm) \texttt{X} \end{textblock*} \begin{textblock*}{50mm}(218mm,45mm) \begin{turn}{180}\texttt{12.05.2012}\end{turn} \end{textblock*} \end{document}
Nach Teil 1 und Teil 2 wird es jetzt Zeit, das XSLT anzupassen. Ziel ist es, ein selbstständig kompilierbares TeX-Dokument zu bekommen und — falls meine XSLT Kenntnisse reichen — den Export für die tieferen Ebenen als itemize zu fixen.
Teil 1 der Anforderung ist recht schnell umgesetzt. Es reicht, den Teil zu editieren, der das map Tag matcht:
<xsl:template match="map"> <xsl:text> \documentclass[ngerman]{scrreprt} \usepackage[utf8]{inputenc} \usepackage[]{babel} \usepackage[T1]{fontenc} \author{Uwe Ziegenhagen} \title{</xsl:text><xsl:value-of select="node/@TEXT"/><xsl:text>} \begin{document} \maketitle \tableofcontents </xsl:text> <xsl:apply-templates/> <xsl:text> \end{document} </xsl:text>
Für den zweiten Teil, die korrekte Ausgabe der itemize Umgebungen, müssen wir etwas tiefer in die Materie steigen. Um selbst wieder ins Thema reinzukommen, habe ich ein Minimalbeispiel minimal.xslt des XLST Sheets erstellt, das zum Testen genutzt wird.
Um nicht jedes Mal in Freemind den Export starten zu müssen, habe ich mir die Binärversion von Saxon installiert, der Aufruf lautet dann:
transform -xsl:minimal.xsl -t -s:minimal.mm -o:minimal.tex
Aus der folgenden Freemind Map wird dann der nachfolgende TeX-Code erzeugt:
\documentclass[ngerman]{scrreprt} \usepackage[utf8]{inputenc} \usepackage[]{babel} \usepackage[T1]{fontenc} \author{Uwe Ziegenhagen} \title{Minimal} \begin{document} \maketitle \tableofcontents \section{Hallo} \begin{itemize} \item A1 \item A2 \begin{itemize} \item B1 \item B2 \item B3 \end{itemize} \item A3 \end{itemize} \end{document}
Vom Umbruch noch nicht perfekt, es kompiliert aber problemlos. Wie sieht jetzt die entsprechende XSLT-Datei aus:
<?xml version='1.0'?> <xsl:stylesheet xmlns:xsl='http://www.w3.org/1999/XSL/Transform' version='1.0'> <xsl:output omit-xml-declaration="yes" encoding="ISO-8859-1"/> <xsl:template match="map"> <xsl:text> \documentclass[ngerman]{scrreprt} \usepackage[utf8]{inputenc} \usepackage[]{babel} \usepackage[T1]{fontenc} \author{Uwe Ziegenhagen} \title{</xsl:text><xsl:value-of select="node/@TEXT"/><xsl:text>} \begin{document} \maketitle \tableofcontents </xsl:text> <xsl:apply-templates/> <xsl:text> \end{document} </xsl:text> </xsl:template> <xsl:template match="node"> <xsl:if test="(count(ancestor::node())-2)=0"> <xsl:apply-templates/> </xsl:if> <xsl:if test="(count(ancestor::node())-2)=1"> <xsl:text>\section{</xsl:text><xsl:value-of select="@TEXT"/><xsl:text>}</xsl:text> <xsl:if test="current()/node"> <xsl:call-template name="itemization"></xsl:call-template> </xsl:if> </xsl:if> </xsl:template> <xsl:template name="itemization"> <xsl:param name="i" select="current()/node"/> <xsl:text> \begin{itemize}</xsl:text> <xsl:for-each select="$i"> <xsl:choose> <xsl:when test="@TEXT"> <xsl:text> \item </xsl:text><xsl:value-of select="@TEXT"/><xsl:text></xsl:text> </xsl:when> <xsl:otherwise> </xsl:otherwise> </xsl:choose> <xsl:if test="current()/node"> <xsl:call-template name="itemization"></xsl:call-template> </xsl:if> <xsl:text> </xsl:text> </xsl:for-each> <xsl:text>\end{itemize}</xsl:text> </xsl:template> </xsl:stylesheet>
Es ist das gleiche map Matching, wie oben erwähnt. Von den Node Matches habe ich die meisten entfernt, nur das 0er und 1er sind übriggeblieben. Einen Unterschied gibt es: im 1er Matching wird explizit das itemize Matching aufgerufen: <xsl:call-template name="itemization"></xsl:call-template>. Dieses wiederum habe ich der originalen XSL Datei von http://sites.google.com/site/freemind2beamer/Home/freemind2latex entnommen, hier fanden keine Anpassungen statt.
In Teil 4 werden wir das erlangte Wissen dann auf die ursprüngliche XSLT Datei anwenden und das Beispiel fertigstellen.
Ich möchte per Mausklick auf eine Powershell-Datei alle LaTeX Dateien in dem entsprechenden Verzeichnis kompilieren. Dazu muss das Skript das Verzeichnis kennen, in dem es liegt. Auf http://leftlobed.wordpress.com/2008/06/04/getting-the-current-script-directory-in-powershell/ habe ich eben eine Lösung gefunden, die mir diesen Pfad ausgibt, zusammen mit dem Messagebox Code ist dies der erste Schritt zum “TeXe alles” Skript.
function Get-ScriptDirectory{ $Invocation = (Get-Variable MyInvocation -Scope 1).Value Split-Path $Invocation.MyCommand.Path } $wshshell = new-object -comobject wscript.shell $Answer = $wshshell.popup((Get-ScriptDirectory),0,"Aktueller Pfad",4)
Today Karl Berry announced on the TeX Live mailing list, that in about one week (May 10) TeX Live 2011 and tlnet will be frozen, and the building of the pretest version of TeX Live 2012 will start shortly after that.
So the schedule for the release of TeX 2012 is, as it can be read on the TeX Live homepage:
This is the plan, changes are still possible as it depends on the time of the developers and contributors.
The LaTeX Project Public License (LPPL) was written to allow development of LaTeX code in a way that is free as in speech while also making sure that LaTeX users get what they expect when they
\usepackage{foo}
Frank Mittelbach wrote an excellent overview of how the LPPL was developed for TUGBoat last year, where he discussed the balance between the rights of the coder and the rights of the person using the code!
The LPPL is designed to deal with packages which are both ‘maintained’ and ‘unmaintained’, and provides a way to allow new maintainers to take over unmaintained material. It also allows for packages to be ‘author-maintained’, which sounds similar to just ‘maintained’ but is significantly different.
Packages which are either ‘maintained’ or ‘author-maintained’ have one or more people looking after it, and they are responsible for making changes to the code. The difference comes if those people disappear (as has happened recently with biblatex). With a ‘maintained’ package, it’s possible for a new person or team to make a public statement that they are going to take over, then after a delay they become the new maintainers. On the other hand, a package which is ‘author-maintained’ cannot be taken over by someone else.
Now, the LPPL is a ‘free’ license and so it is always possible to create a fork from an existing package. In general, you don’t really want to do that simply to keep updating an existing package: taking over maintenance is much clearer all round. For biblatex, we can’t do that as it’s ‘author-maintained’. So we’re going to have to formally fork the project, mark the ‘new’ version as distinct from the old (Philipp Lehman) version and ensure that both remain on CTAN: not ideal.
So I’d urge people to mark their LPPL code as ‘maintained’ rather than ‘author-maintained’. You never know what might happen, and ‘maintained’ status works pretty well.
LaTeX bleibt uns in Wikipedia erhalten, aber die Darstellung von mathematischen Formeln als Grafiken ist auf dem Rückzug. Auf allen Wikimedia-Projekten wurde eine Alternative zu TeX beim Rendern von mathematischen Formeln freigegeben. In den Konto-Einstellungen in Wikipedia kann man unter „Aussehen/Math“ wählen zwischen dem TeX-Quelltext, einem mit TeX kompilierten PNG oder MathJax. Die neue Lösung ist noch experimentell und fehleranfällig. Sie bietet den Vorteil, dass Formeln per Copy und Paste in MathML übertragen werden können. Außerdem passen sich die Formeln typographisch schöner in das Schriftbild des Webbrowsers ein als die geTeXten PNGs. Das Portal:Mathematik diskutiert und sammelt Problemfälle. MathJax ist eine JavaScript-basierte Lösung und funktioniert mit allen modernen Webbrowsern.
Posted today to the LaTeX-L list by Javier Bezos
Babel gets back on track and it is again actively maintained. The goals are mainly to fix bugs, to make it compatible with XeTeX and LuaTeX (as far as possible), and perhaps to add some minor new features (provided they are backward compatible).
No attempt will be done to take full advantage of the features provided by XeTeX and LuaTeX, which would require a completely new core (as for example polyglossia or as part of LaTeX3).
Your comments or suggestions (or questions!) are welcomed.
Hopefully we’ll see some long-standing babel bugs sorted out in the near future: many thanks to Javier for taking this up!
Etwa eine Woche, nachdem Joseph Wright die Weiterentwicklung von BibLaTeX bekanntgegeben hatte, hat Javier Bezos heute auf der Mailingliste LaTeX-L angekündigt, daß auch das Paket Babel weiter gepflegt werde. Er wolle vor allem bekannte Fehler beheben. Außerdem soll das Paket mit XeTeX und LuaTeX kompatibel gemacht werden, aber nur soweit es um Features geht, die rückwärtskompatibel sind. Das Paket werde dadurch nicht komplett neu geschrieben, wie es bei dem Babel-Nachfolger Polyglossia oder auch in der Entwicklung von LaTeX3 der Fall sei. Anregungen sind willkommen.
Dies ist der zweite Teil der Reihe, Teil 1 liegt unter http://uweziegenhagen.de/?p=2032.
Schauen wir uns mal den Aufbau der FreeMind Datei an:
<map version="0.9.0">
<!-- To view this file, download free mind mapping software FreeMind from http://freemind.sourceforge.net -->
<node CREATED="1335794057887" ID="ID_1245350673" MODIFIED="1335794109247" TEXT="Zentrum">
<node CREATED="1335794071208" ID="ID_1530114542" MODIFIED="1335794074163" POSITION="right" TEXT="Level 1"/>
<node CREATED="1335794075246" ID="ID_1662348218" MODIFIED="1335794079639" POSITION="right" TEXT="Level 1">
<node CREATED="1335794081307" ID="ID_1399980217" MODIFIED="1335794085467" TEXT="Level 2">
<node CREATED="1335794088715" ID="ID_1065307715" MODIFIED="1335794091703" TEXT="Level 3">
<node CREATED="1335794092827" ID="ID_1370145863" MODIFIED="1335794094989" TEXT="Level 4">
<node CREATED="1335794096421" ID="ID_9970207" MODIFIED="1335794099648" TEXT="Level 5">
<node CREATED="1335794173930" ID="ID_919041832" MODIFIED="1335794177008" TEXT="Level 6">
<node CREATED="1335794178164" ID="ID_1274260836" MODIFIED="1335794180516" TEXT="Level 7"/>
</node>
</node>
</node>
</node>
</node>
</node>
</node>
</map>
Es gibt ein map Tag, das entsprechende verschachtelte node Tags enthält. Wenn ein node Tag keine “Kinder” hat, wird es am Ende der Zeile mittels “/” geschlossen. node Tags mit “Kindern” enthalten diese nodes und werden dann rekursiv geschlossen.
Schauen wir uns mal das XSLT an (Eine tiefgehende Einführung in XSLT kann ich hier jedoch nicht geben): Hinter dem Matching auf das map Tag wird die Text Eigenschaft des ersten node-Elements als part ausgegeben. Sehr interessant, an dieser Stelle können wir später ansetzen, um direkt ein kompilierbares LaTeX-Dokument zu erhalten.
Es gibt im Dokument noch drei weitere Matches:
soll uns aktuell nicht interessieren, wird eventuell später mal behandelt.
Hier wird die Ausgabe der einzelnen node Tags gesteuert.
Dieses match steuert die Ausgabe der Notizen als einfachen Text, gehe ich eventuell später mal drauf ein.
In den node matches wird geschaut, wie tief sich der aktuelle Knoten befindet, in Abhängigkeit dessen wird das Text Attribut des Knotens einfach in ein entsprechendes LaTeX-Kommando eingebettet. Entsprechende Abschnitte wie den folgenden finden sich für alle Levels von \chapter bis \subparagraph.
Im nächsten Teil werden wir dieses XSLT Sheet auf unsere Bedürfnisse anpassen.
I recently discovered that you can read issues most of Die TeXnische Komödie online. My German is good enough to get the gist of the articles, and there is some interesting stuff there. I’ve always meant to join DANTE, if only to support their core CTAN server, and so this seemed like an ideal opportunity. So in the post this week I got the various goodies that they send out: I particularly like the sticker!
What’s particular interesting for me is the section in Die TeXnische Komödie detailing the various TeX-related meet-ups that take place in Germany: there are a lot! Here in the UK, I’m pleased that UK-TUG manages a couple of training courses and a single speaker meeting/AGM every year. It’s quite a contrast!
Today I read on LaTeX-Community.org, that version 0.4.4 of TeXworks has been released, as posted by Thorsten. TeXworks is a quick and efficient LaTeX editor running on most operating systems. It is free and open source.
0.4.4 is a stable version which will be included in TeX Live 2012.
New and updated features in this version, compared to 0.4.3:
Moreover, many bugs are fixed and some further improvements have been made. You can read about that in the changelog or on the TeXworks homepage where you also can find the way to the downloads.
FreeMind ist meines Erachtens das beste OpenSource Tool für die Erstellung von Mindmaps, jedoch ist eine MindMap oft nicht das Format, das man zum Weiterbearbeiten benötigt. Neben diversen fertigen Export-Filtern für Grafikformate wie PDF oder PNG bietet FreeMind auch die Möglichkeit, eigene XSLT-Sheets für den Export zu nutzen. Das Rad muss man hier nicht komplett neu erfinden, mit Freemind to Latex gibt es schon ein entsprechendes Projekt, das eine passende XSLT Datei bereitstellt. Möchte man eine Mindmap exportieren, so geht man im “Datei” Menü einfach auf den Export => “Mittels XSLT” Eintrag und kann dann den Namen der Output Datei sowie das zu nutzende XSLT Sheet auswählen.
Mit der standardmäßigen mm2latexr_richcontent_v1.02.xsl erhält man für die Map aus dem Bild folgendes Ergebnis:
\part{Zentrum} \chapter{Level 1} \chapter{Level 1} \section{Level 2} \subsection{Level 3} \subsubsection{Level 4} \paragraph{Level 5} \subparagraph{Level 6}
Man sieht:
itemize Umgebungen daraus werden…)Mit ein wenig XML/XSLT Kenntnissen lässt sich dieser Export aber sehr einfach auf die eigenen Bedürfnisse anpassen, was ich in Teil 2 zeigen werde.