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)

Can compressed videos be decoded back to their uncompresed original format?

What about the virus in 12 Monkeys?

Should I cover my bicycle overnight while bikepacking?

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

How to prevent "they're falling in love" trope

Plagiarism or not?

Ambiguity in the definition of entropy

Mathematica command that allows it to read my intentions

What reasons are there for a Capitalist to oppose a 100% inheritance tax?

Bullying boss launched a smear campaign and made me unemployable

If human space travel is limited by the G force vulnerability, is there a way to counter G forces?

Calculating entropy change: reversible vs irreversible process

Can mass be shunted off into hyperspace, but the matter remains?

How much of data wrangling is a data scientist's job?

Examples of smooth manifolds admitting inbetween one and a continuum of complex structures

Am I breaking OOP practice with this architecture?

Short story with a alien planet, government officials must wear exploding medallions

Is there an expression that means doing something right before you will need it rather than doing it in case you might need it?

Can I run a new neutral wire to repair a broken circuit?

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

Is "remove commented out code" correct English?

Is there a hemisphere-neutral way of specifying a season?

Alternative to sending password over mail?

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



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 28 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

          acmart: Multiple authors: all with same affiliation, one author an additional affiliationHow to Write Names of Multiple Authors with Shared Affiliation in ACM 2017 Template?Multiple authors with different primary affiliation, but same additional affiliationSame affiliation for all authors without extra packagesIOS-Book-Article.cls: one author with multiple affiliationacmart: Shared Author AffiliationMultiple authors with different primary affiliation, but same additional affiliationAuthor affiliation with only 1 authorAdding Multiple Authors with Different Affiliation in LaTeX ArticleLaTeX: Multiple authors stays on same lineHow to Label Multiple Authors with Same DescriptionHow to make two authors use the same affiliationTwo authors with same affiliation on finished front page

          How to write “ä” and other umlauts and accented letters in bibliography?Accents in BibTeXSorting references with special characters alphabeticallyUse ae ligature in bibliographyEastern European nameInverted circumflex in BibTexBibTex, non-ascii initials and nameptr fproblems with accent in LatexHow to add a Ø to my bibliography from Jabref?References without accentsTroubles when trying to cite St“omer-Verlet in ”title" field of a bib entryComprehensive list of accented charactersHow to type the letter “i” with two dots (diaeresis) in math mode?Problem with glossary text and accented lettersSpecial character in bibliographyAccented letters, Unicode and LaTeX accentsHow to stop natbib from modifying bibliography styleCitation of a paper with non-standard characters by BibtexWrite accented characters to file using writeHow to group the bibliography alphabetically, if some surnames start with “accented” characters?How can I automatically capitalize significant words in my bibliography?

          Problem using RevTeX4-1 with “! Undefined control sequence. @bibitemShut”