von CarstenOS » Di 16. Mai 2017, 12:57
Hallo GoLaTeX-Cummunity,
ich bin noch komplett frisch hier und frische mein LaTeX gerade erst wieder auf und hoffe, dass ich mich im richtigen Thema eingeordnet habe.
Ich schreibe derzeit meine Bachelorarbeit und habe von unserem Institut eine Latexvorlage bekommen, die mit einer eigenen Klasse arbeitet. Soweit waren die Anpassungen von mir erfolgreich, nun bin ich aber leider bei dem Punkt
Babel auf einen Fehler aufgelaufen, den ich einfach nicht lösen kann.
Bisher wir in dem Dokument mit dem Paket
ngerman gearbeitet, was in der Klasse aufgerufen wird:
Nun wollte ich das ganze auf
Babel umstellen, mit dem entfernten Ziel das Literaturverzeichnis mittels Biber und BibLaTeX zu realisieren.
Das Problem ist, wenn ich das Paket
ngerman auskommentiere und dafür
Babel einbinden möchte, erhalte ich folgende Fehlermeldung:
! LaTeX Error: \prefacename undefined.
Ich habe versucht, das Dokument auf den nötigsten Teil zukürzen, um ein Minimalbeispiel zur Verfügung zu stellen, ich hoffe es hat geklappt, falls noch zu viel unnötiger Inhalt in der Klasse steht, bitte ich dies zu entschuldigen. Ich hatte teilweise meine Schwierigkeiten durch die Vorlage durchzusteigen.
% pdf durch Ausgabeformat ersetzen: dvi, ps oder pdf.
\documentclass[german,pdf]{unitext}
\begin{document}
%%% Titelteil
\vorwort %%% optional, in der Datei vorwort.tex
%%% Der Textteil steht sinnvollerweise in mehreren Dateien.
\starttext %%% obligatorisch
Test, hier stehe ich!
\end{document}
Die Vorlagen-Klasse:
\NeedsTeXFormat{LaTeX2e}
\ProvidesClass{unitext}[2011/08/01 v1.9 unitext]
\newcommand{\@subjekt}{}
\newcommand{\@institut}{}
\newcommand{\@bib}{plain}
\newcommand{\@din}{din}
\newcommand{\@bibstyle}{}
\newcommand{\@sprache}{}
\newcommand{\@logo}{\includegraphics[scale=0.11]{tu-logo}}
\DeclareOption{abbrv}{\renewcommand{\@bib}{abbrv}}
\DeclareOption{alpha}{\renewcommand{\@bib}{alpha}}
\DeclareOption{plain}{\renewcommand{\@bib}{plain}}
\DeclareOption{unsrt}{\renewcommand{\@bib}{unsrt}}
\DeclareOption{english}{%
\AtEndOfClass{%
\PassOptionsToPackage{english}{babel}
% \RequirePackage[left]{eurosym}
}
\AtBeginDocument{%
\renewcommand{\@bibstyle}{\@bib}
\selectlanguage{USenglish}
}
}
\DeclareOption{german}{%
\AtEndOfClass{%
\PassOptionsToPackage{ngerman}{babel}
% \RequirePackage[right]{eurosym}
}
\AtBeginDocument{%
\renewcommand{\@bibstyle}{\@bib\@din}
}
}
\DeclareOption{pdf}{%
\AtEndOfClass{%
\RequirePackage[pdftex]{color}
\RequirePackage[pdftex]{graphicx}
\RequirePackage[pdftex,pagebackref,plainpages=false,pdfpagelabels,bookmarksnumbered,
colorlinks,urlcolor=black,linkcolor=black,citecolor=black]{hyperref}
\pdfstringdefDisableCommands{\let\and~}
}
}
\ExecuteOptions{inf,plain}
\ProcessOptions\relax
\LoadClass[a4paper,12pt,twoside,DIV=12,BCOR=08mm]{scrreprt}
\KOMAoptions{abstract=on,cleardoublepage=empty,numbers=noenddot,
headsepline=false,headings=normal,listof=totoc,index=totoc,bibliography=totoc}
% \setkomafont{pagehead}{\sffamily\bfseries}
\RequirePackage[utf8]{inputenc}
\RequirePackage[T1]{fontenc}
\RequirePackage{textcomp}
\RequirePackage{lmodern}
\RequirePackage{amssymb}
\RequirePackage{amsmath}
\RequirePackage{babel}
%\RequirePackage{ngerman}
\RequirePackage{makeidx}
\RequirePackage{multicol}
\RequirePackage{ifthen}
\RequirePackage{xspace}
\RequirePackage[thinspace,thinqspace,squaren,textstyle]{SIunits}
\newcommand{\@uni}{{\sffamily\bfseries%
\makebox[\textwidth]{TECHNISCHE UNIVERSIT\"AT CAROLO-WILHELMINA ZU BRAUNSCHWEIG}}}
\newcommand{\@nummer}{}
\newcommand{\nummer}[1]{\renewcommand{\@nummer}{~#1}}
\renewcommand*{\subject@font}{\normalfont\normalcolor\mdseries\Large}
\subject{{\sffamily\@subjekt\@nummer}}
\newcommand\titelblatt{{\sffamily\maketitle}}
\newcommand{\@keywords}{}
\newcommand{\keywords}[1]{\renewcommand{\@keywords}{#1}}
\publishers{%
\enlargethispage{10mm}
\vskip08mm\@logo\par
{\sffamily\normalsize\vskip15mm\@institut\par\@dozent\par\vskip08mm\@betreuer}
}
\renewcommand{\prefacename}{Vorwort}
% \AtBeginDocument{\renewcommand{\prefacename}{Foreword}}
\newcommand{\vorwort}{%
\cleardoublepage
\chapter*{\prefacename}
\pdfbookmark[0]{\prefacename}{prefacename}
\markboth{\prefacename}{\prefacename}
\InputIfFileExists{Inhalt/vorwort}{}{}
}
\let\tableofcontents\my@toc
\newcommand{\starttext}{%
\cleardoublepage
\pagenumbering{arabic}
}
\bibliographystyle{\@bibstyle}
\renewcommand{\bibname}{Literatur}
\renewcommand{\theenumi}{\arabic{enumi}}
\renewcommand{\theenumii}{\alph{enumii}}
\renewcommand{\labelenumi}{\theenumi.}
\renewcommand{\labelenumii}{\theenumii)}
\renewcommand{\labelitemi}{\textbullet}
\renewcommand{\labelitemii}{\textopenbullet}
\DeclareRobustCommand{\xdot}{\@ifnextchar.{}{.\xspace}}
\pagestyle{headings}
\pagenumbering{roman}
\InputIfFileExists{unitext.cfg}{}{}
\setlength{\overfullrule}{4pt}
\raggedbottom
\AtBeginDocument{%
\let\datum\@date
\hypersetup{%
pdftitle={\@title},
pdfauthor={\@author},
pdfsubject={\@subject},
pdfkeywords={\@keywords},
pdfcreator={\LaTeX{} with local class \dq{}unitext\dq{}
(based on \dq{}scrreprt\dq) and package \dq{}hyperref\dq},
}
}
\endinput
- Dateianhänge
-
- Minimalbeispiel.rar
- (2.17 KiB) 232-mal heruntergeladen
Hallo GoLaTeX-Cummunity,
ich bin noch komplett frisch hier und frische mein LaTeX gerade erst wieder auf und hoffe, dass ich mich im richtigen Thema eingeordnet habe.
Ich schreibe derzeit meine Bachelorarbeit und habe von unserem Institut eine Latexvorlage bekommen, die mit einer eigenen Klasse arbeitet. Soweit waren die Anpassungen von mir erfolgreich, nun bin ich aber leider bei dem Punkt [b]Babel[/b] auf einen Fehler aufgelaufen, den ich einfach nicht lösen kann.
Bisher wir in dem Dokument mit dem Paket [b]ngerman[/b] gearbeitet, was in der Klasse aufgerufen wird:
[code]\RequirePackage{ngerman}[/code]
Nun wollte ich das ganze auf [b]Babel[/b] umstellen, mit dem entfernten Ziel das Literaturverzeichnis mittels Biber und BibLaTeX zu realisieren.
Das Problem ist, wenn ich das Paket [b]ngerman[/b] auskommentiere und dafür [b]Babel[/b] einbinden möchte, erhalte ich folgende Fehlermeldung:
[color=red]! LaTeX Error: \prefacename undefined.[/color]
Ich habe versucht, das Dokument auf den nötigsten Teil zukürzen, um ein Minimalbeispiel zur Verfügung zu stellen, ich hoffe es hat geklappt, falls noch zu viel unnötiger Inhalt in der Klasse steht, bitte ich dies zu entschuldigen. Ich hatte teilweise meine Schwierigkeiten durch die Vorlage durchzusteigen. :oops:
[code]% pdf durch Ausgabeformat ersetzen: dvi, ps oder pdf.
\documentclass[german,pdf]{unitext}
\begin{document}
%%% Titelteil
\vorwort %%% optional, in der Datei vorwort.tex
%%% Der Textteil steht sinnvollerweise in mehreren Dateien.
\starttext %%% obligatorisch
Test, hier stehe ich!
\end{document}
[/code]
Die Vorlagen-Klasse:
[code]
\NeedsTeXFormat{LaTeX2e}
\ProvidesClass{unitext}[2011/08/01 v1.9 unitext]
\newcommand{\@subjekt}{}
\newcommand{\@institut}{}
\newcommand{\@bib}{plain}
\newcommand{\@din}{din}
\newcommand{\@bibstyle}{}
\newcommand{\@sprache}{}
\newcommand{\@logo}{\includegraphics[scale=0.11]{tu-logo}}
\DeclareOption{abbrv}{\renewcommand{\@bib}{abbrv}}
\DeclareOption{alpha}{\renewcommand{\@bib}{alpha}}
\DeclareOption{plain}{\renewcommand{\@bib}{plain}}
\DeclareOption{unsrt}{\renewcommand{\@bib}{unsrt}}
\DeclareOption{english}{%
\AtEndOfClass{%
\PassOptionsToPackage{english}{babel}
% \RequirePackage[left]{eurosym}
}
\AtBeginDocument{%
\renewcommand{\@bibstyle}{\@bib}
\selectlanguage{USenglish}
}
}
\DeclareOption{german}{%
\AtEndOfClass{%
\PassOptionsToPackage{ngerman}{babel}
% \RequirePackage[right]{eurosym}
}
\AtBeginDocument{%
\renewcommand{\@bibstyle}{\@bib\@din}
}
}
\DeclareOption{pdf}{%
\AtEndOfClass{%
\RequirePackage[pdftex]{color}
\RequirePackage[pdftex]{graphicx}
\RequirePackage[pdftex,pagebackref,plainpages=false,pdfpagelabels,bookmarksnumbered,
colorlinks,urlcolor=black,linkcolor=black,citecolor=black]{hyperref}
\pdfstringdefDisableCommands{\let\and~}
}
}
\ExecuteOptions{inf,plain}
\ProcessOptions\relax
\LoadClass[a4paper,12pt,twoside,DIV=12,BCOR=08mm]{scrreprt}
\KOMAoptions{abstract=on,cleardoublepage=empty,numbers=noenddot,
headsepline=false,headings=normal,listof=totoc,index=totoc,bibliography=totoc}
% \setkomafont{pagehead}{\sffamily\bfseries}
\RequirePackage[utf8]{inputenc}
\RequirePackage[T1]{fontenc}
\RequirePackage{textcomp}
\RequirePackage{lmodern}
\RequirePackage{amssymb}
\RequirePackage{amsmath}
\RequirePackage{babel}
%\RequirePackage{ngerman}
\RequirePackage{makeidx}
\RequirePackage{multicol}
\RequirePackage{ifthen}
\RequirePackage{xspace}
\RequirePackage[thinspace,thinqspace,squaren,textstyle]{SIunits}
\newcommand{\@uni}{{\sffamily\bfseries%
\makebox[\textwidth]{TECHNISCHE UNIVERSIT\"AT CAROLO-WILHELMINA ZU BRAUNSCHWEIG}}}
\newcommand{\@nummer}{}
\newcommand{\nummer}[1]{\renewcommand{\@nummer}{~#1}}
\renewcommand*{\subject@font}{\normalfont\normalcolor\mdseries\Large}
\subject{{\sffamily\@subjekt\@nummer}}
\newcommand\titelblatt{{\sffamily\maketitle}}
\newcommand{\@keywords}{}
\newcommand{\keywords}[1]{\renewcommand{\@keywords}{#1}}
\publishers{%
\enlargethispage{10mm}
\vskip08mm\@logo\par
{\sffamily\normalsize\vskip15mm\@institut\par\@dozent\par\vskip08mm\@betreuer}
}
\renewcommand{\prefacename}{Vorwort}
% \AtBeginDocument{\renewcommand{\prefacename}{Foreword}}
\newcommand{\vorwort}{%
\cleardoublepage
\chapter*{\prefacename}
\pdfbookmark[0]{\prefacename}{prefacename}
\markboth{\prefacename}{\prefacename}
\InputIfFileExists{Inhalt/vorwort}{}{}
}
\let\tableofcontents\my@toc
\newcommand{\starttext}{%
\cleardoublepage
\pagenumbering{arabic}
}
\bibliographystyle{\@bibstyle}
\renewcommand{\bibname}{Literatur}
\renewcommand{\theenumi}{\arabic{enumi}}
\renewcommand{\theenumii}{\alph{enumii}}
\renewcommand{\labelenumi}{\theenumi.}
\renewcommand{\labelenumii}{\theenumii)}
\renewcommand{\labelitemi}{\textbullet}
\renewcommand{\labelitemii}{\textopenbullet}
\DeclareRobustCommand{\xdot}{\@ifnextchar.{}{.\xspace}}
\pagestyle{headings}
\pagenumbering{roman}
\InputIfFileExists{unitext.cfg}{}{}
\setlength{\overfullrule}{4pt}
\raggedbottom
\AtBeginDocument{%
\let\datum\@date
\hypersetup{%
pdftitle={\@title},
pdfauthor={\@author},
pdfsubject={\@subject},
pdfkeywords={\@keywords},
pdfcreator={\LaTeX{} with local class \dq{}unitext\dq{}
(based on \dq{}scrreprt\dq) and package \dq{}hyperref\dq},
}
}
\endinput
[/code]