Hello. I'm using Overleaf to create a report, and I have run into an issue where Overleaf wouldn't compile URLs with % included in it.
I am using the URL package, and here is what I am having trouble with: --figure here-- \caption{stuff \protect \footnotemark} --figure end here-- \footnotetext{ITER ...
Seems like a good enough solution, but on Overleaf, it gives the following error "Package Listings Warning: Text dropped after begin of listing on input line 94." and the part of interest is not shown in the final result. Also it seems a bit too complicated to use every time I want to color function ...
Try to define the keywords like this: \lstset{classoffset=0, morekeywords={one,three,five},keywordstyle=\color{red}, classoffset=1, morekeywords={two,four,six},keywordstyle=\color{blue}, classoffset=0}% restore default
The Array color is not bluegreen already... Try without the morekeywords = [5]{boolean(}, line, maybe it's the unclosed parenthesis that causes problem... (Here, everything is black, the pdf has no colors)
hmm, weird. Seems there are more to this pLaTeX/LaTeX compatibility issue. Unforeseen ...
I'm sorry for posting a non-working code. It's fixed now. NOTE: Why Overleaf was having issues, was that the length unit "zw" was not useable on non-pLaTeX environments(default English environment for Overleaf). I failed to notice this issue since my local environment is in pLaTeX(commonly used for ...
I think it can be done by morekeywords={boolean(} .
Thank you for the reply. That solution would highlight the left parenthesis as well I assume. I want the result to look like what I have shown in the screenshot, so that wouldn't quite fit in with what I'm looking for.
I'm now working on a new language definition for use in the listings package, and I have a question.
In my coding language, there are cases where coloring for the same word changes according to what comes next. Such as "boolean" comes in orange when it is written alone, but in blue if it is written ...