latex

LaTeX top row on a stem and leaf plot table

Hi I am trying to represent a stem and leaf plot in a tabular environment in LaTeX using the following: \begin{table}[htbp] \centering \caption{Stem Plot of sit ups, Key: $1 | 1= 1.1$} \begin{tabular}{r|l@{\hspace{4 pt}}l@{\hspace{4 pt}}l@{\hspace{4 pt}}l@{\hspace{4 pt}}l@{\hspace{4 pt}}l@{\hspace{4 pt}}l@{\hspace{4 pt}}l@{\hsp...

Latex code for adjusting attributes of hline (color, dashed), and/or attributes of vertical lines in table

I want to color hline; e.g., \hline[color=red,width=2mm,dashed] or something. Below is a feeble attempt which fails. not I put textcolor gray around {|} to try and make it gray. Ideally, I want it gray and dashed. Also note textcolor gray around the {\hline} tag. Any help would be appreciated using latex syntax. Are there attribute...

LaTeX listings: different counters for different listing environments

How do I create two lstlisting environments that each have its own counter? If I use for example \lstnewenvironment{algorithm}[2]{ \renewcommand\lstlistingname{Algorithm} \lstset{ ... } } {} \lstnewenvironment{program}[2]{ \renewcommand\lstlistingname{Program} \lstset{ ... } } {} And then \begin{algorithm}{Algorith...

How to preserve quotes in BibTeX

I'm new to LaTeX and BibTeX, so excuse my ignorance. I have the following entry: @Article{Hart, author = {P.E. Hart, N.J. Nilsson, B. Raphael}, title = {Correction to \"A Formal Basis for the Heuristic Determination of Minimum Cost Paths\" }, journal = {SIGART Newsletter 37}, year = {1972}, pages = {28-29} } But this comes out as a ca...

Is it possible for SymPy to render LaTeX for use in a GUI?

Hello all, I am hoping to use PyQt to produce an application that will display an equation entered by the user. I had considered matplotlib, but this seems like overkill as I would only be using it to render the latex. I need to use SymPy anyway, so I was hoping there would be a way to use it to do the rendering also, preferably produc...

accented characters in latex.

Hi everyone, I am writing a document in spanish, and I'm trying to add 'í' to the word Montréal.However if I put the i like this: \'{e} in the code below, I just get a space instead of the é. Why is this not working? \begin{tabbing}% \hspace{2.3in}\= \hspace{2.6in}\= \kill % set up two tab positions {\bf Engineer}\> ...

LaTeX: Lstlisting automatically recognizing code passage

Hello, I am writing a program (in C, but I suppose that's not so relevant) in connection with a little documentary material in LaTeX. I want the documentary material to contain code snippets from my original code. In order to include source code and keep it up to date, I do the following in my document: \lstinputlisting[firstline=200,...

How do I ref a figure in LaTeX before it occurs?

I always like my figures to be placed in between text as opposed to the top or bottom of the page. I also like to talk about the figure before it is shown. So I am trying to have something like this: By looking at Figure~\ref{fig:VCO} you can see that blah blah blah. \begin{figure}[h] \caption{VCO test circuit}\label{fig:VCO} \begin{ce...

Using latex2rtf with scons.

I have scons set up to run pdflatex nicely on my latex documents and stick the results in an output folder for me. However, I haven't been able to determine whether or not I can get it to use latex2rtf on my documents at the same time as well. Is there any way to have scons do this automatically? Or is it going to have to be something ...

How to enable circle symbol as slide transition symbol on the header of LatexBeamer

Does anyone knows how to enable the circle symbol (slide transition) in the beamer theme Darmstadt such as http://www.maths.dundee.ac.uk/~dfg/icms09/beamer-handout.pdf Thanks. -jo ...

LaTeX: Use some characters in a string

Hi: I need a macro that extracts pairs of number from a string that looks like this: n1-m1,n2-m2,n3-m3,n4-m4 (it could be longer) where n1,m1,n2,m2,... are numbers from 0 - 15. How can I go about getting the pairs (n1,m1), and (n2,m2), (n3,m3), etc inside my macro? I will need to use each pair once, after which I can, if needed,...

Is there a way to get LaTeX to place figures and tables in the order they are referenced in the text?

I think this question is novel. Here is the problem I have. I have a relatively short piece of text associated with a lot of figures and a table. I want floats to appear on pages just for floats but in the order I specify. I have set all of the table and figure parameters to [hp] and placed them in the order I want them to appear in the ...

How to load latex .sty files from a subdirectory?

I use some .sty-files that are not part of texlive and want to have them in a subdirectory of the folder with my main.tex. I used the following line to load the package: \usepackage{sty/prettythesis} This works, but compiling the main.tex with xelatex and using rubber gives me a warning: sty/prettythesis.sty: You have requested packa...

Modular arithmetic on node names in TikZ?

Say I want to construct a circulant graph in TikZ, with a variable number of nodes, labelled v0, v1, ..., v_n-1 for some n of my choice (say, 5). I'd like to be able to use the \foreach command in TikZ to iteratively (1) define the nodes, and (2) connect the nodes. I'd like to be able to connect v_i to v_(i+1) and v_i to v_{i+2}, say. ...

PDF forms with LaTeX: how to create \TextField of exactly 4in width?

I'm using PDFLaTeX to create forms and ran into a problem with the \TextField macro that defines input fields: \TextField[width=4in,name=sample]{} The resulting field is a little wider than 4 inches and I don't understand why. The following example illustrates the problem by resulting in an overfull hbox which gets highlighted because...

LaTeX: space after every letter

I want to define a LaTeX command that inserts a space after every letter. So, If I add \addSpaces{someText} the result should be s o m e T e x t How could I achieve this? Background: I want each letter to be underlined, but the line should be separated between the letters: s o m e T e x t _ _ _ _ _ _ _ _ NOT: s o m e T e x t ...

sphinx.ext.pngmath raise an error when I try a simple expression

I'm using Sphinx to create the documentation of my project. I want to use the extension sphinx.ext.pngmath and with this little test: Returns the indefinite integral of the polynomial *poly*: .. math:: \int p(x)dx I got the error: WARNING: inline latex u'\\int p(x)dx\n\n': latex exited with error: [stderr...

Latex, having two lists of something on the one page

Hi all, I am writing my thesis right now and I have fallowing problem, I have couple of lists. List of figures, list of algorithms, list of listings... etc. Most of them are very short, but each of them takes whole page. So I have couple of lists which only list few things on one page, and the rest of the page is blank. How can I put t...

Latex error: extra alignment tab has been changed to \cr

I am using ACM SIG template and trying to create a table of 4 columns. I get the error mentioned in the title of the question. I know the standard reasons why this error can occur. But my question is:- Is it possible that the template or .cls file is controlling the maximum number of columns in a table ? It it were, would I get a dif...

first line number in lstinputlisting enviroment

I use the following code to display line 23-45 of sort.cpp \lstinputlisting[language=C++,linerange=23-45]{sort.cpp} but the line number start with 1 while I want it start at 23.I read some reference and change to \lstinputlisting[language=C++,linerange=23-45,firstnumber=23]{sort.cpp} It works.And I want this the default setting.Ac...