Graphics, Figures & TablesError in MikTex2.9 compiling a .sty file

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
minidiable
Posts: 30
Joined: Tue Nov 13, 2012 4:18 pm

Error in MikTex2.9 compiling a .sty file

Post by minidiable »

Hi to everyone,

I'm trying to write my thesis in LaTex and I'm quite new with this language.

I have a template to write the thesis but I'm not able to change it.

I open the file .sty in MikTex2.9 and I try to compile it but I receive the following error:

Code: Select all

This is pdfTeX, Version 3.1415926-2.4-1.40.13 (MiKTeX 2.9 64-bit)
entering extended mode
("C:/Users/Fabry/Dropbox/fabrizio tesi eth/Tesi/Bericht/ethasl.sty"
! Undefined control sequence.
l.7 \NeedsTeXFormat
                   {LaTeX2e}[1995/12/01]
? 
I don't understand what is it this error. Someone can help me?

Fab

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

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

localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Error in MikTex2.9 compiling a .sty file

Post by localghost »

It's in the nature of things that package files (*.sty) are not compilable. They are included by the \usepackage command into to LaTeX document (*.tex). Why did you try that at all?


Thorsten
minidiable
Posts: 30
Joined: Tue Nov 13, 2012 4:18 pm

Re: Error in MikTex2.9 compiling a .sty file

Post by minidiable »

Hi, thanks for the quick reply.

I want to change something in my template and I thought that to do it I had to open and change that file. Is it not correct? How can I change something in my template?

Thanks and sorry for the disturbance,
Fab.
User avatar
Stefan Kottwitz
Site Admin
Posts: 10335
Joined: Mon Mar 10, 2008 9:44 pm

Re: Error in MikTex2.9 compiling a .sty file

Post by Stefan Kottwitz »

Change it in the template and save it. :-)

This is ok if your template is a document template. Don't change a .cls file, don't change .sty files. If you would like to do this, rename those files and use them with a different name.

Perhaps tell us more specifically, what you plan to to do.

Stefan
LaTeX.org admin
minidiable
Posts: 30
Joined: Tue Nov 13, 2012 4:18 pm

Re: Error in MikTex2.9 compiling a .sty file

Post by minidiable »

How can I change a template.?

I attached a pdf, If you see at the end of the page there is a line and the name of the supervisors, but I need that the line is upper than now to fit with all the names of the supervisors.

How can I do that?

Fab
Attachments
Thesis.pdf
(159.04 KiB) Downloaded 434 times
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Error in MikTex2.9 compiling a .sty file

Post by localghost »

From the PDF output nobody can tell that. Attach the style file to your next post by upload to the forum server or give a link where to find it. A minimal code example that shows how you produce this page would also be helpful.
minidiable
Posts: 30
Joined: Tue Nov 13, 2012 4:18 pm

Error in MikTex2.9 compiling a .sty file

Post by minidiable »

Ok sorry. I'm starting with latex.!

I attached the .sty file!

I wrote this thing to have the pdf page that I attached previously:

Code: Select all

%=================================================================
% This template is based on IMRT Latex template by Eric A. Mueller
%================================================================= 

\documentclass[10pt,twoside,a4paper]{report}

 \usepackage[mt,hs,english]{ethasl}   % New styles and commands
                                      % Options: 	bt/mt: Bachelorthesis/Masterthesis
                                      %						fs/hs: Frühlingssemester/Herbstsemester
                                      %						german/english: Deutsch/English

% \includeonly{}                      % Quick formatting
% \usepackage[draft]{graphicx}        % Quick formatting

 \usepackage{a4}                      % Paper size
 \usepackage[latin1]{inputenc}        % Keybord settings
 \usepackage{amsmath}                 % Additional math functionality
 \usepackage{amssymb}                 % Additional math functionality
 \usepackage{graphicx}                % EPS figures
 \usepackage[dvips]{epsfig}           % EPS figures
 \usepackage{float}                   % Placement of floating objects
 \usepackage{fancyhdr}                % Headings
 \usepackage{rotating}
 \usepackage{multirow}
 \usepackage{url}
 \usepackage{colortbl}
 \usepackage{ifpdf}
%\usepackage{setspace}
%\usepackage{subfig}
 \usepackage{hyperref}
 \usepackage{color}
 \definecolor{black}{rgb}{0,0,0}
 \definecolor{white}{rgb}{1,1,1}
 \newcommand{\hlight}[1]{\colorbox{yellow}{#1}}
 \definecolor{darkred}{rgb}{0.5,0,0}
 \definecolor{darkgreen}{rgb}{0,0.5,0}
 \definecolor{darkblue}{rgb}{0,0,0.5}

 \hypersetup{colorlinks
	,linkcolor=black
	,filecolor=black
	,urlcolor=black
	,citecolor=black
 }
\usepackage{caption}

 \ifpdf
	\usepackage[update]{epstopdf}
 \else
 \fi

% \usepackage{german}                  % German language
% \usepackage{ae}                      % German specials

%\ifx\pdfoutput\defined
     \usepackage{hyperref}% generates colored links
                          % in pdf file
     \hypersetup{
     		bookmarks = true,
     		colorlinks = true,       % false: boxed links; true: colored links
    		linkcolor = black,          % color of internal links
    		citecolor = green,        % color of links to bibliography
    		filecolor = magenta,      % color of file links
    		urlcolor = cyan           % color of external links
    	}
%\usepackage{subcaption}
% \usepackage[colorlinks,hyperindex]{hyperref}                                              
% \usepackage[pdftex]{graphicx}
% \DeclareGraphicsExtensions{.png, .jpg, .pdf}
% \graphicspath{{pics/}}
%\else
%     \usepackage[dvips]{graphicx}
%     \DeclareGraphicsExtensions{.eps}
%     \graphicspath{{pictures/}}
%\fi

%---------------------------------------------------------------------------

 \setlength{\parindent}{0em}                   % Disable parindent
 \rhead[\thepage]{\nouppercase{\rightmark}}    % Special headings
 \lhead[\nouppercase{\leftmark}]{\thepage}     % Special headings
 \cfoot{}                                      % Special headings

%---------------------------------------------------------------------------

 \title{Modeling the effect of wind on a Swarm of Quadrotors}
 %\subtitle{bla bla bla}

 
 \studentA{Fabrizio Schiano}

\supervisionA{Javier Alonso Mora \newline Konrad Rudin \newline Paul Beardsley}
\supervisionB{Bruno Siciliano}
\supervisionC{Roland Siegwart}
 
%===========================================================================
\begin{document}

%---------------------------------------------------------------------------
% Title page

 \maketitle
 \pagestyle{plain}
 \pagenumbering{roman}

%---------------------------------------------------------------------------
% Preamble

 \include{preamble}

 \pagestyle{headings}                 % Default headings
 \pagestyle{fancy}                   % Special headings
 \pagenumbering{arabic}

%---------------------------------------------------------------------------
% Chapters

 \include{introduction}
 \include{chapter}
% \include{}
% \cleardoublepage
% ...
%
%---------------------------------------------------------------------------
% Appendix

 \appendix
 \include{appendix}
%
%---------------------------------------------------------------------------
% Literature

% \cleardoublepage
 \bibliographystyle{unsrt}
 \bibliography{bib/references}
% \cleardoublepage

% \include{bibliography}

%---------------------------------------------------------------------------

\end{document}
%===========================================================================
Attachments
ethasl.sty
(4.11 KiB) Downloaded 372 times
Post Reply