Skip to content

Commit

Permalink
Merge finished
Browse files Browse the repository at this point in the history
  • Loading branch information
DanielKotik committed May 15, 2017
2 parents 26fa01c + 2c73919 commit e356550
Show file tree
Hide file tree
Showing 8 changed files with 227 additions and 47 deletions.
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*.pdf -diff
4 changes: 2 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,15 @@ All notable changes to the file 'humanmutationTUD.bst' will be documented here.
### Added
- Some minor fixes.
- Description for function 'fix.language'.
- Descriptions to functions 'capitalize' and 'format.title'.
- Function 'format.in.pages' for printing language specific abbreviations for
'Page(s)' in entries 'incollection' and 'inbook'.
- Function 'fix.language' to check for missing or empty entry 'language'. If
so, the function sets 'language' to english as deflault.

### Changed
- Modify function 'format.title' to not to change any characters of strings given
in the title entry for language 'ngerman' add descriptions to functions
'capitalize' and 'format.title'.
in the title entry for language 'ngerman'.

- Modify 'select.language' function to enforce usage of Babel hyphenation patterns
for the title either as specified by the entry language or if missing using
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,5 +38,5 @@ Version __0.1__ (released 5 Mai 2017):
This work consists of the files in this repository.

**For commercial use of this work or a derived or compiled work (as defined in
the LPPL v1.3c), contact me before at [email protected]**
the LPPL v1.3c), contact me before at [email protected]**

5 changes: 0 additions & 5 deletions bibtex_script.sh

This file was deleted.

22 changes: 13 additions & 9 deletions example.bib
Original file line number Diff line number Diff line change
Expand Up @@ -109,25 +109,29 @@ @incollection{Felber1996
publisher = {Springer}
}

