Escaping $ in listings environment Announcing the arrival of Valued Associate #679: Cesar Manara Planned maintenance scheduled April 23, 2019 at 23:30 UTC (7:30pm US/Eastern)Use $ in lstlisting
How to name indistinguishable henchmen in a screenplay?
Is honorific speech ever used in the first person?
How can I introduce the names of fantasy creatures to the reader?
Pointing to problems without suggesting solutions
Why did Bronn offer to be Tyrion Lannister's champion in trial by combat?
What does Sonny Burch mean by, "S.H.I.E.L.D. and HYDRA don't even exist anymore"?
Short story about astronauts fertilizing soil with their own bodies
geoserver.catalog.FailedRequestError: Tried to make a GET request to http://localhost:8080/geoserver/workspaces.xml but got a 404 status code
Inverse square law not accurate for non-point masses?
3D Masyu - A Die
How to show a density matrix is in a pure/mixed state?
Table formatting with tabularx?
New Order #6: Easter Egg
Is the Mordenkainen's Sword spell underpowered?
Where did Ptolemy compare the Earth to the distance of fixed stars?
Searching extreme points of polyhedron
IC on Digikey is 5x more expensive than board containing same IC on Alibaba: How?
Combining list in a Cartesian product format with addition operation?
How do you cope with tons of web fonts when copying and pasting from web pages?
No Invitation for Tourist Visa, But i want to visit
Can stored/leased 737s be used to substitute for grounded MAXs?
Why can't fire hurt Daenerys but it did to Jon Snow in season 1?
Changing order of draw operation in PGFPlots
Restricting the Object Type for the get method in java HashMap
Escaping $ in listings environment
Announcing the arrival of Valued Associate #679: Cesar Manara
Planned maintenance scheduled April 23, 2019 at 23:30 UTC (7:30pm US/Eastern)Use $ in lstlisting
I'm trying to escape the dollar sign within listings for TeX language but it is not working. I have tried this post without any success.
This is the MWE:
documentclass[border=10pt 10pt 10pt 10pt]standalone
usepackage[dvipsnames]xcolor
usepackagelistings
% Python style for highlighting
newcommandlatexstylelstset
language=TeX,
basicstyle=scriptsizettfamily,
mathescape=true,
keywordstyle=colorMidnightBluebfseries,
morekeywords=begin, addplot, addlegendentry, documentclass, usepackage, usetikzlibrary, usepgfplotslibrary, pgfplotsset, nextlist, coordinate small, draw,
% Python environment
lstnewenvironmentlatex[1][mathescape]
latexstyle
lstset#1
begindocument
beginlatex
begintikzpicture
beginloglogaxis
addplot+ [ultra thick, dotted] table[]
10 0.2
100 0.1
1000 0.05
coordinate [pos=0.15] (A)
coordinate [pos=0.25] (B);
addlegendentrylegend 1
coordinate (A') at ($(A)!3pt!90:(B)$);
coordinate (B') at ($(B)!3pt!270:(A)$);
draw (A')-|(B') node[pos=0.25,above]$1$
node[pos=0.75,right]$alpha$;
draw [shorten <=-3pt,shorten >=-3pt] (A') -- (B');
endloglogaxis
endtikzpicture
endlatex
enddocument
listings
add a comment |
I'm trying to escape the dollar sign within listings for TeX language but it is not working. I have tried this post without any success.
This is the MWE:
documentclass[border=10pt 10pt 10pt 10pt]standalone
usepackage[dvipsnames]xcolor
usepackagelistings
% Python style for highlighting
newcommandlatexstylelstset
language=TeX,
basicstyle=scriptsizettfamily,
mathescape=true,
keywordstyle=colorMidnightBluebfseries,
morekeywords=begin, addplot, addlegendentry, documentclass, usepackage, usetikzlibrary, usepgfplotslibrary, pgfplotsset, nextlist, coordinate small, draw,
% Python environment
lstnewenvironmentlatex[1][mathescape]
latexstyle
lstset#1
begindocument
beginlatex
begintikzpicture
beginloglogaxis
addplot+ [ultra thick, dotted] table[]
10 0.2
100 0.1
1000 0.05
coordinate [pos=0.15] (A)
coordinate [pos=0.25] (B);
addlegendentrylegend 1
coordinate (A') at ($(A)!3pt!90:(B)$);
coordinate (B') at ($(B)!3pt!270:(A)$);
draw (A')-|(B') node[pos=0.25,above]$1$
node[pos=0.75,right]$alpha$;
draw [shorten <=-3pt,shorten >=-3pt] (A') -- (B');
endloglogaxis
endtikzpicture
endlatex
enddocument
listings
add a comment |
I'm trying to escape the dollar sign within listings for TeX language but it is not working. I have tried this post without any success.
This is the MWE:
documentclass[border=10pt 10pt 10pt 10pt]standalone
usepackage[dvipsnames]xcolor
usepackagelistings
% Python style for highlighting
newcommandlatexstylelstset
language=TeX,
basicstyle=scriptsizettfamily,
mathescape=true,
keywordstyle=colorMidnightBluebfseries,
morekeywords=begin, addplot, addlegendentry, documentclass, usepackage, usetikzlibrary, usepgfplotslibrary, pgfplotsset, nextlist, coordinate small, draw,
% Python environment
lstnewenvironmentlatex[1][mathescape]
latexstyle
lstset#1
begindocument
beginlatex
begintikzpicture
beginloglogaxis
addplot+ [ultra thick, dotted] table[]
10 0.2
100 0.1
1000 0.05
coordinate [pos=0.15] (A)
coordinate [pos=0.25] (B);
addlegendentrylegend 1
coordinate (A') at ($(A)!3pt!90:(B)$);
coordinate (B') at ($(B)!3pt!270:(A)$);
draw (A')-|(B') node[pos=0.25,above]$1$
node[pos=0.75,right]$alpha$;
draw [shorten <=-3pt,shorten >=-3pt] (A') -- (B');
endloglogaxis
endtikzpicture
endlatex
enddocument
listings
I'm trying to escape the dollar sign within listings for TeX language but it is not working. I have tried this post without any success.
This is the MWE:
documentclass[border=10pt 10pt 10pt 10pt]standalone
usepackage[dvipsnames]xcolor
usepackagelistings
% Python style for highlighting
newcommandlatexstylelstset
language=TeX,
basicstyle=scriptsizettfamily,
mathescape=true,
keywordstyle=colorMidnightBluebfseries,
morekeywords=begin, addplot, addlegendentry, documentclass, usepackage, usetikzlibrary, usepgfplotslibrary, pgfplotsset, nextlist, coordinate small, draw,
% Python environment
lstnewenvironmentlatex[1][mathescape]
latexstyle
lstset#1
begindocument
beginlatex
begintikzpicture
beginloglogaxis
addplot+ [ultra thick, dotted] table[]
10 0.2
100 0.1
1000 0.05
coordinate [pos=0.15] (A)
coordinate [pos=0.25] (B);
addlegendentrylegend 1
coordinate (A') at ($(A)!3pt!90:(B)$);
coordinate (B') at ($(B)!3pt!270:(A)$);
draw (A')-|(B') node[pos=0.25,above]$1$
node[pos=0.75,right]$alpha$;
draw [shorten <=-3pt,shorten >=-3pt] (A') -- (B');
endloglogaxis
endtikzpicture
endlatex
enddocument
listings
listings
asked 59 secs ago
aaragonaaragon
1,22521029
1,22521029
add a comment |
add a comment |
0
active
oldest
votes
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
);
);
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%2f486026%2fescaping-in-listings-environment%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
0
active
oldest
votes
0
active
oldest
votes
active
oldest
votes
active
oldest
votes
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%2f486026%2fescaping-in-listings-environment%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