Listings - Error could not load requested style
up vote
2
down vote
favorite
I am trying to create some styling for my javascript snippets. My configuration looks like:
documentclass[letterpaper, dvipsnames]{article}
usepackage[utf8]{inputenc}
usepackage{listings} % Package for adding javascript code with code highlighting
usepackage[dvipsnames]{xcolor} % Package for adding colors
definecolor{purple}{rgb}{0.65, 0.12, 0.82}
definecolor{main-color}{rgb}{0.6627, 0.7176, 0.7764}
definecolor{back-color}{rgb}{0.1686, 0.1686, 0.1686}
lstdefinestyle{codeSection}
{
language= JavaScript,
basicstyle = {ttfamily color{main-color}},
backgroundcolor = {color{back-color}},
commentstyle = {color{OliveGreen}},
stringstyle = {color{green}},
keywordstyle = {color{orange}bfseries},
keywordstyle = [2]{color{orange}},
keywordstyle = [3]{color{purple}},
keywordstyle = [4]{color{lime}},
keywordstyle = [5]{color{orange}},
keywords = {typeof, new, true, false, function, return, null, switch, var, if, in, while, do, else, case, break, class, export, boolean, throw, implements, import, this, constructor, string, number, public, private, static, const, var, let, void},
morekeywords = [2]{class, export, boolean, throw, implements, import, this, interface},
morekeywords = [3]{Promise, Observable},
morekeywords = [4]{console},
otherkeywords = {;},
comment = [l]{//},
morecomment = [s]{/*}{*/},
morestring = [b]',
morestring = [b]",
sensitive = false,
breaklines = true,
showstringspaces= false,
showspaces= false,
extendedchars= true
}
Now when I try to add some Code it renders with the correct styling, but it gives me the error:Could not load requested styling.
The Code-insertion looks like:
begin{document}
begin{figure}[H]
begin{lstlisting}[style=codeSection]
export interface FakeHttpResponse {
code: string;
message: string;
}
const scndPromise = new Promise<FakeHttpResponse>((resolve, reject) => {
setTimeout(() => {
resolve({
code: '200',
message: 'Promise kept!'
});
}, 10 * 1000);
});
console.log(scndPromise);
setTimeout(() => console.log(scndPromise), 10 * 1000);
end{lstlisting}
end{figure}
end{document}
Can anyone help me out on fixing this error?
listings sharelatex overleaf
New contributor
|
show 1 more comment
up vote
2
down vote
favorite
I am trying to create some styling for my javascript snippets. My configuration looks like:
documentclass[letterpaper, dvipsnames]{article}
usepackage[utf8]{inputenc}
usepackage{listings} % Package for adding javascript code with code highlighting
usepackage[dvipsnames]{xcolor} % Package for adding colors
definecolor{purple}{rgb}{0.65, 0.12, 0.82}
definecolor{main-color}{rgb}{0.6627, 0.7176, 0.7764}
definecolor{back-color}{rgb}{0.1686, 0.1686, 0.1686}
lstdefinestyle{codeSection}
{
language= JavaScript,
basicstyle = {ttfamily color{main-color}},
backgroundcolor = {color{back-color}},
commentstyle = {color{OliveGreen}},
stringstyle = {color{green}},
keywordstyle = {color{orange}bfseries},
keywordstyle = [2]{color{orange}},
keywordstyle = [3]{color{purple}},
keywordstyle = [4]{color{lime}},
keywordstyle = [5]{color{orange}},
keywords = {typeof, new, true, false, function, return, null, switch, var, if, in, while, do, else, case, break, class, export, boolean, throw, implements, import, this, constructor, string, number, public, private, static, const, var, let, void},
morekeywords = [2]{class, export, boolean, throw, implements, import, this, interface},
morekeywords = [3]{Promise, Observable},
morekeywords = [4]{console},
otherkeywords = {;},
comment = [l]{//},
morecomment = [s]{/*}{*/},
morestring = [b]',
morestring = [b]",
sensitive = false,
breaklines = true,
showstringspaces= false,
showspaces= false,
extendedchars= true
}
Now when I try to add some Code it renders with the correct styling, but it gives me the error:Could not load requested styling.
The Code-insertion looks like:
begin{document}
begin{figure}[H]
begin{lstlisting}[style=codeSection]
export interface FakeHttpResponse {
code: string;
message: string;
}
const scndPromise = new Promise<FakeHttpResponse>((resolve, reject) => {
setTimeout(() => {
resolve({
code: '200',
message: 'Promise kept!'
});
}, 10 * 1000);
});
console.log(scndPromise);
setTimeout(() => console.log(scndPromise), 10 * 1000);
end{lstlisting}
end{figure}
end{document}
Can anyone help me out on fixing this error?
listings sharelatex overleaf
New contributor
Make a complete example that can be tested.
– Ulrike Fischer
Nov 14 at 18:10
Extented my config to a reproducable example.
– Fantasia
Nov 14 at 18:18
I can find no javascript definitions in the listings files. Why do you think that the language exists?
– Ulrike Fischer
Nov 14 at 18:30
I am fairly new to latex so... what should I add to prevent this error?
– Fantasia
Nov 14 at 21:10
If the language doesn't exist, you will have to create it (or adjust an existing one), see the documentation of listings.
– Ulrike Fischer
Nov 14 at 21:16
|
show 1 more comment
up vote
2
down vote
favorite
up vote
2
down vote
favorite
I am trying to create some styling for my javascript snippets. My configuration looks like:
documentclass[letterpaper, dvipsnames]{article}
usepackage[utf8]{inputenc}
usepackage{listings} % Package for adding javascript code with code highlighting
usepackage[dvipsnames]{xcolor} % Package for adding colors
definecolor{purple}{rgb}{0.65, 0.12, 0.82}
definecolor{main-color}{rgb}{0.6627, 0.7176, 0.7764}
definecolor{back-color}{rgb}{0.1686, 0.1686, 0.1686}
lstdefinestyle{codeSection}
{
language= JavaScript,
basicstyle = {ttfamily color{main-color}},
backgroundcolor = {color{back-color}},
commentstyle = {color{OliveGreen}},
stringstyle = {color{green}},
keywordstyle = {color{orange}bfseries},
keywordstyle = [2]{color{orange}},
keywordstyle = [3]{color{purple}},
keywordstyle = [4]{color{lime}},
keywordstyle = [5]{color{orange}},
keywords = {typeof, new, true, false, function, return, null, switch, var, if, in, while, do, else, case, break, class, export, boolean, throw, implements, import, this, constructor, string, number, public, private, static, const, var, let, void},
morekeywords = [2]{class, export, boolean, throw, implements, import, this, interface},
morekeywords = [3]{Promise, Observable},
morekeywords = [4]{console},
otherkeywords = {;},
comment = [l]{//},
morecomment = [s]{/*}{*/},
morestring = [b]',
morestring = [b]",
sensitive = false,
breaklines = true,
showstringspaces= false,
showspaces= false,
extendedchars= true
}
Now when I try to add some Code it renders with the correct styling, but it gives me the error:Could not load requested styling.
The Code-insertion looks like:
begin{document}
begin{figure}[H]
begin{lstlisting}[style=codeSection]
export interface FakeHttpResponse {
code: string;
message: string;
}
const scndPromise = new Promise<FakeHttpResponse>((resolve, reject) => {
setTimeout(() => {
resolve({
code: '200',
message: 'Promise kept!'
});
}, 10 * 1000);
});
console.log(scndPromise);
setTimeout(() => console.log(scndPromise), 10 * 1000);
end{lstlisting}
end{figure}
end{document}
Can anyone help me out on fixing this error?
listings sharelatex overleaf
New contributor
I am trying to create some styling for my javascript snippets. My configuration looks like:
documentclass[letterpaper, dvipsnames]{article}
usepackage[utf8]{inputenc}
usepackage{listings} % Package for adding javascript code with code highlighting
usepackage[dvipsnames]{xcolor} % Package for adding colors
definecolor{purple}{rgb}{0.65, 0.12, 0.82}
definecolor{main-color}{rgb}{0.6627, 0.7176, 0.7764}
definecolor{back-color}{rgb}{0.1686, 0.1686, 0.1686}
lstdefinestyle{codeSection}
{
language= JavaScript,
basicstyle = {ttfamily color{main-color}},
backgroundcolor = {color{back-color}},
commentstyle = {color{OliveGreen}},
stringstyle = {color{green}},
keywordstyle = {color{orange}bfseries},
keywordstyle = [2]{color{orange}},
keywordstyle = [3]{color{purple}},
keywordstyle = [4]{color{lime}},
keywordstyle = [5]{color{orange}},
keywords = {typeof, new, true, false, function, return, null, switch, var, if, in, while, do, else, case, break, class, export, boolean, throw, implements, import, this, constructor, string, number, public, private, static, const, var, let, void},
morekeywords = [2]{class, export, boolean, throw, implements, import, this, interface},
morekeywords = [3]{Promise, Observable},
morekeywords = [4]{console},
otherkeywords = {;},
comment = [l]{//},
morecomment = [s]{/*}{*/},
morestring = [b]',
morestring = [b]",
sensitive = false,
breaklines = true,
showstringspaces= false,
showspaces= false,
extendedchars= true
}
Now when I try to add some Code it renders with the correct styling, but it gives me the error:Could not load requested styling.
The Code-insertion looks like:
begin{document}
begin{figure}[H]
begin{lstlisting}[style=codeSection]
export interface FakeHttpResponse {
code: string;
message: string;
}
const scndPromise = new Promise<FakeHttpResponse>((resolve, reject) => {
setTimeout(() => {
resolve({
code: '200',
message: 'Promise kept!'
});
}, 10 * 1000);
});
console.log(scndPromise);
setTimeout(() => console.log(scndPromise), 10 * 1000);
end{lstlisting}
end{figure}
end{document}
Can anyone help me out on fixing this error?
listings sharelatex overleaf
listings sharelatex overleaf
New contributor
New contributor
edited Nov 14 at 18:18
New contributor
asked Nov 14 at 18:08
Fantasia
214
214
New contributor
New contributor
Make a complete example that can be tested.
– Ulrike Fischer
Nov 14 at 18:10
Extented my config to a reproducable example.
– Fantasia
Nov 14 at 18:18
I can find no javascript definitions in the listings files. Why do you think that the language exists?
– Ulrike Fischer
Nov 14 at 18:30
I am fairly new to latex so... what should I add to prevent this error?
– Fantasia
Nov 14 at 21:10
If the language doesn't exist, you will have to create it (or adjust an existing one), see the documentation of listings.
– Ulrike Fischer
Nov 14 at 21:16
|
show 1 more comment
Make a complete example that can be tested.
– Ulrike Fischer
Nov 14 at 18:10
Extented my config to a reproducable example.
– Fantasia
Nov 14 at 18:18
I can find no javascript definitions in the listings files. Why do you think that the language exists?
– Ulrike Fischer
Nov 14 at 18:30
I am fairly new to latex so... what should I add to prevent this error?
– Fantasia
Nov 14 at 21:10
If the language doesn't exist, you will have to create it (or adjust an existing one), see the documentation of listings.
– Ulrike Fischer
Nov 14 at 21:16
Make a complete example that can be tested.
– Ulrike Fischer
Nov 14 at 18:10
Make a complete example that can be tested.
– Ulrike Fischer
Nov 14 at 18:10
Extented my config to a reproducable example.
– Fantasia
Nov 14 at 18:18
Extented my config to a reproducable example.
– Fantasia
Nov 14 at 18:18
I can find no javascript definitions in the listings files. Why do you think that the language exists?
– Ulrike Fischer
Nov 14 at 18:30
I can find no javascript definitions in the listings files. Why do you think that the language exists?
– Ulrike Fischer
Nov 14 at 18:30
I am fairly new to latex so... what should I add to prevent this error?
– Fantasia
Nov 14 at 21:10
I am fairly new to latex so... what should I add to prevent this error?
– Fantasia
Nov 14 at 21:10
If the language doesn't exist, you will have to create it (or adjust an existing one), see the documentation of listings.
– Ulrike Fischer
Nov 14 at 21:16
If the language doesn't exist, you will have to create it (or adjust an existing one), see the documentation of listings.
– Ulrike Fischer
Nov 14 at 21:16
|
show 1 more comment
1 Answer
1
active
oldest
votes
up vote
1
down vote
I fixed it by the following configuration:
lstdefinelanguage{JavaScript}
{
keywords = {typeof, new, true, false, function, return, null, switch, var, if, in, while, do, else, case, break, class, export, boolean, throw, implements, import, this, constructor, string, number, public, private, static, const, var, let, void},
morekeywords = [2]{class, export, boolean, throw, implements, import, this, interface},
morekeywords = [3]{Promise, Observable},
morekeywords = [4]{log},
otherkeywords = {;},
comment = [l]{//},
morecomment = [s]{/*}{*/},
morestring = [b]',
morestring = [b]",
}
lstset
{
language= JavaScript,
commentstyle = {color{OliveGreen}},
stringstyle = {color{green}},
keywordstyle = {color{orange}bfseries},
keywordstyle = [2]{color{orange}},
keywordstyle = [3]{color{purple}},
keywordstyle = [4]{color{lime}},
keywordstyle = [5]{color{orange}},
basicstyle = {ttfamily color{main-color}},
backgroundcolor = {color{back-color}},
sensitive = false,
breaklines = true,
showstringspaces= false,
showspaces= false,
extendedchars= true
}
New contributor
add a comment |
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
1
down vote
I fixed it by the following configuration:
lstdefinelanguage{JavaScript}
{
keywords = {typeof, new, true, false, function, return, null, switch, var, if, in, while, do, else, case, break, class, export, boolean, throw, implements, import, this, constructor, string, number, public, private, static, const, var, let, void},
morekeywords = [2]{class, export, boolean, throw, implements, import, this, interface},
morekeywords = [3]{Promise, Observable},
morekeywords = [4]{log},
otherkeywords = {;},
comment = [l]{//},
morecomment = [s]{/*}{*/},
morestring = [b]',
morestring = [b]",
}
lstset
{
language= JavaScript,
commentstyle = {color{OliveGreen}},
stringstyle = {color{green}},
keywordstyle = {color{orange}bfseries},
keywordstyle = [2]{color{orange}},
keywordstyle = [3]{color{purple}},
keywordstyle = [4]{color{lime}},
keywordstyle = [5]{color{orange}},
basicstyle = {ttfamily color{main-color}},
backgroundcolor = {color{back-color}},
sensitive = false,
breaklines = true,
showstringspaces= false,
showspaces= false,
extendedchars= true
}
New contributor
add a comment |
up vote
1
down vote
I fixed it by the following configuration:
lstdefinelanguage{JavaScript}
{
keywords = {typeof, new, true, false, function, return, null, switch, var, if, in, while, do, else, case, break, class, export, boolean, throw, implements, import, this, constructor, string, number, public, private, static, const, var, let, void},
morekeywords = [2]{class, export, boolean, throw, implements, import, this, interface},
morekeywords = [3]{Promise, Observable},
morekeywords = [4]{log},
otherkeywords = {;},
comment = [l]{//},
morecomment = [s]{/*}{*/},
morestring = [b]',
morestring = [b]",
}
lstset
{
language= JavaScript,
commentstyle = {color{OliveGreen}},
stringstyle = {color{green}},
keywordstyle = {color{orange}bfseries},
keywordstyle = [2]{color{orange}},
keywordstyle = [3]{color{purple}},
keywordstyle = [4]{color{lime}},
keywordstyle = [5]{color{orange}},
basicstyle = {ttfamily color{main-color}},
backgroundcolor = {color{back-color}},
sensitive = false,
breaklines = true,
showstringspaces= false,
showspaces= false,
extendedchars= true
}
New contributor
add a comment |
up vote
1
down vote
up vote
1
down vote
I fixed it by the following configuration:
lstdefinelanguage{JavaScript}
{
keywords = {typeof, new, true, false, function, return, null, switch, var, if, in, while, do, else, case, break, class, export, boolean, throw, implements, import, this, constructor, string, number, public, private, static, const, var, let, void},
morekeywords = [2]{class, export, boolean, throw, implements, import, this, interface},
morekeywords = [3]{Promise, Observable},
morekeywords = [4]{log},
otherkeywords = {;},
comment = [l]{//},
morecomment = [s]{/*}{*/},
morestring = [b]',
morestring = [b]",
}
lstset
{
language= JavaScript,
commentstyle = {color{OliveGreen}},
stringstyle = {color{green}},
keywordstyle = {color{orange}bfseries},
keywordstyle = [2]{color{orange}},
keywordstyle = [3]{color{purple}},
keywordstyle = [4]{color{lime}},
keywordstyle = [5]{color{orange}},
basicstyle = {ttfamily color{main-color}},
backgroundcolor = {color{back-color}},
sensitive = false,
breaklines = true,
showstringspaces= false,
showspaces= false,
extendedchars= true
}
New contributor
I fixed it by the following configuration:
lstdefinelanguage{JavaScript}
{
keywords = {typeof, new, true, false, function, return, null, switch, var, if, in, while, do, else, case, break, class, export, boolean, throw, implements, import, this, constructor, string, number, public, private, static, const, var, let, void},
morekeywords = [2]{class, export, boolean, throw, implements, import, this, interface},
morekeywords = [3]{Promise, Observable},
morekeywords = [4]{log},
otherkeywords = {;},
comment = [l]{//},
morecomment = [s]{/*}{*/},
morestring = [b]',
morestring = [b]",
}
lstset
{
language= JavaScript,
commentstyle = {color{OliveGreen}},
stringstyle = {color{green}},
keywordstyle = {color{orange}bfseries},
keywordstyle = [2]{color{orange}},
keywordstyle = [3]{color{purple}},
keywordstyle = [4]{color{lime}},
keywordstyle = [5]{color{orange}},
basicstyle = {ttfamily color{main-color}},
backgroundcolor = {color{back-color}},
sensitive = false,
breaklines = true,
showstringspaces= false,
showspaces= false,
extendedchars= true
}
New contributor
New contributor
answered Nov 14 at 21:40
Fantasia
214
214
New contributor
New contributor
add a comment |
add a comment |
Fantasia is a new contributor. Be nice, and check out our Code of Conduct.
Fantasia is a new contributor. Be nice, and check out our Code of Conduct.
Fantasia is a new contributor. Be nice, and check out our Code of Conduct.
Fantasia 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%2f459991%2flistings-error-could-not-load-requested-style%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
Make a complete example that can be tested.
– Ulrike Fischer
Nov 14 at 18:10
Extented my config to a reproducable example.
– Fantasia
Nov 14 at 18:18
I can find no javascript definitions in the listings files. Why do you think that the language exists?
– Ulrike Fischer
Nov 14 at 18:30
I am fairly new to latex so... what should I add to prevent this error?
– Fantasia
Nov 14 at 21:10
If the language doesn't exist, you will have to create it (or adjust an existing one), see the documentation of listings.
– Ulrike Fischer
Nov 14 at 21:16