The tag has no wiki summary.

learn more… | top users | synonyms

11
votes
1answer
1k views

listings package: no numbering in case the code has only one line

I have a custom style in lstlisting with numbers on the left and the number step is set every line. I would want to know how the listings could appear without number in case the listing has only one ...
2
votes
0answers
69 views

Using '%' at end of line [duplicate]

When browsing though LaTeX source code, I have noticed that many people put % at the end of a line or after closing brackets. I would like to know if there is any benefit in this practice. Moreover, ...
4
votes
1answer
94 views

Latex find formatted text and print it at the end of document

I am currently coding my interview transcripts for qualitative research by highlighting sentences in different colours (using soul and xcolor packages). So, I want to print all text which belong to ...
5
votes
1answer
125 views

“Listings” environment for GAP

I was searching the web for a possible environment where I can put my GAP (Groups, Algorithms, Programming) codes. The most promising I saw was the "listings" package. But to my disappointment, this ...
3
votes
0answers
108 views

Highlight LaTeX code and presenting results as in a manual [duplicate]

I would like to write a short guidelines of LaTeX for my students. In the spirit of some LaTeX manuals, I'd like to present the code and the result as follows, This example illustrate more or less ...
6
votes
1answer
236 views

Command for the table Ruffini-Horner algorithm

I am trying to code a command in LaTeX to type the tables used in the computation of the Ruffini-Horner algorithm. You can see in the Wikipedia link above that these are rather simple tables. There is ...
2
votes
0answers
859 views

Latex to HTML using Pandoc [closed]

I have a bunch of tutorials I have written and they are written in Latex. Now I want to convert them to HTML and to Blogger also. I heard about Pandoc and decided to try it. Below are my results : ...
9
votes
3answers
334 views

Which package should I use for doing a connecting homomorphism diagram like this in latex

which package should I use for doing a diagram like this in latex:
0
votes
1answer
108 views

LaTeX code for different choice [closed]

Could you please help me to find the LaTeX code that will gives the following result:
3
votes
0answers
253 views

What is a working python code snippet for escaping a string, so that it can be included in a tex file? [closed]

