diff --git a/.classpath b/.classpath new file mode 100644 index 0000000..39abf1c --- /dev/null +++ b/.classpath @@ -0,0 +1,49 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..1b69a96 --- /dev/null +++ b/.gitignore @@ -0,0 +1,7 @@ +target* +build* +bin* + +doc/*.aux +doc/*.log +doc/*.synctex.gz \ No newline at end of file diff --git a/.project b/.project new file mode 100644 index 0000000..6aa5e77 --- /dev/null +++ b/.project @@ -0,0 +1,34 @@ + + + GuitarTeX2 + + + + + + org.eclipse.jdt.core.javabuilder + + + + + org.eclipse.m2e.core.maven2Builder + + + + + + org.eclipse.jdt.core.javanature + org.eclipse.m2e.core.maven2Nature + + + + 1641408443802 + + 30 + + org.eclipse.core.resources.regexFilterMatcher + node_modules|.git|__CREATED_BY_JAVA_LANGUAGE_SERVER__ + + + + diff --git a/.vscode/launch.json b/.vscode/launch.json new file mode 100644 index 0000000..1b6c8bc --- /dev/null +++ b/.vscode/launch.json @@ -0,0 +1,22 @@ +{ + // Use IntelliSense to learn about possible attributes. + // Hover to view descriptions of existing attributes. + // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 + "version": "0.2.0", + "configurations": [ + { + "type": "java", + "name": "Launch GuitarTeX2", + "request": "launch", + "mainClass": "guitartex2.GuitarTeX2", + "projectName": "GuitarTeX2" + }, + { + "type": "java", + "name": "Launch GuitarTeX2Convert", + "request": "launch", + "mainClass": "guitartex2.GuitarTeX2Convert", + "projectName": "GuitarTeX2" + } + ] +} diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..04cd618 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,3 @@ +{ + "java.configuration.updateBuildConfiguration": "automatic" +} diff --git a/README b/README deleted file mode 100644 index 8baacbf..0000000 --- a/README +++ /dev/null @@ -1,44 +0,0 @@ -UPDATE: Server has moved. Please use "guitartex2.nikolai-rinas.de" instead - -Release Notes -============= - -Version 3.4.0: -* Code cleanup: Java 1.8 is required -* App for Mac: Embeded Java runtime. Works standalone - -Version 3.3.1 - * Defaultwerte angepasst - -Version 3.3.0: - * std:Ausgaben auf die interne Konsole umleiten - * Harp-Notes hinzugefuegt - * Parser: An die Harp-Notes angepasst - * Shortcuts fuer Noten - * Templates ueber menue zu erreichen - * GuitarTeX2: Option "-f" removed - * GuitarTeX2Converter: UTF8 Support eingebaut - * Direktivloser Text wird nicht geparsed - * Link auf die Webseite mit den Shortcuts - -Version 3.2.5: - * Configuration: Systeme werden mid regex erkannt - * Konsole eingebaut - * Template fuer neue Dokumente - -Version 3.2.4: - * Sprachbutton hinzugefuegt - * FAQ Link im Menue hinzugefuegt - -Version 3.2.3: - * UTF8 Support - -Version 3.2.2: - * Parser: Windows \r wird korrekt geloescht - * Serverseitig: Windows-Dateien werden generell in Unix Format konvertiert - -Version 3.2.1: - * graphicx Packet entfernt - * Schriftarten auf lmodern umgeschaltet - * Neue Direktive {nopagenum} - diff --git a/README.md b/README.md new file mode 100644 index 0000000..19169f3 --- /dev/null +++ b/README.md @@ -0,0 +1,62 @@ +# Server online: guitartex2.nikolai-rinas.de - port 3121 + +## Build +You can build it on your platform with maven. I'm using Visual Studio Code with maven an openjdk package to build the release versions. + +## Documentation +Details can be found [here](https://guitartex2.nikolai-rinas.de/) + + +## Release Notes +============= + +### Version 3.5.0 + * New build pipeline with maven and VSC (optional) + * Code cleanup + * Dropped standalone mac app support + * Standalone gtx converter available + * Published build versions for Windows/Linux/Mac + * Guitartab command is now dynamic \textwidth (thanks for contribution @e-dschungel) + * gtxtabs command changed. If you like the old version instead, please add following line to your song/book: + + ```\renewcommand{\gtxtabs}[2]{\makebox[0cm][l]{\raisebox{#1}{#2}}}``` + +### Version 3.4.0: + * Code cleanup: Java 1.8 is required + * App for Mac: Embedded Java runtime. Works standalone + +### Version 3.3.1 + * Defaultwerte angepasst + +### Version 3.3.0: + * std:Ausgaben auf die interne Konsole umleiten + * Harp-Notes hinzugefuegt + * Parser: An die Harp-Notes angepasst + * Shortcuts fuer Noten + * Templates ueber menue zu erreichen + * GuitarTeX2: Option "-f" removed + * GuitarTeX2Converter: UTF8 Support eingebaut + * Direktivloser Text wird nicht geparsed + * Link auf die Webseite mit den Shortcuts + +### Version 3.2.5: + * Configuration: Systeme werden mid regex erkannt + * Konsole eingebaut + * Template fuer neue Dokumente + +### Version 3.2.4: + * Sprachbutton hinzugefuegt + * FAQ Link im Menue hinzugefuegt + +### Version 3.2.3: + * UTF8 Support + +### Version 3.2.2: + * Parser: Windows \r wird korrekt geloescht + * Serverseitig: Windows-Dateien werden generell in Unix Format konvertiert + +### Version 3.2.1: + * graphicx Packet entfernt + * Schriftarten auf lmodern umgeschaltet + * Neue Direktive {nopagenum} + diff --git a/build.xml b/build.xml deleted file mode 100644 index e3b473c..0000000 --- a/build.xml +++ /dev/null @@ -1,95 +0,0 @@ - - - - - - - - - - - Builds, tests, and runs the project GuitarTeX2. - - - - - - - - - - - - - - - diff --git a/buildApp.sh b/buildApp.sh deleted file mode 100755 index f3ed5db..0000000 --- a/buildApp.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/bash - -ant bundle-GuitarTeX2 diff --git a/nbproject/build-impl.xml b/nbproject/build-impl.xml deleted file mode 100644 index 668b810..0000000 --- a/nbproject/build-impl.xml +++ /dev/null @@ -1,1413 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Must set src.dir - Must set test.src.dir - Must set build.dir - Must set dist.dir - Must set build.classes.dir - Must set dist.javadoc.dir - Must set build.test.classes.dir - Must set build.test.results.dir - Must set build.classes.excludes - Must set dist.jar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Must set javac.includes - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - No tests executed. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Must set JVM to use for profiling in profiler.info.jvm - Must set profiler agent JVM arguments in profiler.info.jvmargs.agent - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Must select some files in the IDE or set javac.includes - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - To run this application from the command line without Ant, try: - - java -jar "${dist.jar.resolved}" - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Must select one file in the IDE or set run.class - - - - Must select one file in the IDE or set run.class - - - - - - - - - - - - - - - - - - - - - - - Must select one file in the IDE or set debug.class - - - - - Must select one file in the IDE or set debug.class - - - - - Must set fix.includes - - - - - - - - - - This target only works when run from inside the NetBeans IDE. - - - - - - - - - Must select one file in the IDE or set profile.class - This target only works when run from inside the NetBeans IDE. - - - - - - - - - This target only works when run from inside the NetBeans IDE. - - - - - - - - - - - - - This target only works when run from inside the NetBeans IDE. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Must select one file in the IDE or set run.class - - - - - - Must select some files in the IDE or set test.includes - - - - - Must select one file in the IDE or set run.class - - - - - Must select one file in the IDE or set applet.url - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Must select some files in the IDE or set javac.includes - - - - - - - - - - - - - - - - - - - - Some tests failed; see details above. - - - - - - - - - Must select some files in the IDE or set test.includes - - - - Some tests failed; see details above. - - - - Must select some files in the IDE or set test.class - Must select some method in the IDE or set test.method - - - - Some tests failed; see details above. - - - - - Must select one file in the IDE or set test.class - - - - Must select one file in the IDE or set test.class - Must select some method in the IDE or set test.method - - - - - - - - - - - - - - Must select one file in the IDE or set applet.url - - - - - - - - - Must select one file in the IDE or set applet.url - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/GuitarTeX2.icns b/obsolete/GuitarTeX2.icns similarity index 100% rename from GuitarTeX2.icns rename to obsolete/GuitarTeX2.icns diff --git a/src/guitartex2/INSTALL b/obsolete/INSTALL similarity index 86% rename from src/guitartex2/INSTALL rename to obsolete/INSTALL index 6dc6b75..c437df6 100644 --- a/src/guitartex2/INSTALL +++ b/obsolete/INSTALL @@ -12,7 +12,7 @@ Anmerkungen verbindung. Es muss moeglich sein auf den Port 3121 zugreifen zu koennen. * Es ist eine beta Version mit einigen bekannten und unbekannten Bugs. Ich bin fuer jeden Hinweis und Bemerkung dankbar. Bitte nutzen Sie dafuer - die Sourceforge Projektseite http://sourceforge.net/projects/guitartex2 + die Sourceforge Projektseite https://github.com/workinghard/GuitarTeX2/ Notes @@ -22,7 +22,7 @@ Notes * You have to set a Reader in a preferences section * Remote server port is 3121, make sure your Firewall let it pass through * It's a beta Version with known and unknown bugs. Please report them - using a project page http://sourceforge.net/projects/guitartex2 + using a project page https://github.com/workinghard/GuitarTeX2/ Have Fun diff --git a/obsolete/doc/GuitartTeX2-documentation_de.pdf b/obsolete/doc/GuitartTeX2-documentation_de.pdf new file mode 100644 index 0000000..82640a5 Binary files /dev/null and b/obsolete/doc/GuitartTeX2-documentation_de.pdf differ diff --git a/src/guitartex2/doc/GuitartTeX2-documentation.tex b/obsolete/doc/GuitartTeX2-documentation_de.tex old mode 100755 new mode 100644 similarity index 100% rename from src/guitartex2/doc/GuitartTeX2-documentation.tex rename to obsolete/doc/GuitartTeX2-documentation_de.tex diff --git a/obsolete/doc/GuitartTeX2-documentation_en.pdf b/obsolete/doc/GuitartTeX2-documentation_en.pdf new file mode 100644 index 0000000..b6d6900 Binary files /dev/null and b/obsolete/doc/GuitartTeX2-documentation_en.pdf differ diff --git a/obsolete/doc/GuitartTeX2-documentation_en.tex b/obsolete/doc/GuitartTeX2-documentation_en.tex new file mode 100644 index 0000000..03707e6 --- /dev/null +++ b/obsolete/doc/GuitartTeX2-documentation_en.tex @@ -0,0 +1,459 @@ +\documentclass[12pt]{article} + +\usepackage[latin1]{inputenc} +\usepackage{amsmath} +\usepackage[english]{babel} +\usepackage{listings} +\usepackage{verbatim} +\usepackage{graphicx} + +\newcommand{\ul}{\underline{~}} + +\begin{document} + + \section{Overview} + $GuitarTeX_2$ is a tool mainly for guitar players. It can generate nice looking song sheets with + guitar riffs, tabs und melodies. It uses the well known chord format with some minor additions. \\ + \\ + It's based on the idea from Martin Leclerc and Mario Dorion from Canada. They developed Chord version 3.5 in 1993. + $GuitarTeX_2$ is very similar to the original version. It uses the same syntax. The only difference is the used + language Java to parse the chord file and generate the \LaTeX source file. Usually you don't need to know + this because it's happening in the background. The output you usually see is a generated PDF. But it's helpful + to know this in case you already know \LaTeX and want to adjust something very specific. + + \subsection{Features} + \begin{itemize} + \item + Grafical user interface with integrated basic editor + \item + Prints nice looking chords, melodies, riffs + \item + Output formats \LaTeX and PDF + \item + Compatible with ChordPro-format, import if ASCII-files possible + \item + Musical notation with \LaTeX-packages MusixTeX, MusixLyr and TabDefs + \item + Flexible page layout (size, border...) + \item + Custom colors for chorus, bridge ... + \item + Optional output of chord definitions at the end of the page + \item + ASCII-tabs, guitar tabs and base tabs + \item + Generated \LaTeX files can be customized for advanced users + \end{itemize} + + \subsection{Example} + $GuitarTeX_2$ konvertiert eine Datei mit Text und Akkorden im Chord-Format in + eine \LaTeX-Datei. Ein Beispiel für eine Chord-Datei: \\ + \\ + {\bf\{title:The Manual Song\} \\ + \{st:No-one has yet claimed responsibility\} \\ + ~[D]I print verses [A7]in a [D]row, \\ + The next line gets put [A7]down be[D]low, \\ + Mumble mumble [A7]rhymes with [D]grow [G] [G\#] [A] \\ + Done this verse, now [A7sus4]on we [quietly]go! \\ + \\ + \{soc\} \\ + ~[D]This is the [Bm]manual song \\ + ~[A7]No-one really knows what's [D]goin' on \\ + ~[D]This is the [F\#m]manual song \\ + ~[A7]And now the chorus is already [D]gone \\ + \{eoc\} \\ + \\ + ~[D]The second verse is [A7]like the [D]first, \\ + The music poor, the [A7]verse is [D]worse, \\ + I wrote this since [A7]I'd get [D]sued, \\ + If I used real songs. [A7]This'll [D]do. \\ + \\ + \{c:repeat chorus\} } \\ + \\ + \includegraphics[width=1.1\textwidth]{pics/example1.pdf} + \\ + Wenn Sie sich mit \LaTeX ~auskennen, können Sie die Ausgabedatei auch manuell verändern, + bevor Sie sie in Postscript oder PDF umwandeln. Der Vorteil ist, dass Sie alle Möglichkeiten + von \LaTeX ~einschließlich der vielen Zusatzpackete wie graphics oder MusicTeX einsetzen können. + + \section{Installation} + + \subsection{Woher bekomme ich $GuitarTeX_2$} + Die aktuelle Version bekommen Sie immer auf der Download-Seite des $GuitarTeX_2$-Projektes: + http://sourceforge.net/projects/guitartex2. + + \subsection{Systemanforderungen} + $GuitarTeX_2$ ist ein Java Programm welches Betriessystemunabhägig entwickelt wurde. + Ben"otigt werden: + \begin{itemize} + \item + Java 1.4 oder höher + \item + PDF - Betrachter (z.B. Acrobat Reader, xpdf) + Bei MacOS X braucht man es nicht + \item + Internetverbindung (optinal) + \item + \LaTeX (optional) + \end{itemize} + + \subsection{Installation} + Laden sie sich das binäre Paket (GuitarTeX2.jar) herunter. Je nachdem wie sie Ihr + System konfiguriert haben, reicht es darauf zu Doppelklicken oder mit + ''java -jar GuitarTeX2.jar'' aus der Kommandozeile zu starten. \\ + \\ + Es wird beim ersten Starten eine lokale Konfigurationsdatei + angelegt. Diese ist im Homeverzeichnis des Benutzers zu finden. Sie kann nachträglich + verändert werde und wird immer beim starten zuerst ausgelesen. + + \section{Der Editor $GuitarTeX_2$} + + \section{Unterstützte Chord-Direktiven} + Direktiven sind Befehle zwischen geschweiften Klammern, die das Aussehen der erzeugten + Ausgabe steuern. Einige häufig benötigte Direktiven können durch eine Abkürzung ersetzt + werden (siehe Beispiele). $GuitarTeX_2$ bringt einige neue Direktiven mit, die das original + Chord Programm nicht kennt. + \subsection{Spezielle Zeichen} + Einige Zeichen haben in GuitarTeX eine besondere Bedeutung: + \begin{itemize} + \item + \# am Anfang einer Zeile markiert einen Kommentar. Die Zeile wird von $GuitarTeX_2$ ignoriert + \item + / darf nur in Akkorden mit Bass verwendet werden (z.B. A/E) + \end{itemize} + \subsection{Seitenlayout} + Die Direktive geometry bietet flexible Möglichkeiten, das Layout einer Seite anzupassen. + Sie benutzt das \LaTeX-Paket geometry. Die folgende Beschreibung ist ein (modifizierter) + Teil der Original-Dokumentation. + \\ + Das geometry Paket bietet viele automatische Ausrichtungen, so dass nur wenige manuelle + Angaben zum Seitenlayout erforderlich sind. In diesem Fall reicht ein einfaches \\ + \\ + {\bf\{geometry:a4paper\}} \\ + \\ + Das Setzen von Seitenrändern erfolgt mit \\ + \\ + {\bf\{geometry:margin=2.5cm\}} \\ + \\ + wenn alle Ränder einer Seite 2,5 Zentimeter betragen sollen. + Längenangaben erfolgen in + \begin{itemize} + \item + Zentimeter (cm) + \item + Millimeter (mm) + \item + Inch (in) + \item + Punkt (pt) + \end{itemize} + \subsubsection{Grunds"atzliches} + Das Seitenlayout besteht aus einer einfachen Struktur: Die Seite (paper) enthält einen + Textkörper (total-body, druckbarer Bereich) und Ränder. Der Textkörper besteht aus Kopf- + und Fußzeile, dem eigentlichen Text und (optional) den Randbemerkungen. Die vier Ränder + heißen left-margin, right-margin, top-margin und bottom-margin.\\ + \begin{itemize} + \item + paper: total-body (printable area) and margins + \item + total-body: head, body(text area), foot and marginal notes + \item + margins: left-, right-, top- and bottom-margin + \end{itemize} + Jeder Rand wird von der jeweiligen Kante der Seite aus gemessen, z.B. left-margin meint + den Abstand zwischen linker Seitenkante und dem Textkörper. Die Größen von paper, totalbody + und margins stehen in diesen Ralationen: + \begin{itemize} + \item + paperwidth = left + width + right + \item + paperheight = top + height + bottom + \end{itemize} + \subsubsection{Optionen} + Optionen der Direktive geometry: \\ + \begin{tabular}{|l|l|} + \textbf{Name} & \textbf{Bedeutung} \\ + \hline + landscape & schaltet um auf Querformat \\ + portrait & schaltet um auf Hochformat \\ + twoside & schaltet auf zweiseitige Ausgabe um. Die linken und rechen Ränder werden bei geraden + und ungeraden Seiten symmetrisch angeordnet. \\ + reversemp & Randbemerkungen erscheinen am linken Rand (statt am rechten Rand) \\ + nohead & keine Reservierung von Platz für Kopfzeilen \\ + nofoot & keine Reservierung von Platz für Fußzeilen \\ + noheadfoot & keine Reservierung von Platz für Kopf- und Fußzeilen \\ + a4paper, a5paper & spezifizert die Papiergröße, ohne Wert anzugeben \\ + paperwidth & Breite des Papiers. paperwidth=$<$paperwidth$>$ \\ + paperheight & Höhe des Papiers. paperheight=$<$paperheight$>$ \\ + width & Breite des Textkörpers. width=$<$width$>$or totalwidth=$<$width$>$. Diese Angabe + sollte nicht mit der Textbreite (textwidth) verwechselt werden. width enthält die + Textbreite und die Breite der Randbemerkungen. \\ + height & Höhe des Textkörpers (einschließlich Kopf- und Fußzeile). height=$<$height$>$ \\ + left & linker Rand. left=$<$leftmargin$>$ \\ + right & rechter Rand. right=$<$rightmargin$>$ \\ + top & oberer Rand. top=$<$topmargin$>$ \\ + bottom & unterer Rand. bottom=$<$bottommargin$>$ \\ + margin & alle Ränder. margin=$<$margin$>$ \\ + textwidth & Breite des Textes. textwidth=$<$width$>$ \\ + textheight & Höhe des Textes. textheight=$<$height$>$ \\ + marginpar & Breite der Randbemerkungen. marginpar=$<$length$>$ \\ + marginparsep & Abstand zwischen Text und Randbemerkungen. marginparsep=$<$length$>$ \\ + head & Höhe der Kopfzeile. head=$<$length$>$ \\ + headsep & Abstand zwischen Kopfzeile und Text. headsep=$<$length$>$ \\ + foot & Abstand zwischen Fußzeile und Text. foot=$<$length$>$ \\ + \end{tabular} + \subsubsection{Beispiele} + Setzen Sie die Höhe des Textkörpers auf 10in, den unteren Rand auf 2cm. Der obere + Rand wird automatisch berechnet:\\ + \\ + {\bf\{geometry:height=10in,bottom=2cm\}} \\ + \\ + oder: \\ + \\ + {\bf\{g:height=10in,bottom=2cm\}} \\ + \\ + oder: \\ + \\ + {\bf\{geometry:height=10in\} \\ + \\ + \{g:bottom:=2cm\}} \\ + \\ + Setzen Sie den linken, rechten und oberen Rand auf 3cm, 2cm und 2.5in. + Es wird keine Kopfzeile benötigt. \\ + \\ + {\bf\{geometry:left=3cm,right=2cm, nohead,top=2.5in\}} \\ + \\ + oder: \\ + \\ + {\bf\{geometry:left=3cm\} \\ + \{geometry:right=2cm\} \\ + \{geometry:nohead\} \\ + \{geometry:top=2.5in\}} \\ + \\ + oder : \\ + \\ + {\bf\{g:left=3cm,right=2cm\} \\ + \{g:nohead, top=2.5in\}} \\ + \\ + und so weiter ... \\ + Ändern Sie die Breite der Randbemerkungen auf 3cm \\ + \\ + {\bf\{geometry:marginpar=3cm\} \\ + \{geometry:marginpar=3cm, reversemp\}} \\ + \\ + lässt die Randbemerkungen am linken Rand ausgeben.\\ + Verwenden sie A5-Papier im Querformat: \\ + \\ + {\bf\{geometry:a5paper, landscape\}} \\ + \subsection{Dokumentenstrukur} + \subsubsection{title} + Der Titel eines Stückes wird durch die Direktive title markiert. Der + Titel wird zentriert mit einer vergrößerten Schrift ausgegeben. + In Dokumenten mit mehreren Stücken verursacht title einen Seitenumbruch. \\ + Beispiel:\\ + \\ + {\bf\{title:Go Down Moses\} \\ + \{t:Go Down Moses\}} \\ + \subsubsection{subtitle} + Die Direktive \textbf{subtitle} dient zur Darstellung zusätzlicher + Informationen, wie z.B. Interpret oder Komponist. \\ + Beispiel: \\ + \\ + {\bf\{subtitle:written by John Lennon / Paul McCartney\} \\ + \{st:written by John Lennon / Paul McCartney\}} \\ + \subsubsection{bridge} + Eine Bridge wird mit \{bridge\} oder \{sob\} (start of bridge) am Anfang, + und \{/bridge\} oder \{eob\} (end of bridge) am Ende markiert. Die Bridge + wird auf Farbdruckern in blau ausgegeben. Die Farbe kann mit der Direktive + color\underline{~}bridge angepasst werden (siehe Abschnitt namens color\underline{~}xxx).\\ + Beispiel: \\ + \\ + {\bf \{bridge\} \\ + I want her [Ab]everywhere [Fm] \\ + And if [Bbm]she's beside me [C7]I know I need [Fm]never care \\ + ~[Bb]But to love her [C7]is to meet her \\ + \{/bridge\}} \\ + \subsubsection{chorus} + Ein Refrain wird mit \{chorus\} oder \{soc\} (start of chorus) am Anfang und mit \{/chorus\} + oder \{eoc\} (end of chorus) am Ende markiert. Der Refrain wird auf Farbdruckern in rot + ausgegeben. Die Farbe kann mit der Direktive color\underline{~}chorus angepasst werden + (siehe Abschnitt namens color\underline{~}xxx).\\ + Beispiel: \\ + \\ + {\bf\{chorus\} \\ + Oh, I get [C]by with a little [G]help from my [D]friends \\ + Mm, I get [C]high with a little [G]help from my [D]friends \\ + Oh, I'm gonna [C]try with a little [G]help from my [D]friends \\ + \{/chorus\}} \\ + \subsubsection{instr} + Ein Instrumental-Teil wird mit \{instr\} oder \{soi\} (start of instrumental) am Anfang + und \{/instr\} oder \{eoi\} (end of instrumental) am Ende markiert. Der Instrumental-Teil + wird auf Farbdruckern in grau ausgegeben. Die Farbe kann mit der Direktive + color\underline{~}instr angepasst werden (siehe Abschnitt namens color\underline{~}xxx). + \subsubsection{np} + np steht für eine ''neue Seite'' und erzeugt einen Seitenumbruch.\\ + Beispiel: \\ + {\bf\{np\}} \\ + \subsubsection{tab} + Tabulaturen werden mit \{tab\} oder \{sot\} (start of tablature) am Anfang und \{/tab\} + oder \{eot\} (end of tablature) am Ende markiert. Tabulaturen werden auf Farbdruckern + in grün ausgegeben. Die Farbe kann mit der Direktive color\underline{~}tab directive + angepasst werden (siehe Abschnitt namens color\underline{~}xxx). Tabulaturen werden + in einer nichtproportionalen Schriftart ausgegeben.\\ + Beispiel: \\ + \includegraphics[width=15cm]{pics/tabs1.pdf} + \subsection{Fonts} + Die Direktiven zur Beeinflussung der Schriftart und -farbe können irgendwo in Ihrer Datei + stehen. Trotzdem ist es hilfreich sie am Anfang zu platzieren. Die angegebenen Werte + gelten für das ganze Dokument. + \subsubsection{font\underline{~}size} + \LaTeX ~kennt drei Schriftgrößen 10pt, 11pt and 12pt. GuitarTeX nutzt normalerweise + 11pt (Titel und Untertitel werden automatisch vergrößert). Wenn Sie z.B. 12pt + verwenden wollen, schreiben Sie:\\ + \\ + {\bf\{font\underline{~}size:12\}} \\ + \\ + Achtung: schreiben Sie nicht 12pt statt 12!\\ + \subsubsection{color\underline{~}xxx} + Mit den folgenden Direktiven können Sie die Textfarbe für Refrain, Bridge, + Instrumental-Teil Tabulaturen und zweite Stimme anpassen. Für die zweite Stimme + können Sie auch die Hintergrundfarbe ändern, so dass Sie z.B. weiße Schrift auf einem + farbigen Hintergrund verwenden können. Das erleichtert den Sängern hoffentlich + die Orientierung bei mehreren Textzeilen. \\ + Die Direktiven heißen: \\ + \begin{itemize} + \item + color\underline{~}chorus + \item + color\underline{~}bridge + \item + color\underline{~}instr + \item + color\underline{~}tab + \item + color\underline{~}second + \item + color\underline{~}second\underline{~}back + \end{itemize} + Als Parameter wird eine durch Kommas getrennte Liste von Werten zwischen null und + eins, die die Farben rot, grün und blau repräsentieren.\\ + Beispiel: \\ + \\ + {\bf\{color\underline{~}chorus:.5,.5,1\}} + \subsection{Gitarren- und Bass-Tabulaturen} + $GuitarTeX_2$ kennt zwei neue Direktiven zur Darstellung von Tabulaturen: + \begin{itemize} + \item + \{guitartab: \} für Gitarren-Tabulaturen + \item + \{basstab: \} für Bass-Tabulaturen + \end{itemize} + Jede guitartab oder basstab Direktive stellt eine Zeile mit sechs bzw vier Linien dar. + Sie können mit \{guitartab: \} oder \{basstab: \} auch leere Tabulaturen erzeugen. + Setzen Sie eine Leerzeile vor die Direktive, damit die Tabulatur am linken Rand beginnt.\\ + Die Klammern können enthalten: + \begin{itemize} + \item + normaler Text, der unterhalb der Tabulatur ausgegeben wird + \item + Noten im Format [string;fret], z.B. [2;5] für 5. Bund auf der A-Saite + \item + Taktstriche (durch das Zeichen $|$ dargestellt) + \item + Zusätzlicher Leerraum mit ''\ul{}'' + \end{itemize} + Beispiel: leere Gitarrentabulatur \\ + \\ + {\bf\{guitartab:\}} \\ + \\ + Beispiel: Eine Bass-Tabulatur mit Text \\ + \\ + {\bf\{basstab:some text\}} \\ + \\ + Beispiel: Noten, Taktstriche und Leerraum \\ + \\ + {\bf\{guitartab:[2;3][3;0][3;2][3;3]$|$[4;0]\ul\ul[4;2]\ul\ul[5;0]\ul\ul[5;1]$|$\}} \\ + \\ + Beispiel: Text unter den Noten anordnen \\ + \\ + {\bf\{guitartab:[2;3]do [3;0]re [3;2]mi [3;3]fa $|$[4;0]so [4;2]la [5;0]si [5;1]do$|$\}} \\ + \\ + Beispiel: Eine einfache Bass-Tabulatur \\ + \\ + {\bf\{basstab:[2;5][2;5]$|$[2;5][2;5]$|$[3;5][3;5]$|$[2;5][2;5]$|$[3;7][3;7]$|$[3;5][3;5]$|$[2;5]\}} \\ + \\ + Beispiel: Akkorde \\ + \\ + {\bf\{guitartab:[2;3]\&[3;5]\&[4;5]C (power chord) $|$[2;3]\&[3;2]\&[4;0]\&[5;1]C chord\}} \\ + \subsection{N"utzliches} + \subsubsection{define} + Mit der Direktive define können Sie ein Akkord-Symbol am Ende eines Stückes erstellen. + Die Direktive kann irgendwo im Stück platziert sein.\\ + define verfügt über acht Parameter:\\ + \begin{itemize} + \item + den Akkordnamen + \item + die Nummer des ersten Bundes + \item + sechs Nummern für die sechs Saiten (ein x bedeutet, dass die Saite nicht gespielt wird) + \end{itemize} + Beispiel:\\ + \\ + {\bf\{define:A 1 x n 2 2 2 n\} \\ + \{define:Cm 3 x 1 3 3 2 1\} \\ + \{define:Gm/Bb 4 3 2 2 1 x x\}} \\ + \subsubsection{comment} + Die Direktive comment fügt einen Text ein, der nicht zum eigentlichen Stück gehört. \\ + Beispiel: \\ + \\ + {\bf\{comment: repeat chorus\} \\ + \{c: repeat chorus\}} \\ + \subsubsection{margin} + Die Direktive margin erzeugt eine Randbemerkung. Diese können z.B. dazu genutzt werden, + Hinweise für den Musiker einzufügen.\\ + Beispiel: \\ + \\ + {\bf\{margin:Fade Out\} \\ + \{m:Fade Out\}} \\ + \subsubsection{second} + In einigen Stücken hat die zweite Stimme nicht nur eine andere Melodie, sondern auch + einen anderen oder versetzt gesungenen Text. Bekannte Beispiele sind "California Dreaming" + von The Mamas And The Papas und "Help" von den Beatles. Wenn Sie die zweite Stimme mit + der Direktive second markieren erscheint sie in weißer Schrift auf grauem Hintergrund. + Wegen der proportionalen Schrift müssen Sie ein wenig experimentieren, um die korrekte + Ausrichtung zwischen erster und zweiter Stimme zu erhalten.\\ + Beispiel: \\ + \\ + {\bf[G] When I was younger so much [Hm]younger than today \\ + \{second:When when I was young\} \\ + ~[Em] I never needed anybody's [C]help in [F]any [G]way \\ + \{second:I never need help in any way\} \\ + ~[G]But now these days are gone and I'm [Bm]not so self assured \\ + \{second:Now these days are gone\} \\ + ~[Em] Now I find I've changed my mind, \\ + \{second:And now I find\} \\ + I've [C]opened [F]up the [G]doors \\ + \{second:I've opened up the doors\}} \\ + \section{\LaTeX-Kommandos und Pakete verwenden} + \subsection{\LaTeX-Kommandos} + Wie in der Einführung erwähnt, brauchen Sie nichts über \LaTeX ~zu wissen, um $GuitarTeX_2$ + zu nutzen. Wenn Sie sich mit \LaTeX ~auskennen, können Sie dessen Möglichkeiten nutzen, + um Ihre Ergebnisse weiter zu verbessern. Alle Zeilen, die mit einem Backslash beginnen, + werden in die erzeute \LaTeX-Datei übernommen. Sie können das einfach mit einem Kommando + wie diesem testen: \\ + \\ + {\bf$\backslash$marginpar\{test\}} \\ + \\ + Das Ergebnis ist eine Randbemerkung mit dem Wort ''test''. + Die \LaTeX-Kommandos werden an der Stelle ausgeführt, an der sie in der Datei vorkommen. + Manche Kommandos müssen allerdings in der sog. Präambel der \LaTeX-Datei erscheinen. + Das geschieht mit der Direktive preamble:\\ + \\ + {\bf\{preamble:$\backslash$usepackage(fancyheadings)\}}\\ + \\ + Die Direktive preamble kann irgendwo im Dokument stehen. Die enthaltenen Kommandos + erscheinen in der \LaTeX-Präambel in der Reihenfolge, in der sie in der Chord-Datei stehen. + + +\end{document} diff --git a/src/guitartex2/doc/pics/example1.pdf b/obsolete/doc/pics/example1.pdf similarity index 100% rename from src/guitartex2/doc/pics/example1.pdf rename to obsolete/doc/pics/example1.pdf diff --git a/src/guitartex2/doc/pics/tabs1.pdf b/obsolete/doc/pics/tabs1.pdf similarity index 100% rename from src/guitartex2/doc/pics/tabs1.pdf rename to obsolete/doc/pics/tabs1.pdf diff --git a/examples/griechischer_wein.gtx b/obsolete/examples/griechischer_wein.gtx similarity index 100% rename from examples/griechischer_wein.gtx rename to obsolete/examples/griechischer_wein.gtx diff --git a/examples/lazy_blues.gtx b/obsolete/examples/lazy_blues.gtx similarity index 100% rename from examples/lazy_blues.gtx rename to obsolete/examples/lazy_blues.gtx diff --git a/examples/my_first_book.gtb b/obsolete/examples/my_first_book.gtb similarity index 100% rename from examples/my_first_book.gtb rename to obsolete/examples/my_first_book.gtb diff --git a/lib/appbundler-1.0.jar b/obsolete/lib/appbundler-1.0.jar similarity index 100% rename from lib/appbundler-1.0.jar rename to obsolete/lib/appbundler-1.0.jar diff --git a/manifest.mf b/obsolete/manifest.mf similarity index 100% rename from manifest.mf rename to obsolete/manifest.mf diff --git a/nbproject/genfiles.properties b/obsolete/nbproject/genfiles.properties similarity index 100% rename from nbproject/genfiles.properties rename to obsolete/nbproject/genfiles.properties diff --git a/nbproject/project.properties b/obsolete/nbproject/project.properties similarity index 100% rename from nbproject/project.properties rename to obsolete/nbproject/project.properties diff --git a/nbproject/project.xml b/obsolete/nbproject/project.xml similarity index 100% rename from nbproject/project.xml rename to obsolete/nbproject/project.xml diff --git a/pom.xml b/pom.xml new file mode 100644 index 0000000..1b77e48 --- /dev/null +++ b/pom.xml @@ -0,0 +1,181 @@ + + + + 4.0.0 + + guitartex2.GuitarTeX2 + GuitarTeX2 + 3.5.0 + + GuitarTeX2 + + + + UTF-8 + 1.8 + 1.8 + + + + + + org.apache.maven.plugins + maven-assembly-plugin + 3.1.1 + + + jar-with-dependencies + + + + guitartex2.GuitarTeX2 + + + ${project.artifactId}-${project.version} + false + + + + make-assembly + + package + + single + + + + + + + org.apache.maven.plugins + maven-assembly-plugin + 3.1.1 + + + jar-with-dependencies + + + + guitartex2.GuitarTeX2Convert + + + ${project.artifactId}Convert-${project.version} + false + + + + make-assembly + + package + + single + + + + + + + + maven-surefire-plugin + + ${argLine} + + + + org.jacoco + jacoco-maven-plugin + 0.8.3 + + + prepare-agent + + prepare-agent + + + + report + prepare-package + + report + + + + post-unit-test + test + + report + + + target/jacoco.exec + target/jacoco-ut + + + + + + target/jacoco.exec + + + + + + + + + maven-clean-plugin + 3.1.0 + + + + maven-resources-plugin + 3.0.2 + + + maven-compiler-plugin + 3.8.0 + + + maven-surefire-plugin + 2.22.1 + + 3 + true + -Xmx1024m -XX:MaxPermSize=256m + true + + + + maven-jar-plugin + 3.0.2 + + + true + + guitartex2.GuitarTeX2 + + + + + + maven-install-plugin + 2.5.2 + + + maven-deploy-plugin + 2.8.2 + + + + maven-site-plugin + 3.7.1 + + + maven-project-info-reports-plugin + 3.0.0 + + + + + + diff --git a/src/guitartex2/COPYRIGHT b/src/guitartex2/COPYRIGHT deleted file mode 100644 index d511905..0000000 --- a/src/guitartex2/COPYRIGHT +++ /dev/null @@ -1,339 +0,0 @@ - GNU GENERAL PUBLIC LICENSE - Version 2, June 1991 - - Copyright (C) 1989, 1991 Free Software Foundation, Inc., - 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - Preamble - - The licenses for most software are designed to take away your -freedom to share and change it. By contrast, the GNU General Public -License is intended to guarantee your freedom to share and change free -software--to make sure the software is free for all its users. This -General Public License applies to most of the Free Software -Foundation's software and to any other program whose authors commit to -using it. (Some other Free Software Foundation software is covered by -the GNU Lesser General Public License instead.) You can apply it to -your programs, too. - - When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you -have the freedom to distribute copies of free software (and charge for -this service if you wish), that you receive source code or can get it -if you want it, that you can change the software or use pieces of it -in new free programs; and that you know you can do these things. - - To protect your rights, we need to make restrictions that forbid -anyone to deny you these rights or to ask you to surrender the rights. -These restrictions translate to certain responsibilities for you if you -distribute copies of the software, or if you modify it. - - For example, if you distribute copies of such a program, whether -gratis or for a fee, you must give the recipients all the rights that -you have. You must make sure that they, too, receive or can get the -source code. And you must show them these terms so they know their -rights. - - We protect your rights with two steps: (1) copyright the software, and -(2) offer you this license which gives you legal permission to copy, -distribute and/or modify the software. - - Also, for each author's protection and ours, we want to make certain -that everyone understands that there is no warranty for this free -software. If the software is modified by someone else and passed on, we -want its recipients to know that what they have is not the original, so -that any problems introduced by others will not reflect on the original -authors' reputations. - - Finally, any free program is threatened constantly by software -patents. We wish to avoid the danger that redistributors of a free -program will individually obtain patent licenses, in effect making the -program proprietary. To prevent this, we have made it clear that any -patent must be licensed for everyone's free use or not licensed at all. - - The precise terms and conditions for copying, distribution and -modification follow. - - GNU GENERAL PUBLIC LICENSE - TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - - 0. This License applies to any program or other work which contains -a notice placed by the copyright holder saying it may be distributed -under the terms of this General Public License. The "Program", below, -refers to any such program or work, and a "work based on the Program" -means either the Program or any derivative work under copyright law: -that is to say, a work containing the Program or a portion of it, -either verbatim or with modifications and/or translated into another -language. (Hereinafter, translation is included without limitation in -the term "modification".) Each licensee is addressed as "you". - -Activities other than copying, distribution and modification are not -covered by this License; they are outside its scope. The act of -running the Program is not restricted, and the output from the Program -is covered only if its contents constitute a work based on the -Program (independent of having been made by running the Program). -Whether that is true depends on what the Program does. - - 1. You may copy and distribute verbatim copies of the Program's -source code as you receive it, in any medium, provided that you -conspicuously and appropriately publish on each copy an appropriate -copyright notice and disclaimer of warranty; keep intact all the -notices that refer to this License and to the absence of any warranty; -and give any other recipients of the Program a copy of this License -along with the Program. - -You may charge a fee for the physical act of transferring a copy, and -you may at your option offer warranty protection in exchange for a fee. - - 2. You may modify your copy or copies of the Program or any portion -of it, thus forming a work based on the Program, and copy and -distribute such modifications or work under the terms of Section 1 -above, provided that you also meet all of these conditions: - - a) You must cause the modified files to carry prominent notices - stating that you changed the files and the date of any change. - - b) You must cause any work that you distribute or publish, that in - whole or in part contains or is derived from the Program or any - part thereof, to be licensed as a whole at no charge to all third - parties under the terms of this License. - - c) If the modified program normally reads commands interactively - when run, you must cause it, when started running for such - interactive use in the most ordinary way, to print or display an - announcement including an appropriate copyright notice and a - notice that there is no warranty (or else, saying that you provide - a warranty) and that users may redistribute the program under - these conditions, and telling the user how to view a copy of this - License. (Exception: if the Program itself is interactive but - does not normally print such an announcement, your work based on - the Program is not required to print an announcement.) - -These requirements apply to the modified work as a whole. If -identifiable sections of that work are not derived from the Program, -and can be reasonably considered independent and separate works in -themselves, then this License, and its terms, do not apply to those -sections when you distribute them as separate works. But when you -distribute the same sections as part of a whole which is a work based -on the Program, the distribution of the whole must be on the terms of -this License, whose permissions for other licensees extend to the -entire whole, and thus to each and every part regardless of who wrote it. - -Thus, it is not the intent of this section to claim rights or contest -your rights to work written entirely by you; rather, the intent is to -exercise the right to control the distribution of derivative or -collective works based on the Program. - -In addition, mere aggregation of another work not based on the Program -with the Program (or with a work based on the Program) on a volume of -a storage or distribution medium does not bring the other work under -the scope of this License. - - 3. You may copy and distribute the Program (or a work based on it, -under Section 2) in object code or executable form under the terms of -Sections 1 and 2 above provided that you also do one of the following: - - a) Accompany it with the complete corresponding machine-readable - source code, which must be distributed under the terms of Sections - 1 and 2 above on a medium customarily used for software interchange; or, - - b) Accompany it with a written offer, valid for at least three - years, to give any third party, for a charge no more than your - cost of physically performing source distribution, a complete - machine-readable copy of the corresponding source code, to be - distributed under the terms of Sections 1 and 2 above on a medium - customarily used for software interchange; or, - - c) Accompany it with the information you received as to the offer - to distribute corresponding source code. (This alternative is - allowed only for noncommercial distribution and only if you - received the program in object code or executable form with such - an offer, in accord with Subsection b above.) - -The source code for a work means the preferred form of the work for -making modifications to it. For an executable work, complete source -code means all the source code for all modules it contains, plus any -associated interface definition files, plus the scripts used to -control compilation and installation of the executable. However, as a -special exception, the source code distributed need not include -anything that is normally distributed (in either source or binary -form) with the major components (compiler, kernel, and so on) of the -operating system on which the executable runs, unless that component -itself accompanies the executable. - -If distribution of executable or object code is made by offering -access to copy from a designated place, then offering equivalent -access to copy the source code from the same place counts as -distribution of the source code, even though third parties are not -compelled to copy the source along with the object code. - - 4. You may not copy, modify, sublicense, or distribute the Program -except as expressly provided under this License. Any attempt -otherwise to copy, modify, sublicense or distribute the Program is -void, and will automatically terminate your rights under this License. -However, parties who have received copies, or rights, from you under -this License will not have their licenses terminated so long as such -parties remain in full compliance. - - 5. You are not required to accept this License, since you have not -signed it. However, nothing else grants you permission to modify or -distribute the Program or its derivative works. These actions are -prohibited by law if you do not accept this License. Therefore, by -modifying or distributing the Program (or any work based on the -Program), you indicate your acceptance of this License to do so, and -all its terms and conditions for copying, distributing or modifying -the Program or works based on it. - - 6. Each time you redistribute the Program (or any work based on the -Program), the recipient automatically receives a license from the -original licensor to copy, distribute or modify the Program subject to -these terms and conditions. You may not impose any further -restrictions on the recipients' exercise of the rights granted herein. -You are not responsible for enforcing compliance by third parties to -this License. - - 7. If, as a consequence of a court judgment or allegation of patent -infringement or for any other reason (not limited to patent issues), -conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot -distribute so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you -may not distribute the Program at all. For example, if a patent -license would not permit royalty-free redistribution of the Program by -all those who receive copies directly or indirectly through you, then -the only way you could satisfy both it and this License would be to -refrain entirely from distribution of the Program. - -If any portion of this section is held invalid or unenforceable under -any particular circumstance, the balance of the section is intended to -apply and the section as a whole is intended to apply in other -circumstances. - -It is not the purpose of this section to induce you to infringe any -patents or other property right claims or to contest validity of any -such claims; this section has the sole purpose of protecting the -integrity of the free software distribution system, which is -implemented by public license practices. Many people have made -generous contributions to the wide range of software distributed -through that system in reliance on consistent application of that -system; it is up to the author/donor to decide if he or she is willing -to distribute software through any other system and a licensee cannot -impose that choice. - -This section is intended to make thoroughly clear what is believed to -be a consequence of the rest of this License. - - 8. If the distribution and/or use of the Program is restricted in -certain countries either by patents or by copyrighted interfaces, the -original copyright holder who places the Program under this License -may add an explicit geographical distribution limitation excluding -those countries, so that distribution is permitted only in or among -countries not thus excluded. In such case, this License incorporates -the limitation as if written in the body of this License. - - 9. The Free Software Foundation may publish revised and/or new versions -of the General Public License from time to time. Such new versions will -be similar in spirit to the present version, but may differ in detail to -address new problems or concerns. - -Each version is given a distinguishing version number. If the Program -specifies a version number of this License which applies to it and "any -later version", you have the option of following the terms and conditions -either of that version or of any later version published by the Free -Software Foundation. If the Program does not specify a version number of -this License, you may choose any version ever published by the Free Software -Foundation. - - 10. If you wish to incorporate parts of the Program into other free -programs whose distribution conditions are different, write to the author -to ask for permission. For software which is copyrighted by the Free -Software Foundation, write to the Free Software Foundation; we sometimes -make exceptions for this. Our decision will be guided by the two goals -of preserving the free status of all derivatives of our free software and -of promoting the sharing and reuse of software generally. - - NO WARRANTY - - 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY -FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN -OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES -PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED -OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS -TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE -PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, -REPAIR OR CORRECTION. - - 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR -REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, -INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING -OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED -TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY -YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER -PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE -POSSIBILITY OF SUCH DAMAGES. - - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Programs - - If you develop a new program, and you want it to be of the greatest -possible use to the public, the best way to achieve this is to make it -free software which everyone can redistribute and change under these terms. - - To do so, attach the following notices to the program. It is safest -to attach them to the start of each source file to most effectively -convey the exclusion of warranty; and each file should have at least -the "copyright" line and a pointer to where the full notice is found. - - - Copyright (C) - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along - with this program; if not, write to the Free Software Foundation, Inc., - 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - -Also add information on how to contact you by electronic and paper mail. - -If the program is interactive, make it output a short notice like this -when it starts in an interactive mode: - - Gnomovision version 69, Copyright (C) year name of author - Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. - This is free software, and you are welcome to redistribute it - under certain conditions; type `show c' for details. - -The hypothetical commands `show w' and `show c' should show the appropriate -parts of the General Public License. Of course, the commands you use may -be called something other than `show w' and `show c'; they could even be -mouse-clicks or menu items--whatever suits your program. - -You should also get your employer (if you work as a programmer) or your -school, if any, to sign a "copyright disclaimer" for the program, if -necessary. Here is a sample; alter the names: - - Yoyodyne, Inc., hereby disclaims all copyright interest in the program - `Gnomovision' (which makes passes at compilers) written by James Hacker. - - , 1 April 1989 - Ty Coon, President of Vice - -This General Public License does not permit incorporating your program into -proprietary programs. If your program is a subroutine library, you may -consider it more useful to permit linking proprietary applications with the -library. If this is what you want to do, use the GNU Lesser General -Public License instead of this License. diff --git a/src/guitartex2/AboutBox.java b/src/main/java/guitartex2/AboutBox.java similarity index 93% rename from src/guitartex2/AboutBox.java rename to src/main/java/guitartex2/AboutBox.java index a13ac63..b015374 100644 --- a/src/guitartex2/AboutBox.java +++ b/src/main/java/guitartex2/AboutBox.java @@ -48,8 +48,8 @@ public class AboutBox extends JFrame implements ActionListener { public AboutBox() { Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize(); - aboutTop = new Double((screenSize.getHeight()/2) - (aboutHeight/2)).intValue(); - aboutLeft = new Double((screenSize.getWidth()/2) - (aboutWidth/2)).intValue(); + aboutTop = Double.valueOf((screenSize.getHeight()/2) - (aboutHeight/2)).intValue(); + aboutLeft = Double.valueOf((screenSize.getWidth()/2) - (aboutWidth/2)).intValue(); this.setResizable(false); resbundle = ResourceBundle.getBundle ("GuitarTeX2strings", Locale.getDefault()); @@ -67,7 +67,7 @@ public class AboutBox extends JFrame implements ActionListener { } this.getContentPane().setLayout(new BorderLayout(30, 30)); - java.net.URL imgURL = AboutBox.class.getResource("images/gitarre1.jpg"); + java.net.URL imgURL = AboutBox.class.getResource("/images/gitarre1.jpg"); ImageIcon icon = new ImageIcon(imgURL, ""); aboutLabel = new JLabel[labelCount]; diff --git a/src/guitartex2/BareBonesBrowserLaunch.java b/src/main/java/guitartex2/BareBonesBrowserLaunch.java similarity index 100% rename from src/guitartex2/BareBonesBrowserLaunch.java rename to src/main/java/guitartex2/BareBonesBrowserLaunch.java diff --git a/src/guitartex2/CmdExec.java b/src/main/java/guitartex2/CmdExec.java similarity index 95% rename from src/guitartex2/CmdExec.java rename to src/main/java/guitartex2/CmdExec.java index d45310d..28c363c 100644 --- a/src/guitartex2/CmdExec.java +++ b/src/main/java/guitartex2/CmdExec.java @@ -37,7 +37,7 @@ public class CmdExec{ } } }catch (Exception err) { - InfoBox infoBox = new InfoBox("ERR: " + err); + new InfoBox("ERR: " + err); } return ausgabe; } diff --git a/src/guitartex2/Configurations.java b/src/main/java/guitartex2/Configurations.java similarity index 95% rename from src/guitartex2/Configurations.java rename to src/main/java/guitartex2/Configurations.java index 7ab6056..33cc1d9 100644 --- a/src/guitartex2/Configurations.java +++ b/src/main/java/guitartex2/Configurations.java @@ -20,7 +20,6 @@ import java.io.File; import java.io.FileInputStream; import java.io.FileOutputStream; import java.io.InputStream; -import java.net.URL; import java.util.Enumeration; import java.util.Properties; @@ -85,7 +84,7 @@ final class Configurations { Properties defProps = new Properties(); //defProps.load(defaultPropFIS); - defProps.load(GuitarTeX2.class.getResourceAsStream(propertiesFileName)); + defProps.load(GuitarTeX2.class.getResourceAsStream("/"+propertiesFileName)); //defaultPropFIS.close(); Enumeration defElements = defProps.keys(); mProperties.load( propsFIS ); @@ -121,7 +120,7 @@ final class Configurations { if ( ! new File(userFileDirectory).exists() ) { new File(userFileDirectory).mkdir(); } - copyFile(GuitarTeX2.class.getResource(propertiesFileName), new File(userFileFullPath)); + copyFile(GuitarTeX2.class.getResourceAsStream("/"+propertiesFileName), new File(userFileFullPath)); return userFileFullPath; }catch (Exception e) { mConsole.addText("creating user config file failed: " + e); @@ -147,7 +146,7 @@ final class Configurations { if ( ! new File(userFileDirectory).exists() ) { new File(userFileDirectory).mkdir(); } - copyFile(GuitarTeX2.class.getResource(propertiesFileName), new File(userFileFullPath)); + copyFile(GuitarTeX2.class.getResourceAsStream("/"+propertiesFileName), new File(userFileFullPath)); return userFileFullPath; }catch (Exception e) { mConsole.addText("creating user config file failed: " + e); @@ -173,7 +172,7 @@ final class Configurations { if ( ! new File(userFileDirectory).exists() ) { new File(userFileDirectory).mkdir(); } - copyFile(GuitarTeX2.class.getResource(propertiesFileName), new File(userFileFullPath)); + copyFile(GuitarTeX2.class.getResourceAsStream("/"+propertiesFileName), new File(userFileFullPath)); return userFileFullPath; }catch (Exception e) { mConsole.addText("creating user config file failed: " + e); @@ -197,7 +196,7 @@ final class Configurations { if ( ! new File(userFileDirectory).exists() ) { new File(userFileDirectory).mkdir(); } - copyFile(GuitarTeX2.class.getResource(propertiesFileName), new File(userFileFullPath)); + copyFile(GuitarTeX2.class.getResourceAsStream("/"+propertiesFileName), new File(userFileFullPath)); return userFileFullPath; }catch (Exception e) { mConsole.addText("creating user config file failed: " + e); @@ -209,9 +208,9 @@ final class Configurations { } - private void copyFile(URL inURL, File out) throws Exception { - mConsole.addText("CopyFile: " + inURL); - try (InputStream inStream = inURL.openStream(); FileOutputStream fos = new FileOutputStream(out)) { + private void copyFile(InputStream inStream, File out) throws Exception { + mConsole.addText("CopyFile: ..."); + try (FileOutputStream fos = new FileOutputStream(out)) { byte[] buf = new byte[1024]; int i; @@ -292,12 +291,15 @@ final class Configurations { mProperties.setProperty("tmpPath", path); } checkResult = checkDirectory(mProperties.getProperty("tmpPath")); + /* checkResult = checkResult & checkFile(mProperties.getProperty("linuxPdfViewer")); if ( checkResult == false ) { mConsole.addText("linuxPdfViewer not found"); confProblems = confProblems + "linuxPdfViewer not found!\n"; } pdfViewer = mProperties.getProperty("linuxPdfViewer"); + */ + pdfViewer = "xdg-open"; tmpDir = mProperties.getProperty("tmpPath"); return checkResult; } @@ -495,7 +497,7 @@ final class Configurations { mProperties.setProperty("gtxServer", defProps.getProperty("gtxServer")); mProperties.setProperty("gtxServerPort", defProps.getProperty("gtxServerPort")); } catch (Exception e) { - InfoBox infoBox = new InfoBox(e + ""); + new InfoBox(e + ""); } /* mPdfViewerField.setText(myConfiguration.getPdfViewer()); diff --git a/src/guitartex2/FileTransfer.java b/src/main/java/guitartex2/FileTransfer.java similarity index 96% rename from src/guitartex2/FileTransfer.java rename to src/main/java/guitartex2/FileTransfer.java index 7172325..a49c56b 100644 --- a/src/guitartex2/FileTransfer.java +++ b/src/main/java/guitartex2/FileTransfer.java @@ -100,7 +100,7 @@ class FileTransfer { if (length > Integer.MAX_VALUE) { // File is too large sendMsg("Filetransfer[" + fId + "]: File is too large"); - cleanTmp(myFile); + cleanTmp(myFile, in); return 1; } else { int myFileLength = (int) length; @@ -110,7 +110,7 @@ class FileTransfer { fileLengthResult = inStream.readUTF(); } catch (Exception i) { sendMsg("Filetransfer[" + fId + "]: stream error" + i); - cleanTmp(myFile); + cleanTmp(myFile, in); return 1; } if (fileLengthResult.equals(ok)) { @@ -137,7 +137,7 @@ class FileTransfer { } } else { sendMsg("Filetransfer[" + fId + "]: sending file length failed: " + fileLengthResult); - cleanTmp(myFile); + cleanTmp(myFile, in); return 1; } } @@ -174,7 +174,7 @@ class FileTransfer { outStream.writeUTF(ok); } catch (Exception i) { sendMsg("Filetransfer[" + fId + "]: stream error " + i); - cleanTmp(myFile); + cleanTmp(myFile, out); return 1; } sendMsg("Filetransfer[" + fId + "]: awaiting file..."); @@ -284,6 +284,15 @@ class FileTransfer { } } + private void cleanTmp(String fileName, RandomAccessFile file) { + try { + new File(fileName).delete(); + file.close(); + } catch (Exception e) { + sendMsg("can't clean tmp file: " + e); + } + } + private void cleanTmp(String fileName) { try { new File(fileName).delete(); diff --git a/src/guitartex2/GTXClient.java b/src/main/java/guitartex2/GTXClient.java similarity index 98% rename from src/guitartex2/GTXClient.java rename to src/main/java/guitartex2/GTXClient.java index db86cf2..7e9d743 100644 --- a/src/guitartex2/GTXClient.java +++ b/src/main/java/guitartex2/GTXClient.java @@ -136,7 +136,7 @@ public class GTXClient extends Thread{ } String texResult = din.readUTF(); if ( texResult.equals(failed)) { - InfoBox infoBox = new InfoBox(resbundle.getString("texFailed")); + new InfoBox(resbundle.getString("texFailed")); logToConsole("texin unsuccessfull"); //myStatusBox.setStatus("FEHLER!"); //myStatusBox.requestFocus(); diff --git a/src/guitartex2/GTXConsole.java b/src/main/java/guitartex2/GTXConsole.java similarity index 95% rename from src/guitartex2/GTXConsole.java rename to src/main/java/guitartex2/GTXConsole.java index 5b64ef9..deb66ad 100644 --- a/src/guitartex2/GTXConsole.java +++ b/src/main/java/guitartex2/GTXConsole.java @@ -72,8 +72,8 @@ class GTXConsole extends JFrame implements ActionListener{ resbundle = ResourceBundle.getBundle ("GuitarTeX2strings", Locale.getDefault()); Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize(); - statusTop = new Double((screenSize.getHeight()/2) - (statusHeight/2)).intValue(); - statusLeft = new Double((screenSize.getWidth()/2) - (statusWidth/2)).intValue(); + statusTop = Double.valueOf((screenSize.getHeight()/2) - (statusHeight/2)).intValue(); + statusLeft = Double.valueOf((screenSize.getWidth()/2) - (statusWidth/2)).intValue(); this.setResizable(false); @@ -205,7 +205,9 @@ class GTXConsole extends JFrame implements ActionListener{ String prefix = this.now() + " # "; text = text.replaceAll("\n", "\n" + prefix); mShowArea.setText(mShowArea.getText() + "\n" + prefix + text); - //System.out.println(text); + // TODO: Make silent output configurable + // Uncomment this line if you don't want console output + System.out.println(text); } private String now() { diff --git a/src/guitartex2/GTXParser.java b/src/main/java/guitartex2/GTXParser.java similarity index 98% rename from src/guitartex2/GTXParser.java rename to src/main/java/guitartex2/GTXParser.java index d8a6de0..dcbafab 100644 --- a/src/guitartex2/GTXParser.java +++ b/src/main/java/guitartex2/GTXParser.java @@ -1064,7 +1064,8 @@ public class GTXParser { "\\usepackage{ifthen}\n" + "\\usepackage{calc}\n" + "\\usepackage{gchords}\n" - + "\\usepackage{calligra}\n"; + + "\\usepackage{calligra}\n" + + "\\usepackage{adjustbox}\n"; if (noPageNum) { myTeXFile = myTeXFile + "\\pagestyle{empty}\n"; @@ -1114,12 +1115,12 @@ public class GTXParser { + "\\makebox[0cm][l]{\\raisebox{4.5ex}{\\footnotesize{A}}}%\n" + "\\makebox[0cm][l]{\\raisebox{2.5ex}{\\footnotesize{E}}}%\n" + "~~\n" - + "\\makebox[0cm][l]{\\raisebox{13ex}{\\line(1,0){130}}}%\n" - + "\\makebox[0cm][l]{\\raisebox{11ex}{\\line(1,0){130}}}%\n" - + "\\makebox[0cm][l]{\\raisebox{9ex}{\\line(1,0){130}}}%\n" - + "\\makebox[0cm][l]{\\raisebox{7ex}{\\line(1,0){130}}}%\n" - + "\\makebox[0cm][l]{\\raisebox{5ex}{\\line(1,0){130}}}%\n" - + "\\makebox[0cm][l]{\\raisebox{3ex}{\\line(1,0){130}}}%\n" + + "\\makebox[0cm][l]{\\raisebox{13ex}{\\line(1,0){\\textwidth}}}%\n" + + "\\makebox[0cm][l]{\\raisebox{11ex}{\\line(1,0){\\textwidth}}}%\n" + + "\\makebox[0cm][l]{\\raisebox{9ex}{\\line(1,0){\\textwidth}}}%\n" + + "\\makebox[0cm][l]{\\raisebox{7ex}{\\line(1,0){\\textwidth}}}%\n" + + "\\makebox[0cm][l]{\\raisebox{5ex}{\\line(1,0){\\textwidth}}}%\n" + + "\\makebox[0cm][l]{\\raisebox{3ex}{\\line(1,0){\\textwidth}}}%\n" + "~}\n\n" + "\\newcommand{\\basstab}{%\n" + "\\makebox[0cm][l]{\\raisebox{8.5ex}{\\footnotesize{G}}}%\n" @@ -1127,12 +1128,13 @@ public class GTXParser { + "\\makebox[0cm][l]{\\raisebox{4.5ex}{\\footnotesize{A}}}%\n" + "\\makebox[0cm][l]{\\raisebox{2.5ex}{\\footnotesize{E}}}%\n" + "~~\n" - + "\\makebox[0cm][l]{\\raisebox{9ex}{\\line(1,0){130}}}%\n" - + "\\makebox[0cm][l]{\\raisebox{7ex}{\\line(1,0){130}}}%\n" - + "\\makebox[0cm][l]{\\raisebox{5ex}{\\line(1,0){130}}}%\n" - + "\\makebox[0cm][l]{\\raisebox{3ex}{\\line(1,0){130}}}%\n" + + "\\makebox[0cm][l]{\\raisebox{9ex}{\\line(1,0){\\textwidth}}}%\n" + + "\\makebox[0cm][l]{\\raisebox{7ex}{\\line(1,0){\\textwidth}}}%\n" + + "\\makebox[0cm][l]{\\raisebox{5ex}{\\line(1,0){\\textwidth}}}%\n" + + "\\makebox[0cm][l]{\\raisebox{3ex}{\\line(1,0){\\textwidth}}}%\n" + "~}\n\n" - + "\\newcommand{\\gtxtabs}[2]{\\makebox[0cm][l]{\\raisebox{#1}{#2}}}\n" + //+ "\\newcommand{\\gtxtabs}[2]{\\makebox[0cm][l]{\\raisebox{#1}{#2}}}\n" + + "\\newcommand{\\gtxtabs}[2]{{\\makebox[0cm][l]{\\raisebox{#1}{\\adjustbox{margin=0ex 0ex, bgcolor=white}{#2}}}}}" + // define arrow symbols for harp tunes "\\newcommand{\\hdraw}{\n" + " \\begin{picture}(0,0)\n" @@ -1299,6 +1301,7 @@ public class GTXParser { + "\\usepackage{makeidx}\n" + "\\usepackage{fancyhdr}\n" + "\\usepackage{calligra}\n" + + "\\usepackage{adjustbox}\n" + "\\usepackage[pdftex]{thumbpdf}\n"; myTeXFile = myTeXFile + "\\title{\\calligra{" + mBookTitle + "}}\n" @@ -1343,12 +1346,12 @@ public class GTXParser { + "\\makebox[0cm][l]{\\raisebox{4.5ex}{\\footnotesize{A}}}%\n" + "\\makebox[0cm][l]{\\raisebox{2.5ex}{\\footnotesize{E}}}%\n" + "~~\n" - + "\\makebox[0cm][l]{\\raisebox{13ex}{\\line(1,0){130}}}%\n" - + "\\makebox[0cm][l]{\\raisebox{11ex}{\\line(1,0){130}}}%\n" - + "\\makebox[0cm][l]{\\raisebox{9ex}{\\line(1,0){130}}}%\n" - + "\\makebox[0cm][l]{\\raisebox{7ex}{\\line(1,0){130}}}%\n" - + "\\makebox[0cm][l]{\\raisebox{5ex}{\\line(1,0){130}}}%\n" - + "\\makebox[0cm][l]{\\raisebox{3ex}{\\line(1,0){130}}}%\n" + + "\\makebox[0cm][l]{\\raisebox{13ex}{\\line(1,0){\\textwidth}}}%\n" + + "\\makebox[0cm][l]{\\raisebox{11ex}{\\line(1,0){\\textwidth}}}%\n" + + "\\makebox[0cm][l]{\\raisebox{9ex}{\\line(1,0){\\textwidth}}}%\n" + + "\\makebox[0cm][l]{\\raisebox{7ex}{\\line(1,0){\\textwidth}}}%\n" + + "\\makebox[0cm][l]{\\raisebox{5ex}{\\line(1,0){\\textwidth}}}%\n" + + "\\makebox[0cm][l]{\\raisebox{3ex}{\\line(1,0){\\textwidth}}}%\n" + "~}\n\n" + "\\newcommand{\\basstab}{%\n" + "\\makebox[0cm][l]{\\raisebox{8.5ex}{\\footnotesize{G}}}%\n" @@ -1356,12 +1359,13 @@ public class GTXParser { + "\\makebox[0cm][l]{\\raisebox{4.5ex}{\\footnotesize{A}}}%\n" + "\\makebox[0cm][l]{\\raisebox{2.5ex}{\\footnotesize{E}}}%\n" + "~~\n" - + "\\makebox[0cm][l]{\\raisebox{9ex}{\\line(1,0){130}}}%\n" - + "\\makebox[0cm][l]{\\raisebox{7ex}{\\line(1,0){130}}}%\n" - + "\\makebox[0cm][l]{\\raisebox{5ex}{\\line(1,0){130}}}%\n" - + "\\makebox[0cm][l]{\\raisebox{3ex}{\\line(1,0){130}}}%\n" + + "\\makebox[0cm][l]{\\raisebox{9ex}{\\line(1,0){\\textwidth}}}%\n" + + "\\makebox[0cm][l]{\\raisebox{7ex}{\\line(1,0){\\textwidth}}}%\n" + + "\\makebox[0cm][l]{\\raisebox{5ex}{\\line(1,0){\\textwidth}}}%\n" + + "\\makebox[0cm][l]{\\raisebox{3ex}{\\line(1,0){\\textwidth}}}%\n" + "~}\n\n" - + "\\newcommand{\\gtxtabs}[2]{\\makebox[0cm][l]{\\raisebox{#1}{#2}}}\n" + //+ "\\newcommand{\\gtxtabs}[2]{\\makebox[0cm][l]{\\raisebox{#1}{#2}}}\n" + + "\\newcommand{\\gtxtabs}[2]{{\\makebox[0cm][l]{\\raisebox{#1}{\\adjustbox{margin=0ex 0ex, bgcolor=white}{#2}}}}}" + // define arrow symbols for harp tunes "\\newcommand{\\hdraw}{\n" + " \\begin{picture}(0,0)\n" @@ -1439,4 +1443,4 @@ public class GTXParser { } System.out.println("\n"); } -} +} \ No newline at end of file diff --git a/src/guitartex2/GTXTextConsole.java b/src/main/java/guitartex2/GTXTextConsole.java similarity index 100% rename from src/guitartex2/GTXTextConsole.java rename to src/main/java/guitartex2/GTXTextConsole.java diff --git a/src/guitartex2/GuitarTeX2.java b/src/main/java/guitartex2/GuitarTeX2.java similarity index 94% rename from src/guitartex2/GuitarTeX2.java rename to src/main/java/guitartex2/GuitarTeX2.java index eef95b2..2775c9e 100644 --- a/src/guitartex2/GuitarTeX2.java +++ b/src/main/java/guitartex2/GuitarTeX2.java @@ -25,7 +25,6 @@ import java.awt.BorderLayout; import java.awt.Color; import java.awt.Cursor; import java.awt.Dimension; -import java.awt.Event; import java.awt.FlowLayout; import java.awt.Font; import java.awt.GridLayout; @@ -130,10 +129,10 @@ public class GuitarTeX2 extends JFrame { private Action mTeX2PdfAction; private Action mExitAction; private Action mConsoleAction; - private Action mFAQAction, mShortcutAction; + private Action mFAQAction, mShortcutAction, mDocAction; private Action mAboutAction; - private Action mOpenTemplateSongAction, mOpenTemplateBookAction; + private Action mOpenTemplateSong1Action, mOpenTemplateSong2Action, mOpenTemplateBookAction; private static int gtxWidth; private static int gtxHeight; @@ -257,7 +256,7 @@ public class GuitarTeX2 extends JFrame { //myConf.checkConfig(); if (myConf.checkConfig() == false) { - WarningBox warningBox = new WarningBox(resbundle.getString("confFailed"), myConf.getConfProblems()); + new WarningBox(resbundle.getString("confFailed"), myConf.getConfProblems()); System.err.println("loading configuration failed!"); } consoleBox.setGTXClient(myConf); @@ -272,12 +271,12 @@ public class GuitarTeX2 extends JFrame { //gtxHeight = this.getHeight(); //gtxWidth = this.getWidth(); gtxHeight = 650; - gtxWidth = 900; + gtxWidth = 950; Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize(); //gtxTop = new Double((screenSize.getHeight()/2) - (gtxHeight/2)).intValue(); gtxTop = 0; - gtxLeft = new Double((screenSize.getWidth() / 2) - (gtxWidth / 2)).intValue(); + gtxLeft = Double.valueOf((screenSize.getWidth() / 2) - (gtxWidth / 2)).intValue(); this.setLocation(gtxLeft, gtxTop); this.setSize(gtxWidth, gtxHeight); @@ -374,31 +373,31 @@ public class GuitarTeX2 extends JFrame { mActionToolBar = new JToolBar(resbundle.getString("actionToolBar")); mActionToolBar.setFloatable(false); // -- // -- New - URL mNewImageURL = GuitarTeX2.class.getResource("images/filenew.png"); + URL mNewImageURL = GuitarTeX2.class.getResource("/images/filenew.png"); mNewButton = mActionToolBar.add(mNewAction); mNewButton.setIcon(new ImageIcon(mNewImageURL)); mNewButton.setText(""); mNewButton.setToolTipText(resbundle.getString("newItem")); // -- // -- Open - URL mOpenImageURL = GuitarTeX2.class.getResource("images/fileopen.png"); + URL mOpenImageURL = GuitarTeX2.class.getResource("/images/fileopen.png"); mOpenButton = mActionToolBar.add(mOpenAction); mOpenButton.setIcon(new ImageIcon(mOpenImageURL)); mOpenButton.setText(""); mOpenButton.setToolTipText(resbundle.getString("openItem")); // -- // -- Save - URL mSaveImageURL = GuitarTeX2.class.getResource("images/filesave.png"); + URL mSaveImageURL = GuitarTeX2.class.getResource("/images/filesave.png"); mSaveButton = mActionToolBar.add(mSaveAction); mSaveButton.setIcon(new ImageIcon(mSaveImageURL)); mSaveButton.setText(""); mSaveButton.setToolTipText(resbundle.getString("saveItem")); // -- // -- SaveAs - URL mSaveAsImageURL = GuitarTeX2.class.getResource("images/filesaveas.png"); + URL mSaveAsImageURL = GuitarTeX2.class.getResource("/images/filesaveas.png"); mSaveAsButton = mActionToolBar.add(mSaveAsAction); mSaveAsButton.setIcon(new ImageIcon(mSaveAsImageURL)); mSaveAsButton.setText(""); mSaveAsButton.setToolTipText(resbundle.getString("saveAsItem")); // -- // -- GTX2TeX - URL mGTX2TeXURL = GuitarTeX2.class.getResource("images/gtx2tex.png"); + URL mGTX2TeXURL = GuitarTeX2.class.getResource("/images/gtx2tex.png"); mGtx2TeXButton = mActionToolBar.add(mGTX2TeXAction); mGtx2TeXButton.setIcon(new ImageIcon(mGTX2TeXURL)); mGtx2TeXButton.setText(""); @@ -425,7 +424,7 @@ public class GuitarTeX2 extends JFrame { //mDvi2PdfButton.setToolTipText(resbundle.getString("dvi2pdf")); //mDvi2PdfButton.setEnabled(false); // -- // -- TEX2PDF - URL mTeX2PdfURL = GuitarTeX2.class.getResource("images/tex2pdf.png"); + URL mTeX2PdfURL = GuitarTeX2.class.getResource("/images/tex2pdf.png"); mTeX2PdfButton = mActionToolBar.add(mTeX2PdfAction); mTeX2PdfButton.setIcon(new ImageIcon(mTeX2PdfURL)); mTeX2PdfButton.setText(""); @@ -473,20 +472,20 @@ public class GuitarTeX2 extends JFrame { mHarpToolBar = new JToolBar(resbundle.getString("harpToolBar")); //mHarpToolBar.setLayout(new GridLayout(2,9)); - ImageIcon upButtonIcon = createImageIcon("images/icon-up2.png"); - ImageIcon downButtonIcon = createImageIcon("images/icon-down2.png"); + ImageIcon upButtonIcon = createImageIcon("/images/icon-up2.png"); + ImageIcon downButtonIcon = createImageIcon("/images/icon-down2.png"); mHarpUp = new JToggleButton(upButtonIcon); Action pmUpAction = new mPMHarpActionClass("up"); mHarpUp.addActionListener(pmUpAction); mHarpUp.setSelected(true); InputMap inputMap = mEditArea.getInputMap(); - KeyStroke keyUp = KeyStroke.getKeyStroke(KeyEvent.VK_U, Event.CTRL_MASK); + KeyStroke keyUp = KeyStroke.getKeyStroke(KeyEvent.VK_U, KeyEvent.CTRL_DOWN_MASK); inputMap.put(keyUp, pmUpAction); mHarpDown = new JToggleButton(downButtonIcon); Action pmDownAction = new mPMHarpActionClass("down"); mHarpDown.addActionListener(pmDownAction); - KeyStroke keyDown = KeyStroke.getKeyStroke(KeyEvent.VK_J, Event.CTRL_MASK); + KeyStroke keyDown = KeyStroke.getKeyStroke(KeyEvent.VK_J, KeyEvent.CTRL_DOWN_MASK); inputMap.put(keyDown, pmDownAction); JPanel pm = new JPanel(); @@ -617,7 +616,7 @@ public class GuitarTeX2 extends JFrame { private JButton createChordButton(Action aButton, int keyEvent) { InputMap inputMap = mEditArea.getInputMap(); - KeyStroke key = KeyStroke.getKeyStroke(keyEvent, Event.CTRL_MASK); + KeyStroke key = KeyStroke.getKeyStroke(keyEvent, KeyEvent.CTRL_DOWN_MASK); inputMap.put(key, aButton); JButton chord = new JButton(aButton); @@ -632,7 +631,7 @@ public class GuitarTeX2 extends JFrame { private JButton createHarpButton(Action hButton, int keyEvent) { InputMap inputMap = mEditArea.getInputMap(); - KeyStroke key = KeyStroke.getKeyStroke(keyEvent, Event.CTRL_MASK); + KeyStroke key = KeyStroke.getKeyStroke(keyEvent, KeyEvent.CTRL_DOWN_MASK); inputMap.put(key, hButton); JButton chord = new JButton(hButton); @@ -654,7 +653,8 @@ public class GuitarTeX2 extends JFrame { fileMenu.addSeparator(); JMenu templateMenu = new JMenu(resbundle.getString("templateItem")); - templateMenu.add(mOpenTemplateSongAction); + templateMenu.add(mOpenTemplateSong1Action); + templateMenu.add(mOpenTemplateSong2Action); templateMenu.add(mOpenTemplateBookAction); fileMenu.add(templateMenu); @@ -675,6 +675,7 @@ public class GuitarTeX2 extends JFrame { JMenu helpMenu = menuBar.add(new JMenu(resbundle.getString("helpMenu"))); helpMenu.add(mConsoleAction); + helpMenu.add(mDocAction); helpMenu.add(mFAQAction); helpMenu.add(mShortcutAction); helpMenu.add(mAboutAction); @@ -695,7 +696,8 @@ public class GuitarTeX2 extends JFrame { mOpenAction = new openActionClass(resbundle.getString("openItem"), KeyStroke.getKeyStroke(KeyEvent.VK_O, shortcutKeyMask)); - mOpenTemplateSongAction = new openActionClass(resbundle.getString("simpleSong")); + mOpenTemplateSong1Action = new openActionClass(resbundle.getString("simpleSong1")); + mOpenTemplateSong2Action = new openActionClass(resbundle.getString("simpleSong2")); mOpenTemplateBookAction = new openActionClass(resbundle.getString("simpleBook")); mSaveAction = new saveActionClass(resbundle.getString("saveItem"), @@ -717,6 +719,8 @@ public class GuitarTeX2 extends JFrame { mConsoleAction = new consoleActionClass(resbundle.getString("consoleItem")); + mDocAction = new docActionClass(resbundle.getString("docItem")); + mFAQAction = new faqActionClass(resbundle.getString("faqItem")); mShortcutAction = new shortcutActionClass(resbundle.getString("shortcutItem")); @@ -849,11 +853,16 @@ public class GuitarTeX2 extends JFrame { @Override public void actionPerformed(ActionEvent e) { String fileName = ""; - if (e.getActionCommand().equals(resbundle.getString("simpleSong"))) { - fileName = myConf.getSongTemplate(); + if (e.getActionCommand().equals(resbundle.getString("simpleSong1"))) { + //fileName = myConf.getSongTemplate(); + fileName = resbundle.getString("simpleSong1"); + } + if (e.getActionCommand().equals(resbundle.getString("simpleSong2"))) { + fileName = resbundle.getString("simpleSong2"); } if (e.getActionCommand().equals(resbundle.getString("simpleBook"))) { - fileName = myConf.getBookTemplate(); + //fileName = myConf.getBookTemplate(); + fileName = resbundle.getString("simpleBook"); } if (mFileChanged == true) { int n = JOptionPane.showConfirmDialog( @@ -926,19 +935,36 @@ public class GuitarTeX2 extends JFrame { mFileChanged = false; } catch (IOException ioex) { consoleBox.addText("ERR: " + ioex); - InfoBox infoBox = new InfoBox("Error: " + ioex); + new InfoBox("Error: " + ioex); } } } private void openFile(String fileName) { - File f = new File(fileName); try { - FileInputStream fis = new FileInputStream(f); - mEditArea.read(new UnicodeReader(fis, "UTF-8"), ""); + if ( fileName.contentEquals(resbundle.getString("simpleSong1")) ) { + mEditArea.read(new UnicodeReader(GuitarTeX2.class.getResourceAsStream("/examples/griechischer_wein.gtx"), "UTF-8"), ""); + mActFileName = resbundle.getString("mNewFile"); + mFileChooser.setSelectedFile(null); + tabbedPane.setTitleAt(0, resbundle.getString("mNewFile")); + }else if ( fileName.contentEquals(resbundle.getString("simpleSong2")) ) { + mEditArea.read(new UnicodeReader(GuitarTeX2.class.getResourceAsStream("/examples/lazy_blues.gtx"), "UTF-8"), ""); + mActFileName = resbundle.getString("mNewFile"); + mFileChooser.setSelectedFile(null); + tabbedPane.setTitleAt(0, resbundle.getString("mNewFile")); + }else if (fileName.contentEquals(resbundle.getString("simpleBook"))) { + mEditArea.read(new UnicodeReader(GuitarTeX2.class.getResourceAsStream("/examples/my_first_book.gtb"), "UTF-8"), ""); + mActFileName = resbundle.getString("mNewFile"); + mFileChooser.setSelectedFile(null); + tabbedPane.setTitleAt(0, resbundle.getString("mNewFile")); + }else { + File f = new File(fileName); + FileInputStream fis = new FileInputStream(f); + mEditArea.read(new UnicodeReader(fis, "UTF-8"), ""); + mActFileName = f.getName(); + tabbedPane.setTitleAt(0, mActFileName); + } mEditArea.getDocument().addDocumentListener(new MyDocumentListener()); - mActFileName = f.getName(); - tabbedPane.setTitleAt(0, mActFileName); mShowTeXArea.setText(""); mShowTeXArea.setEnabled(false); mShowTeXArea.setVisible(false); @@ -947,7 +973,7 @@ public class GuitarTeX2 extends JFrame { mFileChanged = false; } catch (IOException ioex) { consoleBox.addText("ERR: " + ioex); - InfoBox infoBox = new InfoBox("Error: " + ioex); + new InfoBox("Error: " + ioex); } } } @@ -1222,6 +1248,19 @@ public class GuitarTeX2 extends JFrame { } } } + + + } + public class docActionClass extends AbstractAction { + + public docActionClass(String text) { + super(text); + } + + @Override + public void actionPerformed(ActionEvent e) { + BareBonesBrowserLaunch.openURL(resbundle.getString("docURL")); + } } public class faqActionClass extends AbstractAction { diff --git a/src/guitartex2/GuitarTeX2Convert.java b/src/main/java/guitartex2/GuitarTeX2Convert.java similarity index 93% rename from src/guitartex2/GuitarTeX2Convert.java rename to src/main/java/guitartex2/GuitarTeX2Convert.java index 356a5d6..acabc6f 100644 --- a/src/guitartex2/GuitarTeX2Convert.java +++ b/src/main/java/guitartex2/GuitarTeX2Convert.java @@ -31,8 +31,8 @@ public class GuitarTeX2Convert { String help = "" + resbundle.getString("appVersion") + "\n" + "Usage: \n" - + " GuitarTeX2Converter -h help (this screen)\n" - + " GuitarTeX2Converter -f convert gtx file and print to std out\n" + + " GuitarTeX2Convert -h help (this screen)\n" + + " GuitarTeX2Convert -f convert gtx file and print to std out\n" + "\n"; if (args.length != 0) { @@ -47,7 +47,7 @@ public class GuitarTeX2Convert { if (!fileName.equals("")) { File f = new File(fileName); if (f.canRead()) { - GuitarTeX2Convert guitarTeX2Convert = new GuitarTeX2Convert(f); + new GuitarTeX2Convert(f); } else { System.out.println("error: can't read file\n"); System.out.println(help); diff --git a/src/guitartex2/InfoBox.java b/src/main/java/guitartex2/InfoBox.java similarity index 95% rename from src/guitartex2/InfoBox.java rename to src/main/java/guitartex2/InfoBox.java index a37f9b7..e8c920d 100644 --- a/src/guitartex2/InfoBox.java +++ b/src/main/java/guitartex2/InfoBox.java @@ -54,8 +54,8 @@ class InfoBox extends JFrame implements ActionListener{ resbundle = ResourceBundle.getBundle ("GuitarTeX2strings", Locale.getDefault()); Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize(); - statusTop = new Double((screenSize.getHeight()/2) - (statusHeight/2)).intValue(); - statusLeft = new Double((screenSize.getWidth()/2) - (statusWidth/2)).intValue(); + statusTop = Double.valueOf((screenSize.getHeight()/2) - (statusHeight/2)).intValue(); + statusLeft = Double.valueOf((screenSize.getWidth()/2) - (statusWidth/2)).intValue(); this.setResizable(false); diff --git a/src/guitartex2/PreferencesBox.java b/src/main/java/guitartex2/PreferencesBox.java similarity index 98% rename from src/guitartex2/PreferencesBox.java rename to src/main/java/guitartex2/PreferencesBox.java index a6b4bd5..4edaa16 100644 --- a/src/guitartex2/PreferencesBox.java +++ b/src/main/java/guitartex2/PreferencesBox.java @@ -206,8 +206,8 @@ public class PreferencesBox extends JFrame implements ActionListener { Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize(); - int aboutTop = new Double((screenSize.getHeight() / 2) - (this.getHeight() / 2)).intValue(); - int aboutLeft = new Double((screenSize.getWidth() / 2) - (this.getWidth() / 2)).intValue(); + int aboutTop = Double.valueOf((screenSize.getHeight() / 2) - (this.getHeight() / 2)).intValue(); + int aboutLeft = Double.valueOf((screenSize.getWidth() / 2) - (this.getWidth() / 2)).intValue(); this.setTitle(resbundle.getString("prefTitle")); this.setLocation(aboutLeft, aboutTop); diff --git a/src/guitartex2/SpringUtilities.java b/src/main/java/guitartex2/SpringUtilities.java similarity index 100% rename from src/guitartex2/SpringUtilities.java rename to src/main/java/guitartex2/SpringUtilities.java diff --git a/src/guitartex2/StatusBox.java b/src/main/java/guitartex2/StatusBox.java similarity index 90% rename from src/guitartex2/StatusBox.java rename to src/main/java/guitartex2/StatusBox.java index e5dc820..72be366 100644 --- a/src/guitartex2/StatusBox.java +++ b/src/main/java/guitartex2/StatusBox.java @@ -53,8 +53,8 @@ public class StatusBox extends JFrame implements ActionListener { resbundle = ResourceBundle.getBundle ("GuitarTeX2strings", Locale.getDefault()); Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize(); - statusTop = new Double((screenSize.getHeight()/2) - (statusHeight/2)).intValue(); - statusLeft = new Double((screenSize.getWidth()/2) - (statusWidth/2)).intValue(); + statusTop = Double.valueOf((screenSize.getHeight()/2) - (statusHeight/2)).intValue(); + statusLeft = Double.valueOf((screenSize.getWidth()/2) - (statusWidth/2)).intValue(); this.setResizable(false); @@ -71,7 +71,7 @@ public class StatusBox extends JFrame implements ActionListener { bodyFont = new Font("SansSerif", Font.PLAIN, 10); } - java.net.URL imgURL = StatusBox.class.getResource("images/info.png"); + java.net.URL imgURL = StatusBox.class.getResource("/images/info.png"); ImageIcon icon = new ImageIcon(imgURL, ""); Panel textPanel = new Panel(new GridBagLayout()); @@ -96,8 +96,8 @@ public class StatusBox extends JFrame implements ActionListener { public StatusBox(String myStatus) { Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize(); - statusTop = new Double((screenSize.getHeight()/2) - (statusHeight/2)).intValue(); - statusLeft = new Double((screenSize.getWidth()/2) - (statusWidth/2)).intValue(); + statusTop = Double.valueOf((screenSize.getHeight()/2) - (statusHeight/2)).intValue(); + statusLeft = Double.valueOf((screenSize.getWidth()/2) - (statusWidth/2)).intValue(); this.setResizable(false); diff --git a/src/guitartex2/UnicodeReader.java b/src/main/java/guitartex2/UnicodeReader.java similarity index 100% rename from src/guitartex2/UnicodeReader.java rename to src/main/java/guitartex2/UnicodeReader.java diff --git a/src/guitartex2/WarningBox.java b/src/main/java/guitartex2/WarningBox.java similarity index 97% rename from src/guitartex2/WarningBox.java rename to src/main/java/guitartex2/WarningBox.java index be0503f..887f46c 100644 --- a/src/guitartex2/WarningBox.java +++ b/src/main/java/guitartex2/WarningBox.java @@ -81,7 +81,7 @@ public class WarningBox extends JFrame implements ActionListener { if (bodyFont == null) { bodyFont = new Font("SansSerif", Font.PLAIN, 10); } - java.net.URL imgURL = WarningBox.class.getResource("images/info.png"); + java.net.URL imgURL = WarningBox.class.getResource("/images/info.png"); ImageIcon icon = new ImageIcon(imgURL, ""); Panel imagePanel = new Panel(new GridBagLayout()); Panel textPanel = new Panel(new GridBagLayout()); @@ -143,7 +143,7 @@ public class WarningBox extends JFrame implements ActionListener { setEnabled(false); } if ( mAction.equals("mInfoAction")) { - InfoBox infoBox = new InfoBox(myInfo); + new InfoBox(myInfo); } } } diff --git a/src/guitartex2/GuitarTeX2.properties b/src/main/resources/GuitarTeX2.properties similarity index 88% rename from src/guitartex2/GuitarTeX2.properties rename to src/main/resources/GuitarTeX2.properties index 4910f98..a90474c 100644 --- a/src/guitartex2/GuitarTeX2.properties +++ b/src/main/resources/GuitarTeX2.properties @@ -4,7 +4,7 @@ pdflatex=/usr/bin/pdflatex windowsTmpPath= tmpPath= windowsPdfViewer=/Programme/Adobe/Reader/AcroRd32.exe -linuxPdfViewer=/usr/bin/acroread +linuxPdfViewer=/usr/bin/xdg-open exSongFile=griechischer_wein.gtx exBookFile=my_first_book.gtb gtxServer=guitartex2.nikolai-rinas.de diff --git a/src/GuitarTeX2strings.properties b/src/main/resources/GuitarTeX2strings.properties similarity index 87% rename from src/GuitarTeX2strings.properties rename to src/main/resources/GuitarTeX2strings.properties index 6430c27..64b186a 100644 --- a/src/GuitarTeX2strings.properties +++ b/src/main/resources/GuitarTeX2strings.properties @@ -5,7 +5,8 @@ closeItem=Close saveItem=Save saveAsItem=Save As... templateItem=Templates -simpleSong=Song +simpleSong1=Song1 +simpleSong2=Song2 simpleBook=Book exitItem=Quit @@ -29,11 +30,13 @@ tex2pdf=TeX2Pdf helpMenu=Help aboutItem=About aboutTitle=About +docItem=Documentation +docURL=https://guitartex2.nikolai-rinas.de/docs/directives/ faqItem=FAQ -faqURL=http://guitartex2.sourceforge.net/page7/page6/page6.html +faqURL=https://guitartex2.nikolai-rinas.de/docs/faq/ shortcutItem=Shortcuts -shortcutsURL=http://guitartex2.sourceforge.net/page7/page30/page30.html -consoleItem=Console +shortcutsURL=https://guitartex2.nikolai-rinas.de/docs/shortcuts/ +consoleItem=Konsole consoleTitle=Console consoleInitText=Debugging and testing console @@ -125,5 +128,5 @@ warnTitle=Warning! statusTitle=Status frameConstructor=GuitarTeX2 -appVersion=Version - 3.4.0 +appVersion=Version - 3.5.0 copyright=Nikolai Rinas diff --git a/src/GuitarTeX2strings_de.properties b/src/main/resources/GuitarTeX2strings_de.properties similarity index 88% rename from src/GuitarTeX2strings_de.properties rename to src/main/resources/GuitarTeX2strings_de.properties index 46a2a10..230fa79 100644 --- a/src/GuitarTeX2strings_de.properties +++ b/src/main/resources/GuitarTeX2strings_de.properties @@ -5,7 +5,8 @@ closeItem=Schlie\u00dfen saveItem=Speichern saveAsItem=Speichern unter... templateItem=Templates -simpleSong=Lied +simpleSong1=Lied1 +simpleSong2=Lied2 simpleBook=Liederbuch exitItem=Beenden @@ -28,10 +29,12 @@ tex2pdf=TeX2Pdf helpMenu=Hilfe aboutItem=\u00dcber GuitarTeX2 aboutTitle=\u00dcber GuitarTeX2 +docItem=Dokumentation +docURL=https://guitartex2.nikolai-rinas.de/docs/directives/ faqItem=FAQ -faqURL=http://guitartex2.sourceforge.net/page7/page6/page6.html +faqURL=https://guitartex2.nikolai-rinas.de/docs/faq/ shortcutItem=Shortcuts -shortcutsURL=http://guitartex2.sourceforge.net/page7/page30/page30.html +shortcutsURL=https://guitartex2.nikolai-rinas.de/docs/shortcuts/ consoleItem=Konsole consoleTitle=Konsole @@ -124,5 +127,5 @@ warnTitle=Warnung! statusTitle=Status frameConstructor=GuitarTeX2 -appVersion=Version - 3.4.0 +appVersion=Version - 3.5.0 copyright=Nikolai Rinas \ No newline at end of file diff --git a/src/main/resources/examples/griechischer_wein.gtx b/src/main/resources/examples/griechischer_wein.gtx new file mode 100644 index 0000000..c3d7368 --- /dev/null +++ b/src/main/resources/examples/griechischer_wein.gtx @@ -0,0 +1,39 @@ +{geometry:a4paper} +{geometry:margin=2.5cm} +{font_size:12} + +{color_chorus:0,0,0} +{language: german} + +{title: Griechischer Wein} + +{a:Vers 1:} +{bridge} + [Am]Es war schon dunkel, als ich durch Vorstadtstrassen [(Am]heimw[F)]"arts gin[C]g. + Da war ein Wirtshaus, aus dem das Licht noch auf den [(C]Gehs[F)]teig sch[G7]ien. + [E7]Ich hatte [Am]Zeit, und mir war [E7]kalt, drum trat ich [Am]ein. + \\ + [Am]Da sassen M"anner mit braunen Augen und mit [(Am]schwarz[F)]em Ha[C]ar. + Und aus der Jukebox erklang Musik, die fremd und [(C]s"ud[F)]lich wa[G7]r. + [E7]Als man mich [Am]sah, stand einer [E7]auf und lud mich [Am]ein. +{/bridge} + +{a:Refrain:} +{chorus} + [F]Griechischer Wein ist wie das Blut der Erde, + k[C]omm, schenk' dir ein, und wenn ich dann traurig werde, + li[G7]egt es daran, dass ich immer tr"aume von da[C]heim, du musst verz[C7]eih'n. + G[F]riechischer Wein und die altvertrauten Lieder, + s[C]chenk nochmal ein, denn ich f"uhl die Sehnsucht wieder, + in[G7] dieser Stadt werd'ich immer nur ein [E7]Fremder [Am]sein [E7]und a[Am]llein. +{/chorus} + +{a:Vers 2:} +{bridge} + Und dann er[Am]z"ahlten sie mir von gr"unen H"ugeln, M[(Am]eer [F)]und Wi[C]nd, + von alten H"ausern und jungen Frauen, die [(C]allei[F)]ne s[G7]ind, + [E7]und von dem K[Am]ind, das seinen V[E7]ater noch nie s[Am]ah. + Si[Am]e sagten sich immer wieder, irgendwann [(Am]geht [F)]es zur[C]"uck, + und das Ersparte gen"ugt zu Hause f"ur ein [(C]klein[F)]es Gl"u[G7]ck. + [E7]Und bald denkt ke[Am]iner mehr dar[E7]an, wie es hier [Am]war. +{/bridge} diff --git a/src/main/resources/examples/lazy_blues.gtx b/src/main/resources/examples/lazy_blues.gtx new file mode 100644 index 0000000..fd9a7f3 --- /dev/null +++ b/src/main/resources/examples/lazy_blues.gtx @@ -0,0 +1,22 @@ +{geometry:a4paper} +{geometry:margin=2.5cm} +{font_size:12} + +{color_chorus:0,0,0} + +{title: Lazy Blues} + +{define:C7 t x 3 2 3 1 x} +{define:F7 5 x 3 2 3 1 x} +{define:G7 7 x 3 2 3 1 x} + + +{a: [Zahlen = Fingerstellung im Bund x]} + + +{guitartab: [14.5ex;C7]&[2;3][2;3][3;2]&[4;3]&[5;1][3;2]&[4;3]&[5;1]|[2;3][2;3][3;2]&[4;3]&[5;1][3;2]&[4;3]&[5;1]|[2;3][2;3][3;2]&[4;3]&[5;1][3;2]&[4;3]&[5;1]|[1;3][1;3][2;1][2;2]|[2;3][2;3][3;2]&[4;3]&[5;1][3;2]&[4;3]&[5;1]|[2;3][2;3][3;2]&[4;3]&[5;1][3;2]&[4;3]&[5;1]} +{guitartab: [14.5ex;F7]&[2;8][2;8][3;7]&[4;8]&[5;6][3;7]&[4;8]&[5;6]|[2;8][2;8][3;7]&[4;8]&[5;6][3;7]&[4;8]&[5;6]|[2;8][2;8][3;7]&[4;8]&[5;6][3;7]&[4;8]&[5;6]|[1;8][1;8][2;6][2;7]|[2;8][2;8][3;7]&[4;8]&[5;6][3;7]&[4;8]&[5;6]|[2;8][2;8][3;7]&[4;8]&[5;6][3;7]&[4;8]&[5;6]} +{guitartab: [14.5ex;C7]&[2;3] _ [2;3] _ [3;2]&[4;3]&[5;1] _ [3;2]&[4;3]&[5;1] | [2;3] _ [2;3] _ [3;2]&[4;3]&[5;1] _ [3;2]&[4;3]&[5;1]|} +{guitartab: [14.5ex;G7]&[2;10] _ [2;10] _ [3;9]&[4;10]&[5;8] _ [3;9]&[4;10]&[5;8] | [2;10] _ [2;10] _ [3;9]&[4;10]&[5;8] _ [3;9]&[4;10]&[5;8] |} +{guitartab: [14.5ex;F7]&[2;8] _ [2;8] _ [3;7]&[4;8]&[5;6] _ [3;7]&[4;8]&[5;6] | [2;8] _ [2;8] _ [3;7]&[4;8]&[5;6] _ [3;7]&[4;8]&[5;6] |} +{guitartab: [14.5ex;C7]&[2;3][2;3][3;2]&[4;3]&[5;1][3;2]&[4;3]&[5;1]|[2;3][2;3][3;2]&[4;3]&[5;1][3;2]&[4;3]&[5;1]|[2;3][2;3][3;2]&[4;3]&[5;1][3;2]&[4;3]&[5;1]|[1;3][1;3][2;1][2;2]|[2;3][2;3][3;2]&[4;3]&[5;1][3;2]&[4;3]&[5;1]|[2;3][2;3][3;2]&[4;3]&[5;1][3;2]&[4;3]&[5;1]} diff --git a/src/main/resources/examples/my_first_book.gtb b/src/main/resources/examples/my_first_book.gtb new file mode 100644 index 0000000..7085b1f --- /dev/null +++ b/src/main/resources/examples/my_first_book.gtb @@ -0,0 +1,10 @@ +{document_class:book} + +{book_author:I am the author} +{book_title:This is my book} +{book_date:02/28/2007} + + +{include:/GuitarTeX2/examples/lazy_blues.gtx} + +{include:/GuitarTeX2/examples/griechischer_wein.gtx} diff --git a/src/guitartex2/images/dvipdf.png b/src/main/resources/images/dvipdf.png similarity index 100% rename from src/guitartex2/images/dvipdf.png rename to src/main/resources/images/dvipdf.png diff --git a/src/guitartex2/images/dvips.png b/src/main/resources/images/dvips.png similarity index 100% rename from src/guitartex2/images/dvips.png rename to src/main/resources/images/dvips.png diff --git a/src/guitartex2/images/filenew.png b/src/main/resources/images/filenew.png similarity index 100% rename from src/guitartex2/images/filenew.png rename to src/main/resources/images/filenew.png diff --git a/src/guitartex2/images/fileopen.png b/src/main/resources/images/fileopen.png similarity index 100% rename from src/guitartex2/images/fileopen.png rename to src/main/resources/images/fileopen.png diff --git a/src/guitartex2/images/filesave.png b/src/main/resources/images/filesave.png similarity index 100% rename from src/guitartex2/images/filesave.png rename to src/main/resources/images/filesave.png diff --git a/src/guitartex2/images/filesaveas.png b/src/main/resources/images/filesaveas.png similarity index 100% rename from src/guitartex2/images/filesaveas.png rename to src/main/resources/images/filesaveas.png diff --git a/src/guitartex2/images/gitarre1.jpg b/src/main/resources/images/gitarre1.jpg similarity index 100% rename from src/guitartex2/images/gitarre1.jpg rename to src/main/resources/images/gitarre1.jpg diff --git a/src/guitartex2/images/gtx2tex.png b/src/main/resources/images/gtx2tex.png similarity index 100% rename from src/guitartex2/images/gtx2tex.png rename to src/main/resources/images/gtx2tex.png diff --git a/src/guitartex2/images/icon-down2.png b/src/main/resources/images/icon-down2.png similarity index 100% rename from src/guitartex2/images/icon-down2.png rename to src/main/resources/images/icon-down2.png diff --git a/src/guitartex2/images/icon-up2.png b/src/main/resources/images/icon-up2.png similarity index 100% rename from src/guitartex2/images/icon-up2.png rename to src/main/resources/images/icon-up2.png diff --git a/src/guitartex2/images/icon1.jpg b/src/main/resources/images/icon1.jpg similarity index 100% rename from src/guitartex2/images/icon1.jpg rename to src/main/resources/images/icon1.jpg diff --git a/src/guitartex2/images/info.png b/src/main/resources/images/info.png similarity index 100% rename from src/guitartex2/images/info.png rename to src/main/resources/images/info.png diff --git a/src/guitartex2/images/latex.png b/src/main/resources/images/latex.png similarity index 100% rename from src/guitartex2/images/latex.png rename to src/main/resources/images/latex.png diff --git a/src/guitartex2/images/tex2pdf.png b/src/main/resources/images/tex2pdf.png similarity index 100% rename from src/guitartex2/images/tex2pdf.png rename to src/main/resources/images/tex2pdf.png