{code} is about using LaTeX to format and display source code. For questions about TeX itself as a programming language, use the {programming} tag.

learn more… | top users | synonyms

3
votes
0answers
66 views

How make formulas in the PDF not selectable?

Mathematical formulas in a PDF from LaTex generate lots of noise while reading it with Text-to-speech software. This is why I would like find a way to make all the set of symbols inside the formulas ...
3
votes
0answers
136 views

How to use same font-style with escapechar in lstlisting?

Original Question I want to highlight something inside a C++-comment in a code-listing. \documentclass[a4paper, 12pt]{article} \usepackage{color} \usepackage{listings} ...
2
votes
0answers
36 views

Tangle source code from PDF for literate programs

I want to include raw source code text that can be extracted from a PDF. It looks like this might be possible using PDF layers or OCQ or some kind of accessible option but I can't find a TeX package. ...
2
votes
0answers
19 views

\mintinline expands to a single newline

I'm using Minted 2.1, that I have installed through tlmgr, and Texmaker 4.1. Compiling the following piece of code (straight from the documentation) : \documentclass{report} ...
2
votes
0answers
15 views

Incorporate domain name in lstlistinput

I have some bash code which I want to incorporate in my document but I want to include the command followed by the output. For simplicity let yous the code ls. I have my code in a txt file which I ...
2
votes
0answers
32 views

Listings - Including only part of an external file between certain points

I've just started using LaTeX and am using the Listings package to include external source code. I would like though to only include certain parts of the source code. I know that certain parts of the ...
2
votes
0answers
100 views

How to write the signature of a method in LaTex?

I'm writing an article in LaTex about programming and I need to write the signature of a C++ method using a specific format, only the statement of the method, not the body. for example: void ...
2
votes
0answers
105 views

Different colours for each argument and value in listings

This recent question (Print blue brackets in one language and black in another) made me come up with (up to) two more questions regarding the listings package: Is there an option similar to opstyle ...
2
votes
0answers
153 views

Eclipse with texclipse code completion

I am using Eclipse with texclipse. Code completions are not showing up for some of the commands. For example: \mbox{}, \mathcal{} and for some others that i cannot recall at the moment. (If this ...
1
vote
0answers
37 views

Help identifying LaTeX code-style feature

The document below uses a feature I can't quite identify to display monospaced code-style font sections: Does anyone know how to achieve this effect?
1
vote
0answers
47 views

Inserting a stand alone code file using lstlisting

I am in the process of writing a report on a project and need to include the final code used in an appendix. The final code while not yet complete, is lengthy enough that I would like to just use ...
1
vote
0answers
203 views

Dummy code box in LaTeX

I am not used to work in TeX and I need to write a dummy code box like in this style. I am not entirely sure how to replicate this style. I found some code boxes, but not in this structure that I want ...
0
votes
0answers
38 views

Is it possible to use tikzmark inside minted?

As I've pointed out in a related question, I'd like to have some arrows pointing to parts of a source-code listing. I know this is possible with the listings package, but is it possible with minted? ...
0
votes
0answers
18 views

Pygments for markup of Lua source code - how to get styling information and the necessary macros using ``pygmentize``?

I wanted to use Pygments (specifically via the pygmentize tool) to mark up some Lua code for inclusion into a LaTeX document. Based on what I understand, pygmentize can either output a full document ...
0
votes
0answers
23 views

How to write “for” block with counter by Algorithmic package

How can I write a code like below using algorithmic package for (int i = 0; i < node.children; ++i) ..... I can't use foreach or forall because in a point inside the loop I should decrement i ...