{sourcecode} is for questions regarding the source code for (La)TeX documents, including syntax questions, style decisions, package sources, etc. For questions about printing code in LaTeX documents, use the {code} tag.

learn more… | top users | synonyms

1
vote
1answer
73 views

Why does source code in my header of report appear?

In my header is source code where nothing is supposed to be. Main document: \documentclass[a4paper,12pt]{report}\usepackage{lipsum} \usepackage{fancyhdr} ...
3
votes
0answers
63 views

Diagrams of TeX Design

In order to understand TeX better, and in order to procrastinate on stuff that is almost certainly more important, I'm slowly working my way through a YouTube series of Knuth explaining TeX82 ...
3
votes
0answers
116 views

Listing sourcecode - two columns, associations with colored background

I stumbeled over a way of formatting sourcecode in a book I am currently reading. It looks like this: So basically we have a following structure: There are two columns. Left column contains the ...
2
votes
0answers
237 views

Python console code with minted

I am using minted to highlight source code in my document. I have defined \definecolor{codeyellow}{RGB}{255,251,204} \newminted{python}{linenos,breaklines,frame=lines,bgcolor=codeyellow} in the ...
2
votes
0answers
29 views

Indentation marker for listings

I'm currently writing a document that contains several code samples. I included them as lstlistings and played around with the colors and everything, so they loot quite nice now. My only problem is ...
2
votes
0answers
55 views

Cyrillic in minted label

Is it posible to use the Cyrillic text for the label option in minted source code listing? I try to compile this piece of latex code with xelatex: ...
1
vote
0answers
28 views

any Tex template for this arxiv article?

I am from optimization and control society. I would like upload a paper in a non-description way, probably, like. http://arxiv.org/pdf/1604.00527.pdf Could you please help figure out how the format ...
1
vote
0answers
22 views

Recombining latex source code from multiple chapter files (not in compiled PDF)

I've written a manuscript using several chapter files and a main file. However, the journal I'm submitting to would like one continuous latex file for submission. I could copy and paste everything ...
1
vote
0answers
29 views

What is the correct way to refer to the code that one enters in an editor?

I am a question about terminology. When I think about source code I usually think about the code that a program is compiled from. But I also often call the code in the .tex file source code. Is this ...
1
vote
0answers
104 views

JavaScript ES6 Code highlighting

I'm using the latest minted to highlight my sourcecode. I've got a lot of code listings using ES5 and ES6 javascript features but minted is lacking a lot of them still. What can I do to get proper ...
0
votes
0answers
22 views

matlab-prettifier with fancyvrb-style of label / frame

I wonder how to make the frame line around caption of listing not being printed (top line being broken into two by caption in the middle) when matlab-prettifier (or listings package) are being used, ...
0
votes
0answers
32 views

Russian encoding in tex-file

My fellow sent me an text-file with russian text. But when I opened it in TexStudio, all russian turned into this interesting squares. Both of us have similar encoding in TexStudio. How can I recover ...
0
votes
0answers
52 views

Displaying source code listing with strikethrough/strikeout

I'm preparing for a presentation in which I would like to show some source code with bits struck out. Does anyone know a package that can do that? I've googled but can't find anything. Here's my MWE, ...
0
votes
0answers
45 views

How to fix comment indentation of code using the listings package?

My problem is that the code itself is indented correctly, but the comments (e.g. //comment) are not. In my source file, I aligned comments in one column by using tabs. In the pdf produced by LaTeX, ...
0
votes
0answers
20 views

Including a particular function from a source file

I know I can use the listings package to include specific lines of a source file in my document, but is there any option or package that would allow me to specify a particular function to include ...