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)
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
add a comment |
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
add a comment |
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
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
listings
asked 15 mins ago
Daniel BünzliDaniel Bünzli
101
101
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%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
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%2f483056%2flistings-for-ocaml-and-quotes%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