I'm using python to populate a tex template with arbitrary strings - and I would like to escape the strings so they're interpreted and displayed properly inside the tex file (rather than having them ...
4
votes
2answers
224 views

Is there a package for doing this in LaTeX?

I'd like to do something like this What would be the code? does it use a package for doing the $$f\mapsto f\circ \pi$$ part?
6
votes
1answer
381 views

Is there an alternative to LaTeX which isn't whitespace sensitive?

I have been using LaTeX for about a year now, and I quite like it. However, I like to space out my source code. In most languages, this doesn't cause an issue, as extra newlines don't affect meaning. ...
3
votes
1answer
99 views

Move the footnote text away from the footnote command in code

I have some text with a couple of footnotes in tables which I handle with the footnote package. The footnote text is very very long and it makes the code unreadable, it happened already that I had to ...
3
votes
2answers
142 views

Definition of constant in PSTricks

Consider the following example, which produces the same figure as here, but the code is generalized. Code % pdflatex -shell-escape test.tex \documentclass{article} ...
0
votes
1answer
134 views

What's the difference between $$ $$ and \begin{equation} \end{equation}? [duplicate]

I don't know the difference between $$...$$ and \begin{equation}...\end{equation}. What's the difference between $$...$$ and \begin{equation}...\end{equation}? \begin{equation*}...\end{equation*}?
5
votes
1answer
111 views

Is it possible to use the listings package incrementally in beamer?

Given a frame that has code rendered in a \begin{lstlisting}...\end{lstlisting} environment, is it possible to use beamer's incremental frame building feature to highlight code snippets? Here is an ...
4
votes
2answers
500 views

Change theorem counter in Springer template

I used Springer template for my book, more concrete I used svmono. Here is a MWE, that is the shortened version of my template file. ...
1
vote
0answers
85 views

Listing not handled as a float in SIG ACM document type [closed]

My document starts with \documentclass{sig-alternate} \usepackage{listings} and it includes listings like this: \begin{lstlisting}[label=samplecode,float=tb,caption=My super code] // code ...
3
votes
1answer
992 views

How to include Maple code in LaTeX?

At here Fanciest way to include Mathematica code in LaTeX we can include Mathematica in LaTeX. I want to include the code restart: with(geom3d): eqS:=Equation(sphere(S,(x-1)^2 + (y-1)^2 +(z-1)^2 ...
3
votes
1answer
326 views

LaTeX code for some geometrical object in Springer template

I used Springer template svmono for my geometry book. However, some LaTeX code did not display correctly. In my case, that is the \vec and \neq command. I want to write the vector so I use \vec for ...
2
votes
1answer
561 views

Rename text string for “definition” environment

I want to use LaTeX in my book, which is written in my native language. Despite of using may native language package, the definition command in the template still gave the result: definition, not the ...
1
vote
1answer
129 views

lst include has first line indented [duplicate]

When I'm including a source file, by way of \lstinputlistings{file/path/to/file} However, This results in the following below: Why is the first line not being formatted correctly? And how do i fix ...
1
vote
1answer
224 views

lstlisting: how to align highlighted code

I want to define a couple of new commands in order to highlight parts of my code (this is actually for a trace dump, not for a programming language). My problem is that I can't seem to make the ...
5
votes
1answer
447 views

How to make my own LaTeX template?

Ok I know that my question is quite local, however, I have struggled with it for a long time and I could not find the answer, so I decided to post it here. I have to rewrite a book (which was written ...
2
votes
1answer
815 views

Syntax highlighting for different programming languages [duplicate]

In my paper I want to include some source codes with colored sytax. For syntax highlighting I use the listings package: \lstset{frame=tb, language={[Visual]Basic}, aboveskip=3mm, belowskip=3mm, ...
0
votes
0answers
33 views

Font used in text, appears like code [duplicate]

Does someone has an idea of the font used in the text in the image:
7
votes
1answer
722 views

How to make LaTeX code from the pdf file?

I am now on a project on translation a book from English to my native language. I always tried to do it as nearest to the orginal book as possible, and I used LaTeX for that. But my attempt failed, ...
3
votes
1answer
204 views

Minted shows formatted tex code instead of intended source

I use WinShell with PDFLatex on Windows 7. I managed to install Pygmentize and compile the minimum example without errors: \documentclass{article} \usepackage{minted} \begin{document} inline: ...
9
votes
2answers
512 views

Two code blocks working syncronously

I need two code blocks in my beamer frame. One will be the code and other will be the output for each line of code. I want to uncover each code line and corresponding output line. So, first it will ...
15
votes
2answers
4k views

\listings code style for HTML5 (CSS, HTML, JavaScript)

I would like to create a code style for HTML5 that can be used with the \listings package. An HTML5 document consists of three languages: CSS, HTML and JavaScript. That makes the whole thing a bit ...
2
votes
1answer
100 views

How to put R code into a parameter of a newcommand?

I would like to put R code into a parameter of a newcommand in LaTeX. To do it, I make the following: %Define the newcommand: \newcommand\solution[1]{\sf #1} %Then, after the \begin{document}, I ...
7
votes
2answers
4k views

Insert Bash code with coloration into my latex report

I am writing a long report and I need to include some codes I programed. I would like present my code with coloration, as we can have in some text editor (and not using verbatim). I need the ...
5
votes
1answer
330 views

Problem formatting java code in my latex document (overshooting the page)

My code is being formatted in a way that makes it drift off the page when it's too long rather than just jump to a new line. I have tried lots of different things, pasted all kinds of examples from ...
2
votes
1answer
307 views

Java Code in a paper

I am writing a paper and would like to include some of my "real-world" Java code. What is the best way to accomplish this? I would like to see two templates: My explanation to the right of my Java ...
4
votes
2answers
87 views

Problem in code for inserting the Figures and Tables in top of next page [duplicate]

Possible Duplicate: How to influence the position of float environments like figure and table in LaTeX? How I can set up the figure and tables to capture them in the next page. I have a ...
2
votes
1answer
3k views

Latex Code for curly H used for Hausdorff dimension

Does anybody know the LaTeX Code for curly H used for Hausdorff dimension.
55
votes
6answers
2k views

How bad for TeX is omitting braces {}, even if the result is the same?

Sometimes writing braces and omitting them produces the same result: \tilde{\psi} \mathrm{e}^{\mathrm{i} \pi} vs \tilde \psi \mathrm e^{\mathrm i \pi} Or (taken from Werner's comment below) ...
0
votes
1answer
488 views

\texttt converts apostrophe to Unicode quotation mark [duplicate]

Possible Duplicate: How to make a real apostrophe or single-quote in LaTeX I'm building a Python Regex cheat sheet using Latex, which has the following line: ...
1
vote
0answers
63 views

Editor for ConTeXt [duplicate]

Possible Duplicate: ConTeXt editors I am searching for a "good" ConTeXt Editor (with engine LuaTeX) for Win7. With LaTeX and pdfTeX I used TeXstudio, but there is no syntax highlightning ...
2
votes
1answer
563 views

Latin Extended: Latin Capital Letter A With Stroke

Latin Capital Letter O with Stroke is working but how about if I'm using another Letter like A, B, C to Z. \documentclass{article} \begin{document} {\O} %replacing the O with different letter is ...
2
votes
0answers
437 views

Insert a block comment title in Kile [closed]

I would like to know whether it is possible in Kile to define a script to insert a centered commented block. I often mark different parts of my code with those kind of titles: ...
1
vote
1answer
179 views

Can't define fixed-width font with TexShop, fontspec

I've used Alex Hirzel's code to enable code snippets in LaTex articles: The problem is that I can't set the font to a fixed-width one. Whenever this line is commented out: %\fontspec{Courier New} ...
2
votes
1answer
1k views

insert MAPLE algorithm to LaTeX

I am writing my dissertation through LaTeX, and I want to insert the code from MAPLE, it is about 2 pages and I am not sure how to include the algorithm, do you have any idea how am I going to do it?
8
votes
2answers
6k views

Code Snippet IN Text

How do I show a code snippet directly in my text? I dont want to have an extra box for it like lstlisting or verbatim provide it. My example may should look like this: The class List.class is... ...
8
votes
2answers
2k views

Which package to use for writing algorithms?

I am looking for a package that will allow me to write pseudocode of algorithms. The pseudocode may include mathematical symbols, like \forall, \in and subscripts. But I would like also to "talk" ...
7
votes
3answers
1k views

How to properly display backticks in verbatim environment?

I am preparing a beamer presentation where I need to display some markdown code involving backticks. Specifically, I want to show backticks in the verbatim environment. However, LaTeX renders them as ...
4
votes
2answers
818 views

minted doesn't escape LaTeX code inside python docstring

How can I get minted to escape LaTeX code inside docstrings? Should I use some switch? \documentclass[a4paper,12pt]{article} \usepackage[italian]{babel} \usepackage[T1]{fontenc} ...
1
vote
0answers
54 views

How can i write the code of Pascal's triangle? [duplicate]

Possible Duplicate: Pascal's triangle in tikz How can i write the code of Pascal's triangle? Pleae help me.Thank you.
3
votes
1answer
345 views

Highlighting changes in code

I want to print code, preferably syntax highlighted, and then combine this with a diff where the included code is the newer version of the code. I want lines that have been added or changed to be ...
3
votes
1answer
520 views

New line in code with no white space in output?

I would like to put my \footnotes{} on a separate line in code, to make code easier to maintain and read. But I don't want any whitespace in between the foot note, and the preceeding word in the ...