@misc{ZitiervorgabenCGC,
@webpage{ZitiervorgabenCGC,
author = {Bilz, Alexander},
year = 2013,
title = {Zitierrichtlinien f{\"u}r Dissertationen an der
Medizinischen Fakultät der TU Dresden},
language = {ngerman},
howpublished = {URL~alias: \url{https://goo.gl/DbLwTW}},
note = {Host: \url{https://tu-dresden.de/med/mf}, Aufruf am:
27.04.2017}
url = {},
shorturl = {https://goo.gl/DbLwTW},
host = {https://tu-dresden.de/med/mf},
lastchecked = {27.04.2017},
lastrevised = {}
}

@misc{humanmutationSchneider,
@webpage{humanmutationSchneider,
author = {Schneider, Thomas},
year = 1998,
title = {\hologo{BibTeX} `humanmutation' bibliography style},
howpublished = {URL: \url{https://schneider.ncifcrf.gov/latex.html}},
note = {Aufruf am: 05.05.2017}
year = 1998,
title = {\hologo{BibTeX} `humanmutation' bibliography style},
url = {https://schneider.ncifcrf.gov/latex.html},
lastchecked = {05.05.2017},
lastrevised = {27.05.2016}
}


@unpublished{Cronin2017,
author={Cronin, O. and Keohane, D. M. and Molloy, M. G. and
Shanahan, F.},
Expand Down
100 changes: 87 additions & 13 deletions humanmutationTUD-doc-german.tex
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

\usepackage[english,main=ngerman]{babel}
\usepackage{multibib}
\newcites{books,incoll,journals,websites}{Beispiel: Monographie,%
\newcites{books,incoll,journals,web}{Beispiel: Monographie,%
Beispiel: Sammelb\"ande,%
Beispiel: Zeitschriftenartikel,%
Beispiel: Webseiten}
Expand Down Expand Up @@ -49,10 +49,10 @@
%opening
\title{Anpassungen des Stils \emph{Human Mutation} an die
Richtlinien der Medizinischen Fakultät Carl Gustav Carus, TU Dresden}
\subtitle{v0.2 vom 11.~Mai 2017}
\subtitle{v0.3 vom 15.~Mai 2017}
\author{Daniel Kotik\\
\large\url{https://github.com/DanielKotik/BibTeX-Medicine-TU-Dresden}\\
\large\url{[email protected]}}
\large\url{[email protected]}}
\date{}

\begin{document}
Expand Down Expand Up @@ -87,9 +87,9 @@ \section{Allgemeine Hinweise}

Die Stildatei \verb|humanmutationTUD.bst| unterstützt folgende Literaturtypen:
\verb|article|, \verb|book|, \verb|booklet|, \verb|inbook|,
\verb|incollection|, \verb|inproceedings|(=\verb|conference|),
\verb|mastersthesis|, \verb|phdthesis|, \verb|proceedings|, \verb|unpublished|,
\verb|techreport|, \verb|manual|, \verb|misc|.
\verb|incollection|, \verb|inproceedings|(=\verb|conference|), \verb|manual|,
\verb|mastersthesis|, \verb|misc|, \verb|phdthesis|, \verb|proceedings|,
\verb|techreport|, \verb|unpublished|, \verb|webpage|.

%TODO: Angaben, welche Typen besonders durch den Stil beeinflusst werden (book,
%inpriceedings, webiste, unpublished). --> neuer Typ 'website'
Expand Down Expand Up @@ -286,7 +286,7 @@ \subsection{Zitieren von (unver\"offentlichten) Artikeln}
\begin{minipage}[t][9cm][c]{0.53\textwidth}
%\hrulefill
\begin{singlespace}
\begin{Verbatim}[frame=single,commandchars=\\\(\)]
\begin{Verbatim}[frame=single]
@unpublished{Cronin2017,
author = {Cronin, O. and Keohane, D. M. and Molloy, M. G.
and Shanahan, F.},
Expand Down Expand Up @@ -324,8 +324,80 @@ \subsection{Zitieren von (unver\"offentlichten) Artikeln}
\end{minipage}
}

%TODO:\subsection{Zitieren von Webseiten}
%TODO: Zitierung von zwei Webseiten: einmal mit short URL, einmal gewöhnlich.
\subsection{Zitieren von Webseiten}
Zum Zitieren von Webseiten wird durch die Bibliographiestildatei
der Literaturtyp \verb|webpage| zur Verfügung gestellt. Webseiten können
damit auf zweierlei Weise zitiert werden. Beide Varianten seien hier
beispielhaft an~\citeweb{humanmutationSchneider} sowie die diesem Dokument
zugrunde liegenden Zitiervorgaben
\citeweb{ZitiervorgabenCGC} erläutert. Beide Varianten unterscheiden sich
lediglich in der Angabe des~URL: Für äußerst lange bzw.\ unhandliche
URLs\footnote{Zum
Beispiel der originale URL von \cite{ZitiervorgabenCGC}: \url{
https://tu-dresden.de/med/mf/ressourcen/dateien/postgraduales/promotionen/zitier
richtinien_fuer_die_dissertation_formblatt9.0?lang=de}.} empfiehlt es sich
einen kurzen Alias (short URL)\footnote{Beispielhaft genannt seien hier die
Dienste \url{https://goo.gl/} und \url{https://bitly.com/}.} mittels
\verb|shorturl={...}| anzugeben. Verliert der Link später seine Gültigkeit oder
ändert sich die Adresse, wird durch die Angabe des Hostnames \verb|host={...}|
(und der ersten Teilpfade) zusätzlich kenntlich gemacht, wo die Datei
ursprünglich im WWW aufzufinden war. Dadurch kann auch später die Datei oder
Webseite, sofern noch vorhanden, möglicherweise wiedergefunden werden, selbst
wenn sich der ursprüngliche URL geändert hat. Für kurze URLs kann dieser direkt
dem Feld \verb|url={...}| übergeben werden.

Für eine korrekte Silbentrennung des Titels sollte bei einer deutschsprachigen
Webseite zudem zusätzlich
\verb|language={ngerman}| mit eingetragen werden. Dem Feld
\verb|lastrevised={...}|
kann optional das Datum der letzten Änderung der Webseite übergeben werden
(date of last revision). Das Datum des Webseitenaufrufs hingegen ist zwingend
erforderlich und muss als Wert dem Feld
\verb|lastchecked={...}| übergeben werden (falls nicht, wird eine
Warnung beim Kompilieren mit \hologo{BibTeX} ausgegeben).

\cprotect{\noindent\makebox[1.0\textwidth][c]}{%
\small
\begin{minipage}[t]{1.2\textwidth}
\begin{minipage}[t][9cm][c]{0.527\textwidth}
%\hrulefill
\begin{singlespace}
\begin{Verbatim}[frame=single,commandchars=&\(\)]
@webpage{ZitiervorgabenCGC,
author = {Bilz, Alexander},
year = 2013,
title = {Zitierrichtlinien f{\"u}r Dissertationen an
der Medizinischen Fakultät der TU Dresden},
language = {ngerman},
url = {},
(&color(red)shorturl = {https://goo.gl/DbLwTW},)
(&color(red)host = {https://tu-dresden.de/med/mf},)
(&color(red)lastchecked = {27.04.2017},)
(&color(red)lastrevised = {})
}
@webpage{humanmutationSchneider,
author = {Schneider, Thomas},
year = 1998,
title = {\hologo{BibTeX} `humanmutation' bibliography
style},
url = {https://schneider.ncifcrf.gov/latex.html},
(&color(red)lastchecked = {05.05.2017},)
(&color(red)lastrevised = {27.05.2016})
}
\end{Verbatim}
\end{singlespace}
%\hrulefill
\end{minipage}
\hfill
\begin{minipage}[t][9cm][c]{0.45\textwidth}
%\hrulefill
\bibliographyweb{example}
\bibliographystyleweb{humanmutationTUD}
%\hrulefill
\end{minipage}
\end{minipage}
}

\subsection{Fallstricke}
Hier zitieren wir den Artikel~\cite{teras2016_FALSCH} und noch einmal in
Expand Down Expand Up @@ -376,10 +448,12 @@ \section{To Do}
\item Auflage: Angabe nur ab 2.~Auflage aufwärts
\item korrekte Angabe der Auflage, d.h.\ "`2.~Aufl."', "`2.~erw. Aufl."', "`2nd
ed."'
\item Erstellen eines eigenen Eintrags für Webseiten (zum Beispiel
\verb|@website|), mit Feldern für \emph{URL} (alternativ \emph{short URL} und
\emph{hostname}) sowie Felder für \emph{Aufruf am}\footnote{date retrieved} und
\emph{Aktualisiert am}\footnote{date of last revision} (v0.3). \sout{Es gilt zu
\item \sout{Erstellen eines eigenen Eintrags für Webseiten (zum Beispiel}
\verb|@webpage|\sout{), mit Feldern für \emph{URL} (alternativ \emph{short URL}
und
\emph{hostname}) sowie Felder für \emph{Aufruf am}}\footnote{date
retrieved}\sout{ und
\emph{Aktualisiert am}}\footnote{date of last revision}\sout{ (v0.3). Es gilt zu
beachten,
dass die URL nicht im typewriter Font angegeben werden soll. Eventuell muss das
Paket hyperref bzw. url sinnvollerweise geladen werden.}
Expand Down
123 changes: 106 additions & 17 deletions humanmutationTUD.bst
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
% Please contact me at https://github.com/DanielKotik/BibTeX-Medicine-TU-Dresden
% if your find erros or ask for feature requests.
%
% This is version v0.2, released on May 11, 2017.
% This is version v0.3, released on May 15, 2017.


% ---------- original docstring from the bst file as output of the makebst utility
Expand Down Expand Up @@ -90,6 +90,10 @@ ENTRY
title
type
url
shorturl
host
lastchecked
lastrevised
volume
year
}
Expand Down Expand Up @@ -590,6 +594,77 @@ FUNCTION {format.note}
if$
}

FUNCTION {format.shorturl}
{ shorturl empty$
{ "" }
{ host empty$
{ lastchecked empty$
{
"there is shorturl but no host and no lastchecked in " cite$ * warning$
" " " \shorturlprefix\url{" * shorturl * "}" *
}
{ lastrevised empty$
{
"there is shorturl but no host in " cite$ * warning$
" " "~[{Aufruf am:} " * lastchecked * "]" *
" \shorturlprefix\url{" * shorturl * "}" *
}
{
"there is shorturl but no host in " cite$ * warning$
" " "~[{Aktualisiert am:} " * lastrevised * ", " * "{Aufruf am:} " * lastchecked * "]" *
" \shorturlprefix\url{" * shorturl * "}" *
}
if$
}
if$
}
{ lastchecked empty$
{
"there is shorturl and host but no lastchecked in " cite$ * warning$
" " "~[{Aufruf am:} " * "??.??.????" * "]" *
" \shorturlprefix\url{" * shorturl * "}" * ", " * " \hostprefix\url{" * host * "}" *
}
{ lastrevised empty$
{
" " "~[{Aufruf am:} " * lastchecked * "]" *
" \shorturlprefix\url{" * shorturl * "}" * ", " * " \hostprefix\url{" * host * "}" *
}
{
" " "~[{Aktualisiert am:} " * lastrevised * ", " * "{Aufruf am:} " * lastchecked * "]" *
" \shorturlprefix\url{" * shorturl * "}" * ", " * " \hostprefix\url{" * host * "}" *
}
if$
}
if$
}
if$
}
if$
}

FUNCTION {format.url}
{ url empty$
{ "" }
{ lastchecked empty$
{ "there is url but no lastchecked in " cite$ * warning$
" \urlprefix\url{" * url * "}" *
}
{ lastrevised empty$
{
"~[{Aufruf am:} " * lastchecked * "]" *
" \urlprefix\url{" * url * "}" *
}
{
"~[{Aktualisiert am:} " * lastrevised * ", " * "{Aufruf am:} " * lastchecked * "]" *
" \urlprefix\url{" * url * "}" *
}
if$
}
if$
}
if$
}

% This function converts all characters of the string given in the title entry to
% lower case all letters except the very first character. For language 'ngerman'
% however, it leaves all charactes as is (i.e. no need to provide extra curly
Expand Down Expand Up @@ -1203,7 +1278,33 @@ FUNCTION {manual}
format.note output
fin.entry
}

FUNCTION {webpage}
{ output.bibitem
format.authors output
author format.key output
format.date "year" output.check
date.block
format.title output
add.blank
url empty$
{format.shorturl "url and shorturl (need one of them)" output.check}
{format.url "" output}
if$
fin.entry
}
FUNCTION {misc}
{ output.bibitem
format.authors output
author format.key output
format.date "year" output.check
date.block
format.title output
new.block
howpublished "howpublished" bibinfo.check output
new.block
format.note output
fin.entry
}
FUNCTION {mastersthesis}
{ output.bibitem
format.authors "author" output.check
Expand All @@ -1220,20 +1321,6 @@ FUNCTION {mastersthesis}
format.note output
fin.entry
}

FUNCTION {misc}
{ output.bibitem
format.authors output
author format.key output
format.date "year" output.check
date.block
format.title output
new.block
howpublished "howpublished" bibinfo.check output
new.block
format.note output
fin.entry
}
FUNCTION {phdthesis}
{ output.bibitem
format.authors "author" output.check
Expand Down Expand Up @@ -1599,7 +1686,9 @@ FUNCTION {begin.bib}
write$ newline$
"\providecommand{\doiprefix}{DOI:~}"
write$ newline$
% "\providecommand{\doi}[1]{#1}"
"\providecommand{\shorturlprefix}{short URL:~}"
write$ newline$
"\providecommand{\hostprefix}{Host:~}"
"\providecommand{\doi}[1]{\href{http://dx.doi.org/\detokenize{#1}}{\detokenize{#1}}}"
write$ newline$
"\providecommand{\selectlanguage}[1]{\relax}"
Expand Down
17 changes: 17 additions & 0 deletions makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
filename=humanmutationTUD-doc-german

${filename}.pdf: ${filename}.tex example.bib
pdflatex ${filename}.tex
for file in *.aux ; do \
bibtex $$file ; \
done
pdflatex ${filename}.tex
pdflatex ${filename}.tex

# auxfiles:
# for file in *.aux ; do \
# bibtex $$file ; \
# done

clean:
rm -f *.aux *.blg *.bbl *.log *.out *.cpt

0 comments on commit e356550

Please sign in to comment.