Text Formatting ⇒ class .cls
class .cls
I have a problem with a .cls file. I need to write my master thesis with latex and I receive a Latex model using a file wissdoc.cls as documentclass{}. I do not understand how this class works.
When I write
\documentclass{wissdoc}
\begin{document}
salut
\end{document}
the compilation works but I can not open the .pdf.
I try to learn a bit about this kind of class (.cls). But I do not find lots of information. Maybe somebody could help me? I would be really grateful.
thanks a lot
I post the content of my wissdoc file, if it can help.
%% $Id: wissdoc.cls,v 1.1 2001/01/24 19:58:37 bless Exp bless $
\NeedsTeXFormat{LaTeX2e}[1995/12/01]% % Sorry, wir brauchen LaTeX2e!
\ProvidesClass{wissdoc}[2001/01/24 Roland Bless - Wissenschaftliches Dokument]
\LoadClass[a4paper,12pt,twoside,titlepage]{report}% % diese Klasse basiert auf ``book''
\RequirePackage{ngerman}[1998/07/08]% % (V2.5e) Neue Rechtschreibung!
\usepackage[T1]{fontenc}% % T1-encoded fonts: auch W�rter mit Umlauten trennen
\usepackage[latin1]{inputenc}% % Eingabe nach ISO 8859-1 (Latin1)
\usepackage[final]{graphicx}% % um Graphiken einzubinden
\usepackage{makeidx}% % wir wollen auch einen Index
\usepackage{vmargin}% % Seitenr�nder einstellen leichtgemacht
\usepackage{fancyhdr}% % definiere einfache Headings (mindestens V 1.99c notwendig)
\usepackage{array}% % fuer aufw�ndigere Tabellen
\usepackage{colortbl,calc,booktabs}% % farbige Tabellen (v. D. Carlisle)
\usepackage[outercaption]{sidecap}
\usepackage[bf]{caption2}
%\usepackage{pdflscape}
%\usepackage{floatflt}
%\usepackage{textcomp}% %f�r die Erzeugung von geraden griechischen Symbole
\usepackage{enumitem}
\usepackage{pifont}
\usepackage{dcolumn}
\usepackage{rotate}
\usepackage{amsmath,amsfonts,amssymb,amsxtra}% %Mathematik / Mathematics
\usepackage[ngerman]{varioref}% %spezielle Referenzierung / spezial referencing
\usepackage{epsfig}% %wird gebraucht f�r Latex - Kompilierung
\usepackage{wrapfig}% %Bild mit umgebendem Text
\usepackage{subfigure}
\usepackage{tabularx}% % automatische Spaltenbreite
\usepackage{supertabular}% % mehrseitige Tabellen
\usepackage{multirow}
\usepackage{nomencl}% % Sortiertes Verzechnis
\usepackage{cite}% % Sortieren von Literaurangaben
%% ---------------- end of usepackages -------------
\renewcommand{\captionfont}{\footnotesize \itshape}
\renewcommand{\figurename}{Abb.}
\renewcommand{\tablename}{Tab.}
\usepackage[T1]{url} % much like \verb allow line breaks for paths and URLs
\DeclareOption{draft}{\let\@draft\@empty}
\DeclareOption{relaxed}{\tolerance=1500 \emergencystretch=12pt}
\DeclareOption{pdf}{\@usepdfttrue}
%% Modifications
\let\@draft\@undefined %no draft
\newif\if@usepdf \@usepdffalse % not pdf ready
\ProcessOptions
\setcounter{secnumdepth}{2}% % Numerierung auch f�r \subsubsection
\setcounter{tocdepth}{2}% % nimm auch \subsubsections ins Inhaltsverz. auf
%% Schusterjungen und Hurenkinder verhindern.
%% Siehe deutsches TeX-FAQ (6.1.3)
\clubpenalty = 10000
\widowpenalty = 10000
\displaywidowpenalty = 10000
%% New Commands
\newcommand{\ifnotdraft}[1]{\ifx\@draft\@undefined #1 \fi}
\newcommand{\ifnotdraftelse}[2]{\ifx\@draft\@undefined #1 \else #2 \fi}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% PDF dependent stuff (inspired by Frank P�hlke)
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\ifx\pdftexversion\@undefined % kein PDFTeX aktiv
\newcommand\pdfinfo[1]{}
\else
\@usepdftrue % switch automatically to PDF mode
\fi
\if@usepdf
\usepackage{ae}% % erzeuge lesbare Schriften (mit cmps-Fonts)
\usepackage{color}% % f�r farbige Hyperlinks ben�tigt
\usepackage[raiselinks=true,%
bookmarks=true,%
bookmarksopenlevel=1,%
bookmarksopen=true,%
bookmarksnumbered=true,%
hyperindex=true,%
urlcolor=blue,%
plainpages=false,% % correct hyperlinks
pdfpagelabels=true,% % view TeX pagenumber in PDF reader
pdfborder={0 0 0.5}]{hyperref}% % erzeuge Hyperlinks z.B. f�r pdflatex
\usepackage{thumbpdf}
\usepackage{floatflt}
\pdfcompresslevel=9 % scheint zwar nichts zu bringen, aber was soll's
\fi
\newif\if@usehyperref
\ifx\href\@undefined % Wenn kein hyperref Paket geladen
\@usehyperreffalse % hyperref used
\else
\@usehyperreftrue % hyperref used
\fi
\if@usehyperref
\newcommand{\urltext}[1]{\href{#1}{\url{#1}}} % URL die im Text ausgegeben wird.
\else
% Einige Dummy-Makros als Ersatz f�r das hyperref-Paket:
\newcommand{\href}[2]{#2}
\newcommand{\hyperbaseurl}[1]{}
\newcommand{\hyperimage}[1]{[IMAGE: #1]}
\newcommand{\hyperdef}[2]{}
\newcommand{\hyperref}[4]{#4}
\newcommand{\hyperlink}[2]{#2}
\newcommand{\hypertarget}[2]{#2}
\let\pdfbookmark\@gobbletwo
\newcommand{\urltext}[1]{\url{#1}}
\fi
% Das float-Paket muss NACH hyperref eingebunden werden,
% sonst klappt die PDF-Ausgabe nicht:
%\usepackage{float} %z.B. \floatstyle{ruled}
%% Seitengr��e mit vmargin-Paket einstellen
\setpapersize{A4}
% \setmarginsrb{randlinks}{randoben}{randrechts}{randunten}
% {hoehekopf}{abstkopf}{hoehefuss}{abstfuss}
\setmarginsrb{3cm}{1.5cm}{3cm}{1cm}{6mm}{7mm}{5mm}{15mm}
%% Stil
\parindent 0cm% % Absatzanfang wird nicht einger�ckt
\parskip1.5ex plus0.5ex minus0.5ex% % Abstand zwischen zwei Abs�tzen
\newcommand{\chapterheadfont}{}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Headings
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\newcommand{\headfont}{\sffamily\footnotesize}
%nachfolgend neu eingef�gt
\pagestyle{fancyplain} %von Niko
\renewcommand{\chaptermark}[1]{\markboth{Kapitel \thechapter\ #1}{}}
%markboth f�r doppeltseitiges Layout
\renewcommand{\sectionmark}[1]{\markright{\thesection\ #1}{}}
\lhead[\fancyplain{}{\headfont\thepage}]
{\fancyplain{}{\headfont\nouppercase{\rightmark}}}
\rhead[\fancyplain{}{\headfont\nouppercase{\leftmark}}]
{\fancyplain{}{\headfont\thepage}}
\cfoot{}
\pagestyle{fancy}
\renewcommand{\headrulewidth}{0.5pt}% % head rule
\renewcommand{\footrulewidth}{0pt}% % no rule
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Stil der Ueberschriften
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\def\@maketitle{%
\newpage
\null
\vskip 2em%
\begin{center}%
\let \footnote \thanks
{\LARGE \@title \par}%
\vskip 1.5em%
{\large
\lineskip .5em%
\begin{tabular}[t]{c}%
\@author
\end{tabular}\par}%
\vskip 1em%
{\large \@date}%
\end{center}%
\par
\vskip 1.5em}
\def\@part[#1]#2{%
\ifnum \c@secnumdepth >-2\relax
\refstepcounter{part}%
\addcontentsline{toc}{part}{\thepart\hspace{1em}#1}%
\else
\addcontentsline{toc}{part}{#1}%
\fi
\markboth{}{}%
{\centering
\interlinepenalty \@M
\normalfont
\ifnum \c@secnumdepth >-2\relax
\huge\bfseries \partname\nobreakspace\thepart
\par
\vskip 20\p@
\fi
\Huge \bfseries #2\par}%
\@endpart}
\def\@spart#1{%
{\centering
\interlinepenalty \@M
\normalfont
\Huge \bfseries #1\par}%
\@endpart}
\def\@endpart{\vfil\newpage
\if@twoside
\if@openright
\null
\thispagestyle{empty}%
\newpage
\fi
\fi
\if@tempswa
\twocolumn
\fi}
\usepackage{color}
\definecolor{light}{gray}{0.5}
\def\@chapter[#1]#2{\ifnum \c@secnumdepth >\m@ne
\refstepcounter{chapter}%
\typeout{\thechapter.}%\@chapapp\space
\addcontentsline{toc}{chapter}%
{\protect\numberline{\thechapter}#1}%
\else
\addcontentsline{toc}{chapter}{#1}%
\fi
\chaptermark{#1}%
%\addtocontents{lof}{\protect\addvspace{10\p@}}%
% \addtocontents{lot}{\protect\addvspace{10\p@}}%
\if@twocolumn
\@topnewpage[\@makechapterhead{#2}]%
\else
\@makechapterhead{#2}%
\@afterheading
\fi}
\def\@makechapterhead#1{%
\vspace*{50\p@}%
{\parindent \z@ \raggedright \normalfont
\ifnum \c@secnumdepth >\m@ne
%\huge\bfseries \@chapapp\space \thechapter %kapitel n wird unterdr�ckt �nderung jl
%\par\nobreak
%\vskip 20\p@
%\if@mainmatter %geaendert am 30.08.04 kuo
\raggedleft {\color{light} \large \bf \normalfont \sffamily \@chapapp \space
\raisebox{-16mm}{\resizebox{!}{20mm}{\LARGE\thechapter}}}
\par \nobreak
\else
\vspace*{16mm}
\fi
\raggedright
\interlinepenalty\@M
\Huge \bf \normalfont \sffamily \space #1\par\nobreak %\thechapter \space format:1 kapitelname �nderung jl
\vskip 40\p@
}}
\def\@schapter#1{\if@twocolumn
\@topnewpage[\@makeschapterhead{#1}]%
\else
\@makeschapterhead{#1}%
\@afterheading
\fi}
\def\@makeschapterhead#1{%
\vspace*{50\p@}%
{\parindent \z@ \raggedright
\normalfont
\interlinepenalty\@M
\Huge \bf \normalfont \sffamily #1\par\nobreak
\vskip 40\p@
}}
\renewcommand\section{\@startsection{section}{1}{\z@}%
{-3.5ex \@plus -1ex \@minus -.2ex}%
{2.3ex \@plus.2ex}%
{\normalfont\Large\sffamily}}
\renewcommand\subsection{\@startsection{subsection}{2}{\z@}%
{-3.25ex\@plus -1ex \@minus -.2ex}%
{1.5ex \@plus .2ex}%
{\normalfont\large\sffamily}}
\renewcommand\subsubsection{\@startsection{subsubsection}{3}{\z@}%
{-3.25ex\@plus -1ex \@minus -.2ex}%
{1.5ex \@plus .2ex}%
{\normalfont\normalsize\sffamily}}
\renewcommand\paragraph{\@startsection{paragraph}{4}{\z@}%
{3.25ex \@plus1ex \@minus.2ex}%
{-1em}%
{\normalfont\normalsize\sffamily}}
\renewcommand\subparagraph{\@startsection{subparagraph}{5}{\parindent}%
{3.25ex \@plus1ex \@minus .2ex}%
{-1em}%
{\normalfont\normalsize\sffamily}}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Inhaltsverzeichnis (auch andere Fontfamilie)
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\let\oldtableofcontents\tableofcontents
\renewcommand{\tableofcontents}{{\pdfbookmark{\contentsname}{\contentsname}\chapterheadfont\oldtableofcontents}}
\let\@olddottedtocline\@dottedtocline
\renewcommand{\@dottedtocline}[5]{\@olddottedtocline{#1}{#2}{#3}{#4}{\chapterheadfont #5}}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% pagestyle fuer Titelseite:
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\def\titlehead#1{\def\@titlehead{#1}}
\def\titlefoot#1{\def\@titlefoot{#1}}
\def\@titlehead{}
\def\@titlefoot{}
\def\ps@title{%
\headheight 15mm
\footskip 0cm
\addtolength{\textheight}{-15mm}
\let\@mkboth\@gobbletwo%
\def\@oddhead{\vbox{\hbox to\textwidth{\@titlehead}
\vskip 1.5mm
\hbox to\textwidth{}}}
\def\@oddfoot{\vbox{\hbox to\textwidth{}
\hbox to\textwidth{\@titlefoot}}}
\let\@evenhead\@oddhead
\let\@evenfoot\@oddfoot
}
\renewenvironment{titlepage}
{%
\let\oldheadheight\headheight
\let\oldfootskip\footskip
\let\oldtextheight\textheight
\cleardoublepage
\if@twocolumn
\@restonecoltrue\onecolumn
\else
\@restonecolfalse\newpage
\fi
\thispagestyle{title}%
\setcounter{page}\@ne
}%
{\if@restonecol\twocolumn \else \newpage \fi
\if@twoside\else
\setcounter{page}\@ne
\fi
\let\headheight\oldheadheight
\let\textheight\oldtextheight
\let\footskip\oldfootskip
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Bibliography
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\renewcommand{\bibname}{Literaturreferenzen}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Stil Index-Seite
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\renewenvironment{theindex}{%
\renewcommand{\item}{\@idxitem}%
\if@twocolumn
\@restonecolfalse
\else
\@restonecoltrue
\fi
\columnseprule \z@
\columnsep 35\p@
\twocolumn[\@makeschapterhead{\indexname}]%
\@mkboth{\indexname}%
{\indexname}%
\thispagestyle{fancy}\parindent\z@
\parskip\z@ \@plus .3\p@\relax
\let\item\@idxitem
\raggedright}
\newtheorem{definition}{Definition}[chapter]
\newtheorem{satz}{Satz}[chapter]
%% **** END OF CLASS ****
NEW: TikZ book now 40% off at Amazon.com for a short time.
And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p
- Stefan Kottwitz
- Site Admin
- Posts: 10335
- Joined: Mon Mar 10, 2008 9:44 pm
Re: class .cls
welcome to the board!
It would be better if you post that class file as attachment instead of copying it into the body text of the question. At least I won't "download" it using copy&paste. Perhaps you don't know that you may post attachments to postings.
Btw. that class is old (of 2001) and uses obsolete packages (caption2, subfigure) and shows inconsistencies (it says that it would base on the book class but it loads the report class instead). I would neither use it nor waste time in improving or repairing it.
Stefan
class .cls
alfabre wrote:Hello,
I have a problem with a .cls file. I need to write my master thesis with latex and I receive a Latex model using a file wissdoc.cls as documentclass{}. I do not understand how this class works.
When I write
\documentclass{wissdoc}
\begin{document}
salut
\end{document}
the compilation works but I can not open the .pdf.
Could you be a bit more specific about what you mean when you write that the compilation works but you cannot open the .pdf? Is a .pdf file being created at all? (If not, I would not say that compilation works!) If so, how are you trying to open it, and what happens when you try?
Thorsten is right that it looks like that document class is outdated and it would be best not to use it. But perhaps you do not have a choice in the matter. The only problem I had trying to use it is that my installation of TeXlive did not come with the fltfloat package (--I assume it's outdated too--), but I manually installed it from here following the instructions there. I then processed your minimal "salut" document, and everything went as expected. I'm posting the output here.
If your university isn't forcing you to use that documentclass, however, I wouldn't. (And if they are, they should be able to help you with it.)
- Attachments
-
- scratch.pdf
- (15.87 KiB) Downloaded 292 times
- Stefan Kottwitz
- Site Admin
- Posts: 10335
- Joined: Mon Mar 10, 2008 9:44 pm
class .cls
The copy above shows:
Code: Select all
\ProvidesClass{wissdoc}[2001/01/24 Roland Bless - Wissenschaftliches Dokument]
Code: Select all
\ProvidesClass{wissdoc}[2007/01/18 Roland Bless - Wissenschaftliches Dokument]
Stefan
Re: class .cls
I use TexnicCenter and when I write a new latex document, I just have to click on "Build current file" and the I can read the output pdf by pressing the button "View output". But when I used wissdoc.cls, I receive during the first step 3 errors:
"I found no\citation commands
I found no\bibdata
I found no\bibstyle"
I do not really understand what the meaning of these 3 errors.
I try to understand how to install the fltfloat package and I read the "Readme" file but what do they mean by "run LaTeX on `floatflt.ins'"?
I'm sorry, I use Latex only for 2 or 3 weeks and I still have some difficulties.
Thanks a lot.