The tag has no wiki summary.

learn more… | top users | synonyms

0
votes
0answers
40 views

Latex printing of Code 3of9 [on hold]

HELP! I need to be able to print out Code 3of9 through LaTex. I have the makebarcode.sty file, and have run the 'install-tl'.... So far nadda, I still can not get a 9 digit number to print out in ...
3
votes
1answer
60 views

Non-curly quotes in code?

Here is a quick question, how to use tex to print this ' symbol? An example is shown below: data 'a list = Nil | Cons (e, 'a list) I tried to use ' or `, but they all looks bad.. I am sorry but I ...
3
votes
1answer
26 views

Backwards quotes in embedded C code

I used the csquotes package to make all double quotes curl the right way in the body of my document, but in the embedded code it doesn't work. I tried the slanted quotes and they don't work either. ...
2
votes
1answer
18 views

bound width of a single lstlisting to one column inside a two column IEEE template

I use IEEE double column template and inside it I add a C++ code. I expect the code to be bounded within a single column however it infringes to the next column. How to fix this code? I would avoid ...
9
votes
1answer
590 views

What is this code fragment for?

Taking a look at the code of the package ifxetex, I found the following: \begingroup\expandafter\expandafter\expandafter\endgroup \expandafter\ifx\csname ProvidesPackage\endcsname\relax\else ...
2
votes
0answers
46 views

How to transform a mathematical expression from LaTeX code to Maxima code?

How to transform a mathematical expression from LaTeX code to Maxima code? For example, convert \frac{8x^3-4x-2}{2x} in LaTeX to (8*x^3-4*x-2)/(2*x) in Maxima, but automatically.
0
votes
2answers
110 views

How to include lambda calculus code in LaTeX?

What is the best way to include lambda calculus code in LaTeX (like in Courier new font), especially one that allows for the use of math symbols as well like $\lambda$ throughout the environment. For ...
2
votes
1answer
58 views

Maple 18 output in LyX

I have the following problem: I want to import the outcome of solve(b^4-(2-d)*b^2-2*d*b+d+1 > 0, [b], parametric), which is a maple code, into Lyx. Even though I managed to export the solution of ...
5
votes
1answer
87 views

Not colored digits after characters in lstlisting code

I am writing a LaTeX document with Verilog code and I would like to have colored digits in these occasions: simple digits (for example # 30) bus (for example [3:0]) binary or hex representation ...
4
votes
2answers
75 views

This tikz-diagram has crooked arrows

Consider the diagram arrows in the following example: \documentclass[a4paper,10pt,psamsfonts]{amsart} \usepackage[utf8x]{inputenc} \usepackage[T1]{fontenc} \usepackage[english]{babel} ...
2
votes
1answer
50 views

Lyx code tag with highlighting for C

I just installed Lyx and when I try to insert the program I observe that there is no syntax highlighting. What is the best way to allow for syntax highlighting in LYX?
1
vote
0answers
27 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 ...
3
votes
0answers
38 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} ...
0
votes
1answer
43 views

Replicate pseudocode

I was looking for some LaTeX code to replicate the result shown on the image below. This image is taken from the book "Temporal Verification of Reactive Systems - safety"
4
votes
1answer
122 views

Changing ( and ) to \left( and \right)

Are there any plans to have the LaTeX automatically read all ( and ) to automatically become \left( and \right)? If so, then when can we expect the update?
0
votes
0answers
28 views

Line breaks in source code [duplicate]

When composing an article in LaTeX, where is it appropriate to break lines in the code? An easy (and adequate) answer is, 'Wherever you like,' but is there a commonly accepted standard (e.g., after x ...
1
vote
1answer
27 views

How to except code blocks from csquotes smart quoting?

\LaTeX newbie here. I figured out that csquotes can be used to automate smart curly quotes, and have added this to my preamble: \usepackage{csquotes} \MakeOuterQuote{"} This has the effect of ...
3
votes
1answer
65 views

Necessary package for “codeexample”

What is the necessary package for \begin{codeexample}[] \end{codeexample} In latex? When we use this?
6
votes
1answer
88 views

Highlight code with squared brackets

I want to show some .ini file in my work. The ini file works with squared brackets. I try to use \lstdefinelanguage but I can't handle it. That is what I try before and in my understanding it should ...
2
votes
1answer
59 views

Tabular inside listings

I'm trying to get this with this style but I'm getting the error ! Misplaced \omit. \multispan ->\omit \@multispan Here is a MWE: \documentclass{article} ...
5
votes
2answers
202 views

Is it possible to insert C++ code into LaTeX?

I mean C++ doing some calculation not inserting the code as a text.
0
votes
1answer
69 views

Can I make IPython notebook from PythonTeX ?

Let's example like this : \begin{ipythonconsole} 1+1 \end{ipythonconsole} then I will get the result like this : In[1] : 1+1 Out[1] : 2
0
votes
0answers
17 views

Inserting code - Beamer [duplicate]

I used to use lstlistings to insert code in LaTeX... It doesn't seem to work with beamer class, though. So... Is there a cool environment where I can insert code (I'm using c++) and set formating, ...
6
votes
1answer
187 views

IPython Notebook cells with listings

I would like to include in my document some code examples that look like the IPython Notebook cells in this image: I have produced something that looks a bit like it with the code below: ...
3
votes
1answer
84 views

Greek Text (babel) and English Code Text (listings): Problem

I use the babel package in order to write in greek with font "kerkis". I want to add code in english ("courier new" font) to my latex document but I get some difficulties. Can anybody help me, ...
4
votes
1answer
51 views

Shorthand for \lstinline{ … }?

I'm finding that I need to use \lstinline{...} a lot. I rather like the way that SX does inline code. Just enclose in back-ticks. Is this functionality available in LaTeX, or is it possible for ...
0
votes
1answer
70 views

Detecting (another) sub-minipage inside an encapsulating minipage?

Is it possible to detect if a minipage is present in an encapsulating minipage? Let me expand on that: I have a float environment which, simplified, can be defined by ...
1
vote
1answer
61 views

How to install a package written by myself? [duplicate]

I have a question. How can I install a package written by myself with MikTeX? I first made a .txt file than I wrote my package (code) in there. Then I renamed the .txt file to .sty . What should I do ...
3
votes
2answers
90 views

including a C++ code in my latex document

I am trying to include a C++ code in my latex document. However, what I have tried is not working. Everything else works fine, but I am not seeing the C++ showing up as a C++ code. It is just written ...
1
vote
1answer
104 views

How do I highlight a block of source code in LaTeX?

I have many blocks of source code in my document (each of them is at least 40 lines). I would like to format parts of these code blocks, preferably with some annotations on the right. I was thinking ...
3
votes
1answer
81 views

Cannot see colors in LaTeX output - lstlistings

Can you give me some help? In the following I only see black text, although I set lots of things with different colors... Why isn't this working? \documentclass[10pt,twoside,a4paper]{article} ...
3
votes
3answers
164 views

Enclose Code in Latex with single user-defined command

I am using the following to enclose my code in a box and I like the formatting but I have the problem that everytime I have to write a lot of stuff. Before the begin{document} I have defined: ...
2
votes
1answer
445 views

How to set up listings for use code from Arduino?

Well, I'm creating notes from a course of Arduino in LaTeX and I was reading about the listingspackage and I want to use it with the code of the exercises of the course. I know Arduino uses a language ...
0
votes
0answers
49 views

A problem about typesetting Mathematica code [duplicate]

I want to typesetting the words as below: My code: \documentclass[b5paper,UTF8]{article} \usepackage{graphicx} \usepackage{geometry} \usepackage{fancyhdr} ...
6
votes
1answer
137 views

Weird overful vbox message when code and image are overlaid in beamer

See the following code. The first two frame contents (first one code, second one image) do not produce any overfull vbox message. \documentclass{beamer} \usepackage{filecontents} ...
1
vote
1answer
62 views

'Errors' using the minted VHDL environment

I recently started university, and was annoyed to find out, we had to do our reports and assignments in LaTeX... until I learned how to use it! I went from hating it to loving it in one day. :) But ...
7
votes
2answers
117 views

Reuse command portion in LaTeX

I defined several new code environments (using listings' lstnewenvironment); they all share the same attributes except one (the language used). For example: \documentclass[a4paper,12pt]{book} ...
2
votes
2answers
65 views

How can a verbatim environment be centered using a basic LaTeX installation?

I want to centre some verbatim text in a reasonable way using only a basic LaTeX installation, i.e. the packages listings and fancyvrb are not available. \documentclass{article} \begin{document} ...
2
votes
1answer
53 views

htlatex inserting environment in verbatim

I want to get htlatex to put some text into my HTML file verbatim. The problem is that it keeps redo-ing my spacing. So, for example, I use a cf.cfg like this. \Preamble{html} \ConfigureEnv{tawny} ...
2
votes
2answers
107 views

Where to find the family code for a custom font

Is there a reference list for the encoding of fonts in LaTeX? A place where one can search for a specific font and get the relevant code that represents it. Some of them are not even logical, for ...
3
votes
1answer
315 views

How can I replicate the syntax-highlighting style of the Kate editor?

I am trying to add a java and c++ code in a LaTeX document. I am using listings package and I will define a different style for each language using \lstdefinestyle{myStyle}{<options>}. What I am ...
1
vote
1answer
85 views

Turning off/on numbering when using mcode

I have an appendix with a full Matlab script, quoted verbatim, numbered and coloured as I want. However, I want to quote about 10 lines of it as a figure in the body of my report, and since I will ...
0
votes
1answer
135 views

How to force wrap MATLAB code

I'm including a MATLAB script as an appendix in a report I'm writing, I'm using mcode to import it, but some of the lines are longer than the width of my paper. In my master document I have: ...
0
votes
1answer
366 views

How can I include the R source code in the appendix?

I really have no idea how to include the R code into latex, so I only can provide my R code. I would like to put it in the appendix. I am really looking forward to your help. Thx! The codes will show ...
1
vote
0answers
128 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 ...
5
votes
1answer
187 views

Apostrophe breaks comments in lstlisting

I defined a command to simplify the writing of code listings of (pseudo-) C code: \lstdefinestyle{c}{ language=C, basicstyle=\small\sffamily, numbers=left, numberstyle=\tiny, frame=L, ...
1
vote
0answers
46 views

How can insert a full-width listing in a two-column document? [duplicate]

I'm new to LaTeX; I'm using IEEE format. How can I effectively add Java code snippets in one full-width column?
5
votes
1answer
180 views

Correctly highlighting custom html tags in listings

Problem statement I have several code listings containing HTML markup in my latex files. These listings contain multiple custom html tags (created in combination with corresponding AngularJS ...
2
votes
1answer
88 views

How to only have similar font in latex to that of a Mathematica codes

After I used the answer posted to this question of mine: How to show similar display of codes of different programming languages in LaTeX, it seems that the package and styles I use have problems with ...
2
votes
1answer
42 views

How to page break a code print in a latex document into more pages instead of one

After this question How to show similar display of codes of different programming languages in LaTeX which prints a code in a standalone pdf document (for instance 1000 lines of code in only one pdf ...