Listings for OCaml and quotesListings package for C#Listings remove single quotes after I made it look goodStandard single quotes for code in listings`listings` and `sidecap` - Side captions for listingsListings problem with quotes in a stringtex4ht and listings: lines don't break when using escapeinsideCan't apply monospaced font to listings (when using pdflatex)How can I get matching curly double quotes using listings?Strange spare single quotes before listings environmentlstnewenvironment/lstset : using colors conditionally emph/emphstyle - SAS: (in=_x) versus if x in (1,2)

Is this a hacking script in function.php?

Running Low on Limestone

How does having to sign to support someone for elections fit with having a secret ballot?

Can a virus destroy the BIOS of a modern computer?

Is it logically or scientifically possible to artificially send energy to the body?

How to add frame around section using titlesec?

Should I tell management that I intend to leave due to bad software development practices?

Should I cover my bicycle overnight while bikepacking?

What's the in-universe reasoning behind sorcerers needing material components?

Why can't we play rap on piano?

How badly should I try to prevent a user from XSSing themselves?

Forgetting the musical notes while performing in concert

Mathematica command that allows it to read my intentions

Plagiarism or not?

Alternative to sending password over mail?

How to show a landlord what we have in savings?

What exploit Are these user agents trying to use?

What is the most common color to indicate the input-field is disabled?

What mechanic is there to disable a threat instead of killing it?

iPad being using in wall mount battery swollen

How seriously should I take size and weight limits of hand luggage?

Does the Idaho Potato Commission associate potato skins with healthy eating?

What method can I use to design a dungeon difficult enough that the PCs can't make it through without killing them?

Forming a German sentence with/without the verb at the end



Listings for OCaml and quotes


Listings package for C#Listings remove single quotes after I made it look goodStandard single quotes for code in listings`listings` and `sidecap` - Side captions for listingsListings problem with quotes in a stringtex4ht and listings: lines don't break when using escapeinsideCan't apply monospaced font to listings (when using pdflatex)How can I get matching curly double quotes using listings?Strange spare single quotes before listings environmentlstnewenvironment/lstset : using colors conditionally emph/emphstyle - SAS: (in=_x) versus if x in (1,2)













0















The listings syntax highlighting for OCaml breaks whenever the OCaml literal character '"' appears in the source.



It's not possible to let the language definition treat single quotes as a delimiter for string literals because single quotes are also used for type variables (e.g. 'a list)



The following document shows the problem. On the last line of the output the let keyword should be in bold. This doesn't happen because listings thinks it is inside a string literal. If we treat single quotes as string literal delimiters then first line breaks the rendering of the subsequent lines.



documentclass[a4paper]article
usepackage[T1]fontenc
usepackagetextcomp
usepackage[scaled]beramono
usepackagelistings
lstset
language=caml,
columns=[c]fixed,
basicstyle=smallttfamily,
keywordstyle=bfseries,
upquote=true,
commentstyle=,
breaklines=true,
showstringspaces=false
begindocument
beginlstlisting
type 'a t = ..
let double_quote = '"'
let broken_highlight = ()
endlstlisting
enddocument


Is there a way to configure the listings package for OCaml so that this problem doesn't happen ?










