Mysterious “Two documentclass or documentstyle commands.”documentclasstikz-qtree Error Two documentclass or documentstyle commandsEnumerate and itemize undefined + captions not workingdocumentclass not being recognizedMultiple mysterious compilation errorsMysterious Undefined control sequence errorsUndefined control sequence in documentclass?Why doesn't “/documentclassarticle” work (forward slash vs. backslash)documentclasstikz-qtree Error Two documentclass or documentstyle commandsproposal documentclass problemBeginning commandsMysterious tufte-book error
How to explain what's wrong with this application of the chain rule?
What is Cash Advance APR?
Is there a RAID 0 Equivalent for RAM?
What do you call a word that can be spelled forward or backward forming two different words
What (the heck) is a Super Worm Equinox Moon?
How does electrical safety system work on ISS?
Why the "ls" command is showing the permissions of files in a FAT32 partition?
PTIJ: Why is Haman obsessed with Bose?
Can I cause damage to electrical appliances by unplugging them when they are turned on?
C++ copy constructor called at return
Has the laser at Magurele, Romania reached a tenth of the Sun's power?
What is the difference between lands and mana?
Is there a nicer/politer/more positive alternative for "negates"?
Confused about Cramer-Rao lower bound and CLT
What is going on with gets(stdin) on the site coderbyte?
Is this toilet slogan correct usage of the English language?
Does Doodling or Improvising on the Piano Have Any Benefits?
In a multiple cat home, how many litter boxes should you have?
Does the reader need to like the PoV character?
Multiplicative persistence
Why does Carol not get rid of the Kree symbol on her suit when she changes its colours?
What are some good ways to treat frozen vegetables such that they behave like fresh vegetables when stir frying them?
Circuit Analysis: Obtaining Close Loop OP - AMP Transfer function
Is a Java collection guaranteed to be in a valid, usable state after a ConcurrentModificationException?
Mysterious “Two documentclass or documentstyle commands.”
documentclasstikz-qtree Error Two documentclass or documentstyle commandsEnumerate and itemize undefined + captions not workingdocumentclass not being recognizedMultiple mysterious compilation errorsMysterious Undefined control sequence errorsUndefined control sequence in documentclass?Why doesn't “/documentclassarticle” work (forward slash vs. backslash)documentclasstikz-qtree Error Two documentclass or documentstyle commandsproposal documentclass problemBeginning commandsMysterious tufte-book error
The LaTeX code
documentclass[12pt,a4paper]article
usepackageamsmath
usepackageamsfonts
usepackagepstricks
begindocument
zzz
enddocument
causes in latex and pdflatex the mysterious error "Two documentclass or documentstyle commands." Why??? Not actually two documentclass like in the (original) question documentclasstikz-qtree Error Two documentclass or documentstyle commands.
Probably irrelevant, but I'm using texlive (2018 version) in a Debian system.
The .log as asked by moewe: https://pastebin.com/BGcHs3Rz.
Answering other comment: the filename is psttest.tex.
errors
New contributor
Martín-Blas Pérez Pinilla is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
|
show 6 more comments
The LaTeX code
documentclass[12pt,a4paper]article
usepackageamsmath
usepackageamsfonts
usepackagepstricks
begindocument
zzz
enddocument
causes in latex and pdflatex the mysterious error "Two documentclass or documentstyle commands." Why??? Not actually two documentclass like in the (original) question documentclasstikz-qtree Error Two documentclass or documentstyle commands.
Probably irrelevant, but I'm using texlive (2018 version) in a Debian system.
The .log as asked by moewe: https://pastebin.com/BGcHs3Rz.
Answering other comment: the filename is psttest.tex.
errors
New contributor
Martín-Blas Pérez Pinilla is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
Welcome to TeX.SX! For me the code works fine (as it should)... I'm also using TeXLive 2018, so I guess there is something else causing that problem. The error message should show in which line the problem happened. Can you show us the log, please?
– Phelype Oleinik
8 hours ago
Can you share the full.logfile of the LaTeX run on that file? If it is too long to be shared here, you can upload it to a text-sharing website like pastebin.com
– moewe
8 hours ago
@PhelypeOleinik, then the concrete compiler can be relevant... Thanks.
– Martín-Blas Pérez Pinilla
8 hours ago
3
Do NOT call your document article.tex
– Johannes_B
7 hours ago
5
As Johannes guessed: You have a file calledpstricks.texin the same folder as this file. Butpstricksis the name of a package you load. TeX picks up the wrong file and chaos ensues. Renamepstricks.texand you should be good.
– moewe
7 hours ago
|
show 6 more comments
The LaTeX code
documentclass[12pt,a4paper]article
usepackageamsmath
usepackageamsfonts
usepackagepstricks
begindocument
zzz
enddocument
causes in latex and pdflatex the mysterious error "Two documentclass or documentstyle commands." Why??? Not actually two documentclass like in the (original) question documentclasstikz-qtree Error Two documentclass or documentstyle commands.
Probably irrelevant, but I'm using texlive (2018 version) in a Debian system.
The .log as asked by moewe: https://pastebin.com/BGcHs3Rz.
Answering other comment: the filename is psttest.tex.
errors
New contributor
Martín-Blas Pérez Pinilla is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
The LaTeX code
documentclass[12pt,a4paper]article
usepackageamsmath
usepackageamsfonts
usepackagepstricks
begindocument
zzz
enddocument
causes in latex and pdflatex the mysterious error "Two documentclass or documentstyle commands." Why??? Not actually two documentclass like in the (original) question documentclasstikz-qtree Error Two documentclass or documentstyle commands.
Probably irrelevant, but I'm using texlive (2018 version) in a Debian system.
The .log as asked by moewe: https://pastebin.com/BGcHs3Rz.
Answering other comment: the filename is psttest.tex.
errors
errors
New contributor
Martín-Blas Pérez Pinilla is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
New contributor
Martín-Blas Pérez Pinilla is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
edited 7 hours ago
Martín-Blas Pérez Pinilla
New contributor
Martín-Blas Pérez Pinilla is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
asked 8 hours ago
Martín-Blas Pérez PinillaMartín-Blas Pérez Pinilla
1184
1184
New contributor
Martín-Blas Pérez Pinilla is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
New contributor
Martín-Blas Pérez Pinilla is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
Martín-Blas Pérez Pinilla is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
Welcome to TeX.SX! For me the code works fine (as it should)... I'm also using TeXLive 2018, so I guess there is something else causing that problem. The error message should show in which line the problem happened. Can you show us the log, please?
– Phelype Oleinik
8 hours ago
Can you share the full.logfile of the LaTeX run on that file? If it is too long to be shared here, you can upload it to a text-sharing website like pastebin.com
– moewe
8 hours ago
@PhelypeOleinik, then the concrete compiler can be relevant... Thanks.
– Martín-Blas Pérez Pinilla
8 hours ago
3
Do NOT call your document article.tex
– Johannes_B
7 hours ago
5
As Johannes guessed: You have a file calledpstricks.texin the same folder as this file. Butpstricksis the name of a package you load. TeX picks up the wrong file and chaos ensues. Renamepstricks.texand you should be good.
– moewe
7 hours ago
|
show 6 more comments
Welcome to TeX.SX! For me the code works fine (as it should)... I'm also using TeXLive 2018, so I guess there is something else causing that problem. The error message should show in which line the problem happened. Can you show us the log, please?
– Phelype Oleinik
8 hours ago
Can you share the full.logfile of the LaTeX run on that file? If it is too long to be shared here, you can upload it to a text-sharing website like pastebin.com
– moewe
8 hours ago
@PhelypeOleinik, then the concrete compiler can be relevant... Thanks.
– Martín-Blas Pérez Pinilla
8 hours ago
3
Do NOT call your document article.tex
– Johannes_B
7 hours ago
5
As Johannes guessed: You have a file calledpstricks.texin the same folder as this file. Butpstricksis the name of a package you load. TeX picks up the wrong file and chaos ensues. Renamepstricks.texand you should be good.
– moewe
7 hours ago
Welcome to TeX.SX! For me the code works fine (as it should)... I'm also using TeXLive 2018, so I guess there is something else causing that problem. The error message should show in which line the problem happened. Can you show us the log, please?
– Phelype Oleinik
8 hours ago
Welcome to TeX.SX! For me the code works fine (as it should)... I'm also using TeXLive 2018, so I guess there is something else causing that problem. The error message should show in which line the problem happened. Can you show us the log, please?
– Phelype Oleinik
8 hours ago
Can you share the full
.log file of the LaTeX run on that file? If it is too long to be shared here, you can upload it to a text-sharing website like pastebin.com– moewe
8 hours ago
Can you share the full
.log file of the LaTeX run on that file? If it is too long to be shared here, you can upload it to a text-sharing website like pastebin.com– moewe
8 hours ago
@PhelypeOleinik, then the concrete compiler can be relevant... Thanks.
– Martín-Blas Pérez Pinilla
8 hours ago
@PhelypeOleinik, then the concrete compiler can be relevant... Thanks.
– Martín-Blas Pérez Pinilla
8 hours ago
3
3
Do NOT call your document article.tex
– Johannes_B
7 hours ago
Do NOT call your document article.tex
– Johannes_B
7 hours ago
5
5
As Johannes guessed: You have a file called
pstricks.tex in the same folder as this file. But pstricks is the name of a package you load. TeX picks up the wrong file and chaos ensues. Rename pstricks.tex and you should be good.– moewe
7 hours ago
As Johannes guessed: You have a file called
pstricks.tex in the same folder as this file. But pstricks is the name of a package you load. TeX picks up the wrong file and chaos ensues. Rename pstricks.tex and you should be good.– moewe
7 hours ago
|
show 6 more comments
1 Answer
1
active
oldest
votes
The crucial piece of information to understand this error is the line in the .log before the actual error message starts. It reads
(./pstricks.tex
! LaTeX Error: Two documentclass or documentstyle commands.
See the LaTeX manual or LaTeX Companion for explanation.
Type H <return> for immediate help.
...
l.1 documentclass[12pt]
article
?
! Emergency stop.
...
l.1 documentclass[12pt]
article
The document may only declare one class.
The (./pstricks.tex means that TeX has opened a file called ./pstricks.tex (i.e. a file in the same directory as your main TeX file called pstricks.tex). As soon as that file is loaded the error occurs in the documentclass in line 1.
A part of the code of the package pstricks lives in a file called pstricks.tex and that file is loaded by the package. (pstricks.sty has the line inputpstricks%, which reads pstricks.tex.)
The way TeX loads files means that files in your current working directory are given preference over files installed by your TeX distribution. In general that is a very useful feature because you can easily override some things locally without changing system files.
But in this case that means that a totally unrelated file called pstricks.tex in the document directory is loaded instead of the package code in pstricks.tex.
The easiest way to avoid that is by renaming your local file to something other than pstricks.tex. In general you should avoid giving files the same name as a class or package, but you can never be entirely sure which names are problematic as packages could load additional .tex files with different names. The only way to be sure is by checking the .log thoroughly if similar issues occur.
Note that the error might have been much more cryptic and might have occurred at a different stage if your pstricks.tex had not contained a documentclass, for example if it had been only a chapter of your paper that you load in a bigger document with input or include.
This is what Johannes_B hinted at in his comment
Do NOT call your document article.tex
Though, incidentally, acrticle.tex would have probably been fine, since article.cls does not attempt to load article.tex.
A similar issue was discussed a few days ago in the German goLaTeX forum https://golatex.de/markdown-in-latex-einbinden-t21651.html where the issue appeared with the markdown package, which loads markdown.tex, when a user called their document Markdown.tex (on a Windows system, which is case insensitive).
add a comment |
Your Answer
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "85"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Martín-Blas Pérez Pinilla is a new contributor. Be nice, and check out our Code of Conduct.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f480682%2fmysterious-two-documentclass-or-documentstyle-commands%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
The crucial piece of information to understand this error is the line in the .log before the actual error message starts. It reads
(./pstricks.tex
! LaTeX Error: Two documentclass or documentstyle commands.
See the LaTeX manual or LaTeX Companion for explanation.
Type H <return> for immediate help.
...
l.1 documentclass[12pt]
article
?
! Emergency stop.
...
l.1 documentclass[12pt]
article
The document may only declare one class.
The (./pstricks.tex means that TeX has opened a file called ./pstricks.tex (i.e. a file in the same directory as your main TeX file called pstricks.tex). As soon as that file is loaded the error occurs in the documentclass in line 1.
A part of the code of the package pstricks lives in a file called pstricks.tex and that file is loaded by the package. (pstricks.sty has the line inputpstricks%, which reads pstricks.tex.)
The way TeX loads files means that files in your current working directory are given preference over files installed by your TeX distribution. In general that is a very useful feature because you can easily override some things locally without changing system files.
But in this case that means that a totally unrelated file called pstricks.tex in the document directory is loaded instead of the package code in pstricks.tex.
The easiest way to avoid that is by renaming your local file to something other than pstricks.tex. In general you should avoid giving files the same name as a class or package, but you can never be entirely sure which names are problematic as packages could load additional .tex files with different names. The only way to be sure is by checking the .log thoroughly if similar issues occur.
Note that the error might have been much more cryptic and might have occurred at a different stage if your pstricks.tex had not contained a documentclass, for example if it had been only a chapter of your paper that you load in a bigger document with input or include.
This is what Johannes_B hinted at in his comment
Do NOT call your document article.tex
Though, incidentally, acrticle.tex would have probably been fine, since article.cls does not attempt to load article.tex.
A similar issue was discussed a few days ago in the German goLaTeX forum https://golatex.de/markdown-in-latex-einbinden-t21651.html where the issue appeared with the markdown package, which loads markdown.tex, when a user called their document Markdown.tex (on a Windows system, which is case insensitive).
add a comment |
The crucial piece of information to understand this error is the line in the .log before the actual error message starts. It reads
(./pstricks.tex
! LaTeX Error: Two documentclass or documentstyle commands.
See the LaTeX manual or LaTeX Companion for explanation.
Type H <return> for immediate help.
...
l.1 documentclass[12pt]
article
?
! Emergency stop.
...
l.1 documentclass[12pt]
article
The document may only declare one class.
The (./pstricks.tex means that TeX has opened a file called ./pstricks.tex (i.e. a file in the same directory as your main TeX file called pstricks.tex). As soon as that file is loaded the error occurs in the documentclass in line 1.
A part of the code of the package pstricks lives in a file called pstricks.tex and that file is loaded by the package. (pstricks.sty has the line inputpstricks%, which reads pstricks.tex.)
The way TeX loads files means that files in your current working directory are given preference over files installed by your TeX distribution. In general that is a very useful feature because you can easily override some things locally without changing system files.
But in this case that means that a totally unrelated file called pstricks.tex in the document directory is loaded instead of the package code in pstricks.tex.
The easiest way to avoid that is by renaming your local file to something other than pstricks.tex. In general you should avoid giving files the same name as a class or package, but you can never be entirely sure which names are problematic as packages could load additional .tex files with different names. The only way to be sure is by checking the .log thoroughly if similar issues occur.
Note that the error might have been much more cryptic and might have occurred at a different stage if your pstricks.tex had not contained a documentclass, for example if it had been only a chapter of your paper that you load in a bigger document with input or include.
This is what Johannes_B hinted at in his comment
Do NOT call your document article.tex
Though, incidentally, acrticle.tex would have probably been fine, since article.cls does not attempt to load article.tex.
A similar issue was discussed a few days ago in the German goLaTeX forum https://golatex.de/markdown-in-latex-einbinden-t21651.html where the issue appeared with the markdown package, which loads markdown.tex, when a user called their document Markdown.tex (on a Windows system, which is case insensitive).
add a comment |
The crucial piece of information to understand this error is the line in the .log before the actual error message starts. It reads
(./pstricks.tex
! LaTeX Error: Two documentclass or documentstyle commands.
See the LaTeX manual or LaTeX Companion for explanation.
Type H <return> for immediate help.
...
l.1 documentclass[12pt]
article
?
! Emergency stop.
...
l.1 documentclass[12pt]
article
The document may only declare one class.
The (./pstricks.tex means that TeX has opened a file called ./pstricks.tex (i.e. a file in the same directory as your main TeX file called pstricks.tex). As soon as that file is loaded the error occurs in the documentclass in line 1.
A part of the code of the package pstricks lives in a file called pstricks.tex and that file is loaded by the package. (pstricks.sty has the line inputpstricks%, which reads pstricks.tex.)
The way TeX loads files means that files in your current working directory are given preference over files installed by your TeX distribution. In general that is a very useful feature because you can easily override some things locally without changing system files.
But in this case that means that a totally unrelated file called pstricks.tex in the document directory is loaded instead of the package code in pstricks.tex.
The easiest way to avoid that is by renaming your local file to something other than pstricks.tex. In general you should avoid giving files the same name as a class or package, but you can never be entirely sure which names are problematic as packages could load additional .tex files with different names. The only way to be sure is by checking the .log thoroughly if similar issues occur.
Note that the error might have been much more cryptic and might have occurred at a different stage if your pstricks.tex had not contained a documentclass, for example if it had been only a chapter of your paper that you load in a bigger document with input or include.
This is what Johannes_B hinted at in his comment
Do NOT call your document article.tex
Though, incidentally, acrticle.tex would have probably been fine, since article.cls does not attempt to load article.tex.
A similar issue was discussed a few days ago in the German goLaTeX forum https://golatex.de/markdown-in-latex-einbinden-t21651.html where the issue appeared with the markdown package, which loads markdown.tex, when a user called their document Markdown.tex (on a Windows system, which is case insensitive).
The crucial piece of information to understand this error is the line in the .log before the actual error message starts. It reads
(./pstricks.tex
! LaTeX Error: Two documentclass or documentstyle commands.
See the LaTeX manual or LaTeX Companion for explanation.
Type H <return> for immediate help.
...
l.1 documentclass[12pt]
article
?
! Emergency stop.
...
l.1 documentclass[12pt]
article
The document may only declare one class.
The (./pstricks.tex means that TeX has opened a file called ./pstricks.tex (i.e. a file in the same directory as your main TeX file called pstricks.tex). As soon as that file is loaded the error occurs in the documentclass in line 1.
A part of the code of the package pstricks lives in a file called pstricks.tex and that file is loaded by the package. (pstricks.sty has the line inputpstricks%, which reads pstricks.tex.)
The way TeX loads files means that files in your current working directory are given preference over files installed by your TeX distribution. In general that is a very useful feature because you can easily override some things locally without changing system files.
But in this case that means that a totally unrelated file called pstricks.tex in the document directory is loaded instead of the package code in pstricks.tex.
The easiest way to avoid that is by renaming your local file to something other than pstricks.tex. In general you should avoid giving files the same name as a class or package, but you can never be entirely sure which names are problematic as packages could load additional .tex files with different names. The only way to be sure is by checking the .log thoroughly if similar issues occur.
Note that the error might have been much more cryptic and might have occurred at a different stage if your pstricks.tex had not contained a documentclass, for example if it had been only a chapter of your paper that you load in a bigger document with input or include.
This is what Johannes_B hinted at in his comment
Do NOT call your document article.tex
Though, incidentally, acrticle.tex would have probably been fine, since article.cls does not attempt to load article.tex.
A similar issue was discussed a few days ago in the German goLaTeX forum https://golatex.de/markdown-in-latex-einbinden-t21651.html where the issue appeared with the markdown package, which loads markdown.tex, when a user called their document Markdown.tex (on a Windows system, which is case insensitive).
edited 5 hours ago
answered 5 hours ago
moewemoewe
94.7k10115356
94.7k10115356
add a comment |
add a comment |
Martín-Blas Pérez Pinilla is a new contributor. Be nice, and check out our Code of Conduct.
Martín-Blas Pérez Pinilla is a new contributor. Be nice, and check out our Code of Conduct.
Martín-Blas Pérez Pinilla is a new contributor. Be nice, and check out our Code of Conduct.
Martín-Blas Pérez Pinilla is a new contributor. Be nice, and check out our Code of Conduct.
Thanks for contributing an answer to TeX - LaTeX Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f480682%2fmysterious-two-documentclass-or-documentstyle-commands%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Welcome to TeX.SX! For me the code works fine (as it should)... I'm also using TeXLive 2018, so I guess there is something else causing that problem. The error message should show in which line the problem happened. Can you show us the log, please?
– Phelype Oleinik
8 hours ago
Can you share the full
.logfile of the LaTeX run on that file? If it is too long to be shared here, you can upload it to a text-sharing website like pastebin.com– moewe
8 hours ago
@PhelypeOleinik, then the concrete compiler can be relevant... Thanks.
– Martín-Blas Pérez Pinilla
8 hours ago
3
Do NOT call your document article.tex
– Johannes_B
7 hours ago
5
As Johannes guessed: You have a file called
pstricks.texin the same folder as this file. Butpstricksis the name of a package you load. TeX picks up the wrong file and chaos ensues. Renamepstricks.texand you should be good.– moewe
7 hours ago