GeneralProblems by using a package: \usepackage

LaTeX specific issues not fitting into one of the other forums of this category.
Post Reply
Uspenskaya
Posts: 5
Joined: Fri Dec 25, 2009 1:11 am

Problems by using a package: \usepackage

Post by Uspenskaya »

Hi,
I am having a problem by using packages. I tried to use many packages in my file but each time I try to use it my code doesn't give me an output as pdf file. Maybe someone could help me.
This is the top part of my file,where I add this packages. I tried both with:
\usepackage[pdftex]{...} and without [pdftex]:\usepackage{...}

Thanks for any help.

\documentclass{article}
%\usepackage{setspace} %\onehalfspacing
\usepackage[pdftex]{graphicx}

\usepackage[pdftex]{scrhack}
\usepackage[pdftex]{caption}
\usepackage[pdftex]{listings}
%\vspace{1.6}

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

Uspenskaya
Posts: 5
Joined: Fri Dec 25, 2009 1:11 am

Re: Problems by using a package: \usepackage

Post by Uspenskaya »

I have to say that the using this package:

\usepackage[pdftex]{graphicx}

is working fine. This was automatically added to my file when I used a picture in my file.
User avatar
sommerfee
Posts: 503
Joined: Mon Apr 09, 2007 4:20 pm

Problems by using a package: \usepackage

Post by sommerfee »

Uspenskaya wrote:\usepackage[pdftex]{scrhack}
AFAIK this package only works with document classes from the KOMA-Script bundle, but "article" does not belong to them.

If you could give us a small but complete example file we would be able to examine this problem.

Axel
Uspenskaya
Posts: 5
Joined: Fri Dec 25, 2009 1:11 am

Re: Problems by using a package: \usepackage

Post by Uspenskaya »

hier is the example:


\documentclass{article}
%\usepackage{setspace} %\onehalfspacing
\usepackage[pdftex]{graphicx}

\usepackage[pdftex]{scrhack}
\usepackage[pdftex]{caption}
\usepackage[pdftex]{listings}
%\vspace{1.6}


\begin{document}\begin{center}


\textbf{{\Huge Test}}\\[1.5cm]

\end{center}


\newpage

\end{document}

What should I change so the packages:
\usepackage[pdftex]{listings}
\usepackage{setspace}

are gonna to work?
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Problems by using a package: \usepackage

Post by localghost »

The pdftex driver option nowadays is superfluous, especially to packages which don't support it. Packages which depend on the used compiler engine (like graphicx, hyperref or xcolor) detect the running engine on their own in current versions. Read the package manuals to learn more about the supported options.

Please use the code environment of the forum software to tag code as such.


Best regards
Thorsten
Post Reply