share|improve this question


























    0















    The listings syntax highlighting for OCaml breaks whenever the OCaml literal character '"' appears in the source.



    It's not possible to let the language definition treat single quotes as a delimiter for string literals because single quotes are also used for type variables (e.g. 'a list)



    The following document shows the problem. On the last line of the output the let keyword should be in bold. This doesn't happen because listings thinks it is inside a string literal. If we treat single quotes as string literal delimiters then first line breaks the rendering of the subsequent lines.



    documentclass[a4paper]article
    usepackage[T1]fontenc
    usepackagetextcomp
    usepackage[scaled]beramono
    usepackagelistings
    lstset
    language=caml,
    columns=[c]fixed,
    basicstyle=smallttfamily,
    keywordstyle=bfseries,
    upquote=true,
    commentstyle=,
    breaklines=true,
    showstringspaces=false
    begindocument
    beginlstlisting
    type 'a t = ..
    let double_quote = '"'
    let broken_highlight = ()
    endlstlisting
    enddocument


    Is there a way to configure the listings package for OCaml so that this problem doesn't happen ?










    share|improve this question
























      0












      0








      0








      The listings syntax highlighting for OCaml breaks whenever the OCaml literal character '"' appears in the source.



      It's not possible to let the language definition treat single quotes as a delimiter for string literals because single quotes are also used for type variables (e.g. 'a list)



      The following document shows the problem. On the last line of the output the let keyword should be in bold. This doesn't happen because listings thinks it is inside a string literal. If we treat single quotes as string literal delimiters then first line breaks the rendering of the subsequent lines.



      documentclass[a4paper]article
      usepackage[T1]fontenc
      usepackagetextcomp
      usepackage[scaled]beramono
      usepackagelistings
      lstset
      language=caml,
      columns=[c]fixed,
      basicstyle=smallttfamily,
      keywordstyle=bfseries,
      upquote=true,
      commentstyle=,
      breaklines=true,
      showstringspaces=false
      begindocument
      beginlstlisting
      type 'a t = ..
      let double_quote = '"'
      let broken_highlight = ()
      endlstlisting
      enddocument


      Is there a way to configure the listings package for OCaml so that this problem doesn't happen ?










      share|improve this question














      The listings syntax highlighting for OCaml breaks whenever the OCaml literal character '"' appears in the source.



      It's not possible to let the language definition treat single quotes as a delimiter for string literals because single quotes are also used for type variables (e.g. 'a list)



      The following document shows the problem. On the last line of the output the let keyword should be in bold. This doesn't happen because listings thinks it is inside a string literal. If we treat single quotes as string literal delimiters then first line breaks the rendering of the subsequent lines.



      documentclass[a4paper]article
      usepackage[T1]fontenc
      usepackagetextcomp
      usepackage[scaled]beramono
      usepackagelistings
      lstset
      language=caml,
      columns=[c]fixed,
      basicstyle=smallttfamily,
      keywordstyle=bfseries,
      upquote=true,
      commentstyle=,
      breaklines=true,
      showstringspaces=false
      begindocument
      beginlstlisting
      type 'a t = ..
      let double_quote = '"'
      let broken_highlight = ()
      endlstlisting
      enddocument


      Is there a way to configure the listings package for OCaml so that this problem doesn't happen ?







      listings






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked 15 mins ago









      Daniel BünzliDaniel Bünzli

      101




      101




















          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%2f483056%2flistings-for-ocaml-and-quotes%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%2f483056%2flistings-for-ocaml-and-quotes%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.

          Join wedge with single bond in chemfigHow to make only one part of double bond bold with chemfig?Crossing bonds in chemfigjoining atoms in chemfig. Two adjacent molculesHow do I selectively change bond length in chemfig?Ugly bond joints in chemfigchemfig: reaction above arrowUsing the mhchem and chemfig packages in conjunctionBonding to specific element letter using chemfigResonance hybrids in chemfigScale chemfig molecule in beamer with tikzWhy does this chemfig bond with a hook start in the middle of the atom?

          Are small insurances worth itIs insurance worth it if you can afford to replace the item? If not, when is it?Is accident insurance worth it for my kids who play sportsIs insuring property for more than it is worth allowed?At what point does it become worth it to file an insurance claim?Are wage loss insurance programs worth the cost compared to having an emergency fund?When is an event worth insuring against?Is insurance worth it if you can afford to replace the item? If not, when is it?FHA loan just commenced : Any way to get any of the up-front mortgage insurance back?Which types of insurances do I need to buy?Should I carry less renter's insurance if I can self-insure?Mortgage Adviser Signed Me Up For Multiple Home and Life Insurances (UK)Why many travel insurances don't cover country of nationality?