latex

latex - getting specific problem number

i wanted to do the following... Problem 3. in latex i use the following \newtheorem{prob}{Problem} \begin{prob} ... \end{prob} it starts as follows Problem 1., is it possible to to Problem 3. instead,... can you show me how? thanks a lot! ...

Vim: How to reformat a set of lines into a single line (if the line is a single sentence)?

Not a dup of http://stackoverflow.com/questions/391710/in-vim-what-is-the-simplest-way-to-join-all-lines-in-a-file-into-a-single-line, as I specifically mean to use the gq reformating functionality. I used to write latex in vim using 80 character textwidth. However, I've now switched to an infinite textwidth, so my lines go on forever. ...

Vim: make gq treat '.' as the end of a sentence.

Related to vim-how-to-reformat-a-set-of-lines-into-a-single-lines-if-the-line-is-a-single I'd like gq to treat a '.' as the end of a sentence in latex. Combined with a high value of tw, the intention is automatically reformat a paragraph into a list of lines. (FYI, this is a much nicer way to edit latex, if you are wondering) ...

Hyper reference links in Latex document starts from the beginning of the page

Hi, I have a latex document. I am using hyperref, makeidx and glossary packages for my document. Every thing is created fine; table of content (all references works nicely), glossary and index except that page numbers printed in the glossary and index are correct but they point to page numbers starting from the beginning of the documen...

Visual Studio C# disable unicode or utf-8 as file encoding and use ASCII instead.

Hello *, I am currently working on some LaTeX document which embeds C# files generated by Visual Studio 2008. My problem is that these files are encoded in UTF-8 with BOM. This causes LaTeX to produce output similar to the output described in this post: Invalid characters in generated latex sources in Doxygen? I know that I can use a t...

Latex sequence \/ ?

This is probably very simple but I couldn't find anything about in the usual latex guides. In this phrase: {\em hello\/} what is the purpose of the "\/" ? ...

How to insert a .latex figure in a latex file

I tried doing: imports: \usepackage{color} \usepackage{epsfig} figure code: \begin{figure}[htbp] \begin{center} \psfig{file=filename.latex} \caption{caption} \end{center} \end{figure} It says: ! LaTeX Error: Cannot determine size of graphic in filename.latex (no BoundingBox). ideas? thanks ...

Passing command-line arguments to LaTeX document

Sometimes, I define new commands such as the following. \newcommand{\comment}[1]{\textbf{#1}} %\necommand{\comment}[1]{\emph{#1}} The above commands enable me to change the style of parts of my code all at once. If I want to generate both of the possible styles, I have to compile my LaTeX document two times each time modifying the sou...

LaTeX: How do I know to stop building (programatically)?

I'm trying to build a continuous builder for my latex document, which calls latex and bibtex the appropriate number of times. It checks the myfile.fls file for all the inputs, so it seems I know what all the inputs are. But how can I tell when to stop iterating? It is enough that none of the inputs change? Note that the input files incl...

latex tabular vertical alignment to top?

I'm trying to create a simple tabular with two cells of text and two images below them like so: \begin{tabular}[h]{ c | c} \emph{Normal} & \emph{Cone} \\ \includegraphics[width=0.39\textwidth]{images/pipe1} & \includegraphics[width=0.61\textwidth]{images/pipe2} \end{tabular} The first image is shorter than the second and I want ...

No newline after (sub)section?

I want my text to appear right after the call to \subsection{Name} but I can't find how to do it. I'm using the article class. An example of command: \subsection{a)} Blah blah bla... produces: a) Blah blah bla... instead of what I want: a) Blah blah bla... Anything I could do? Thanx a lot! ...

LaTeX: How to adjust how the Sum symbol turns out

Not sure if LaTeX counts as programming, or if my question even makes sense, but I have this LaTeX expression (or what you call it): \sum_{k=1}^n k^2 = 1+4+9+\ldots +n^2 = \frac{1}{3}n^3 + \frac{1}{2}n^2 + \frac{1}{6}n The problem is that the k=1 and n comes next to, i.e. after, the sum symbol, instead of above and below it. Is there ...

Example box with automatic numbering in LaTeX?

Working with LaTeX, I was just wondering how do you create a box around a set of related text such as an example in a textbook? I found \framebox or \makebox, but I can't figure out how to make it auto number such as Example 1.1 (for first example in chapter 1), or even manually add to it. ...

Latex: kerning between footnote marks and punctuation marks.

Not the same as "footnote spacing in latex". When I add footnotes in latex, there is often a little bit of space due to the punctuation mark before them: I can't help but feel this might be a little bit nicer if the footnote mark was a tiny tiny bit to the left, sort of like kerning. Any ideas how to do this? Especially if it automat...

How to explicitly end a \part in LaTeX with hyperref

I have a LaTeX document which contains the following: \tableofcontents \chapter{Chapter One} \part{Part One} ... \part{Final Part} \chapter{Final Part Chapters} \chapter{Chapter not Part of Part} When I compile this to a PDF with hyperref, the last chapter is included as part of the final part in my bookmarks. (I'm including hyperref ...

EBNF for math equations and inequalities

I would like to design a math language satisfying EBNF, to let me write equation systems and inequalities as close to natural math language as possible. I would like to have two parsers for this little language, one parser prepares the equalities/inequalities written in this language for publication, another parser prepares it for comput...

LaTeX numbering?

I have a problem with theorem numbering in LaTeX. It numbers theorem 1 from section 1 as theorem 11 instead of theorem 1.1. How do I make it work? ...

Way to include text in beamer presentations that is shown at handouts but not at the slides

Hi, is there some nice way in Beamer presentations (Latex) to include text (own remarks) that wouldn't be shown at the slides but would be printed with the handouts (little bit like the comments with Powerpoint? br, Touko ...

How to draw borders around slides in latex beamer handouts

I am using the LaTeX beamer package. How do I draw a border around each slide when I use the handout format (eg. {4 on 1}). I would like to have something silmilar to the "-d" option available in Unix "psnup" which I used with my old seminar style slides and PostScript output. ...

latex newenvironment label

I have the following newenvironment command: \newcounter{algoctr}[chapter] \setcounter{algoctr}{0} \newenvironment{algo}[1] { \refstepcounter{algoctr}\vspace{0.2cm}\noindent{\bf Algorithm \arabic{chapter}.\arabic{algoctr}: #1}}{\par} and I use it thusly \begin{algo}{blabbing a blah} blah blah \label{eq:blabbing} \end{algo} Howeve...