Skip to main content
Share Your Experience: Take the 2024 Developer Survey

New answers tagged

2 votes

Code shows in Greek letters

I'd recommend removing the \UseRawInputEncoding line and compiling with luaTeX. Then it compiles without error. Note that neither A4 nor twosided are valid options for article. I assume you want ...
cfr's user avatar
  • 202k
2 votes

Typesetting Zig Programming Language: Seeking Listing or Minted Environment

Minted seems to work ok: \documentclass{article} \usepackage{minted} \begin{document} \begin{minted}{zig} const std = @import("std"); pub fn main() !void { std.debug.print("Hello, ...
Marijn's user avatar
  • 38.2k
1 vote
Accepted

Caption of listing uses wrong font

This is not a KOMA-Script issue but of the default style of package float, which is used by minted to define the listing environment and format the corresponding caption. But indeed KOMA-Script ...
cabohah's user avatar
  • 12.5k
1 vote

Caption of listing uses wrong font

You can select \normalfont when typesetting the caption label. \documentclass[]{scrreprt} \usepackage{sansmathfonts} \usepackage[T1]{fontenc} \usepackage{minted} \renewcommand*\familydefault{\...
egreg's user avatar
  • 1.1m
0 votes

Using \lstinputlisting to include a file but only certain lines or line ranges

I'd like to add another way of addressing this question, somewhat complementary to the linerange, firstline/lastline neatly explained in the other answers. My similar problem is that I wanted \...
pglpm's user avatar
  • 301
0 votes
Accepted

Adding horizontal blank space in listing

It's quite awkward to post an answer of my own question, but I think this would reduce the number of unanswered questions of this community. I tried some combinations with autogobble and fullflexible ...
Manjoy Das's user avatar
0 votes

Colored background in inline listings

You can combine lua-el (to highlight lines) and piton (for syntactic coloring of informatic listings). Both packages require a compilation with LuaLaTeX. It's possible to allow line breaks with the ...
F. Pantigny's user avatar
  • 41.9k
0 votes

Background color in inline code listings with linebreak

You can combine lua-el (to highlight lines) and piton (for syntactic coloring of informatic listings). Both packages require a compilation with LuaLaTeX. \documentclass{article} \usepackage{piton} \...
F. Pantigny's user avatar
  • 41.9k
1 vote

Highlight numbers using listings package

For information, the package piton directly gives an output respecting the conditions. The package piton does not use any external program and, hence, does not require the use of --shell-escape. ...
F. Pantigny's user avatar
  • 41.9k
0 votes

lstlisting: how to underline a keyword?

For information, the package piton provides an easy solution to that kind of problem in its environment {Piton}: you only have to use \underbar the way you would use it in normal text (provided you ...
F. Pantigny's user avatar
  • 41.9k
3 votes
Accepted

Changing the name of lstlisting

Instead of changing the name, you could just define a new listings environment and use this instead: \documentclass{article} \usepackage{listings} \lstnewenvironment{newname}[1][]{\lstset{#1}}{} \...
samcarter_is_at_topanswers.xyz's user avatar

Top 50 recent answers are included