Texmaker and TeXstudioWriting a report using a .cls and a .sty file

Information and discussion about Texmaker, an integrated LaTeX environment for several platforms, and the related TeXstudio
Post Reply
dtnd
Posts: 2
Joined: Mon Dec 01, 2014 11:22 pm

Writing a report using a .cls and a .sty file

Post by dtnd »

Hi,

I am not very experienced in using Latex. I have the latex format of a technical report which includes only a .cls and a .sty file. I am wondering, how to write the whole report out of these files using Texmaker.

Is it possible to run a cls file in latex? Or, should I create a 'tex' file?

Thanks!

Recommended reading 2024:

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

NEW: TikZ book now 40% off at Amazon.com for a short time.

User avatar
Johannes_B
Site Moderator
Posts: 4182
Joined: Thu Nov 01, 2012 4:08 pm

Writing a report using a .cls and a .sty file

Post by Johannes_B »

Hi and welcome,

before starting with LaTeX you should do some basic reading. I suggest LaTeX for complete novices.

You have to include the class file and the package file in your preamble.

Code: Select all

\documentclass{article}
\usepackage{amsmath}
\begin{document}
test $a^2$
\end{document}
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.
dtnd
Posts: 2
Joined: Mon Dec 01, 2014 11:22 pm

Re: Writing a report using a .cls and a .sty file

Post by dtnd »

Thanks for your reply.
I tried to run the code you gave. I replaced the usepackage and documentclass parameters with the name of my sty and cls file respectively. But it is not running & getting the following message:

"Could not start the command,
pdflatex - synctex =1 -interaction = nonstopmode %.tex"

Please let me know how to resolve this issue.
User avatar
Johannes_B
Site Moderator
Posts: 4182
Joined: Thu Nov 01, 2012 4:08 pm

Writing a report using a .cls and a .sty file

Post by Johannes_B »

Do you have a TeX-distribution installed? -> TeX Live
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.
Post Reply