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)
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 28 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');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
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');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
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');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
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');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
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');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
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