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










0















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








share


























    0















    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








    share
























      0












      0








      0








      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








      share














      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





      share












      share










      share



      share










      asked 59 secs ago









      aaragonaaragon

      1,22521029




      1,22521029




















          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
          );



          );













          draft saved

          draft discarded


















          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















          draft saved

          draft discarded
















































          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.




          draft saved


          draft discarded














          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





















































          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







          Popular posts from this blog

          Isabella Eugénie Boyer Biographie | Références | Menu de navigationmodifiermodifier le codeComparator to Compute the Relative Value of a U.S. Dollar Amount – 1774 to Present.

          Lioubotyn Sommaire Géographie | Histoire | Population | Notes et références | Liens externes | Menu de navigationlubotin.kharkov.uamodifier« Recensements et estimations de la population depuis 1897 »« Office des statistiques d'Ukraine : population au 1er janvier 2010, 2011 et 2012 »« Office des statistiques d'Ukraine : population au 1er janvier 2011, 2012 et 2013 »Informations officiellesCartes topographiquesCarte routièrem

          Mpande kaSenzangakhona Biographie | Références | Menu de navigationmodifierMpande kaSenzangakhonavoir la liste des auteursm