latex

Convert rst to latex, problem with tables

I have some .rst files and I convert them to .tex file using standard sphinx converter. In some .rst I have tables with special width like: .. list-table:: :widths: 50 50 The resulting .tex always contains tables like: \begin{tabulary}{\textwidth}{|L|L|} So, the column width is lost. How can I preserve column width when c...

\geqslant Undefined control sequence in Latex

Hi, When I compile the following latex code: \begin{align} f_{m}(x) = c_{1,m} \times I(x_{i}^{m} \geqslant t_{m} ) + c_{2,m} \times I(x_{i}^{m} < t_{m} ), \end{align} I always get an error: ! Undefined control sequence. <argument> ..._{1,m} \times I(x_{i}^{m} \geqslant t_{...

subfig package in latex

Hi, When I am using subfig package in latex, it gives some errors: Package subfig Warning: Your document class has a bad definition of \endfigure, most likely \let\endfigure=\end@float which has now been changed to \def\endfigure{\end@float} because otherwise subsequent changes to \end@float (like done by several pack...

bibtex and label/ref

Hi, I was wondering how I can add \label into bibtex so that when I cite in my document and I can also \ref to it by clicking it and jumping to the Bibliography at the end? for example: @inproceedings{Boser92atraining, abstract = {A training algorithm that maximizes the margin between the training patterns and the decision bo...

How to label each equation in align environment?

Hi, I wonder how to label each equation in align environment? For example \begin{align} \label{eq:lnnonspbb} \lambda_i + \mu_i = 0 \\ \mu_i \xi_i = 0 \\ \lambda_i [y_i( w^T x_i + b) - 1 + \xi_i] = 0 \end{align} only label the first equation and only the first equation can be referred later. Thanks and regards! ...

How to keep material on one double page in latex ?

I have two side document(so I use twoside option) in latex. I need to keep some material(text, pictures...) on one double page. In another words I want to allow page break from odd to even page but I want to prohibit breaks from even to odd page. I tried to write macro: \newcommand{\nl}{ \\ \ifodd\c@page \relax \else \nopagebreak \fi} ...

number several equations with only one number

Hi, How can I number several equations in a align environment using only one number? For example \begin{align} w^T x_i + b \geqslant 1-\xi_i \text{ if } y_i=1, \nonumber \\ w^T x_i + b \leqslant -1+\xi_i \text{ if } y_i=-1, \end{align} The numbering will appear next to the second equation. But it would be better if it appears betwe...

Rowcolor on a multirow tabular in LaTeX

So I tried learning LaTeX last night, and I trying to get this template for school assignments done ASAP. Part of that requires building a table. I want to use multirow, but need the multirows, that are acting like headings, to be colored gray. This is what I created so far from the almighty Google. % My Simple Table Example \docume...

How do I change the block template for specific theorem environments (LaTeX beamer)

The amsthm theorem environments (theorem,example,proof,solution,...) make blocks on beamer slides. The default is that example environments use a different template (block example) than theorem or solution or proof (block). How do I make solution use a different template like "block solution" that I can define? Edit: Thanks to those w...

Is there unresizable space in latex? Pictures in good looking grid.

I've created latex macro to typeset guitar chords diagrams(using picture environment). Now I want to make diagrams of different appear in good looking grid when typeset one next to each other as the picture shows: The picture. (on the picture: Labeled "First" bad layout of diagrams, labeled "Second" correct layout when equal number of ...

How can I write a Template.pm filter to generate PNG output from LaTeX source code?

I am looking for a way of generating PNG images of equations from LATEX source code embedded in templates. For example, given: [% FILTER latex_display ] \begin{eqnarray*} \max && U(x,y) \\ \mathrm{s.t.} && p_x x + p_y y \leq I \\ && x \geq 0, y \geq 0 \end{eqnarray*} [% END %] I would like to get the output: <div class="latex display...

Presentation with latex, changing the width in each frame

Hello, In my presentation, I use \usetheme{Warsaw} and in order to increase the usable space in each frame, I use \useoutertheme{infolines}. In this way, the bar at the bottom of each page is equally divided between author's name, title, and date and slide number. Is there anyway to change the width of each section? For example, I need ...

LaTeX beamer presentation-package 16:9 aspect ratio?

I'm programming a presentation in LaTeX using the beamer package. However, it defaults to 4:3 aspect ratio slides, while everything I use is 16:9 -- is there an easy way to change this using a command or two? Thanks! ...

Problem with creating a newenvironment in LaTeX

I am trying to implement this new environment in LaTeX: \newenvironment{javacode}[2] {\begin{lstlisting}[language=java, label=#1, caption=#2]} {\end{lstlisting}} And then use it like such: \begin{javacode}{c}{some code} int x = 5; \end{javacode} But I am getting the following error: Overfull \hbox (6.0pt too wide) in paragraph at ...

bold small caps with mathpazo

The URW Palldio font (mathpazo package) does not provide bold small caps. To get round this issue, I'd want to make a macro to use small caps usually and normal caps in bold text. I tried this code: \documentclass{minimal} \usepackage[sc,osf]{mathpazo} % Use small caps normally except in a bold font: switch to uppercase instead. % Thi...

Formatting Objective C code using listing in LaTeX

I am wondering how one is supposed to format Objective C code using the listings package of LaTeX? I know that the language supports C (Objective) , so how do i set this in the \lstset language option? Thanks ...

Classification shown as "Classifi cation"

Hi, The following latex code: \subsection{Classification Performance} is shown something like 5.3.3 Classifi cation Performance There seems to be some gap beteen "Classifi" and "cation". Is it a problem? Thanks! ...

LaTeX beamer free-flowing two column?

So in standard LaTeX, there is \twocolumn, where I can just type text, and it'll go down the left side of the page, then continue at the top of the right side of the page. Now, I know that inside of a Beamer frame, I can manually create two columns, of various width, with text in them -- however, is there a way to have the text freely f...

latex list environment inside the tabular environment: extra line at top preventing alignment

Hello good people of stackoverflow. I have a LaTeX question that is bugging me. I have been trying to get a list environment to appear correctly inside the tabular environment. So far I have gotten everything to my liking except one thing: the top of the list does not align with other entries in the table, in fact it looks like it adds o...

LaTeX beamer: way to change the bullet indentation?

I've checked the Beamer Class manual (PDF file). I can't figure out how to change the indentation bullet assigns to \itemize. [This is kind of important, as I'm using 2 column slides, and I don't want beamer to steal too much horizontal space]. ...