latex

Unable to set the syntax of .txt file .tex in Emacs

How can you set the syntax of a .txt file .tex in Emacs? ...

How do I prevent LaTeX from padding spaces between paragraphs so that next section begins at top of next page?

I have a two-column paper where space restrictions are very tight. I just looked at my last version of the manuscript and saw that the upper half contains a figure (as expected), but in the lower half there is a lot of vertical space between paragraphs (enough to squeeze 10 more lines), and that LaTeX probably added it so that in the b...

How to convert an image (i.e. pdf) for use in a LaTeX document?

What is the preferred way to convert various images, bitmap and vector, for use in a LaTeX and PDFLaTeX document? There are many ways to do this, some make use of standard inclusions in the various LaTeX packages, others give better results. ...

Typesetting music in LaTeX

I would be grateful for any help typesetting music in LaTeX. I've tried to use MusiXTeX but have been very frustrated. As I understand it, the MusiXTeX notation has a steep learning curve, but I'm OK with that; the notation seems to be well documented. The hardest part is installation and getting a simple "hello world" example to wo...

LaTeX spell checking for software documentation

My development team has to perform a large documentation effort on a piece of software we've constructed. To do this concurrently we've elected to make the document using LaTeX, and to store the tex files in Subverison. This looks like it will work great. We've come across one problem though: What tool(s) should we use to perform spel...

Lighweight markup (wiki) language for documenting

When I write papers or documentation it makes think using LaTeX or OpenOffice is overkill as I usually only need some markup elements (bold, headlines, lists, ...) . I'd like to write my documents using a wiki style markup as this is very efficient. For example: = Introduction = '''HTML''' is a markup language... In the end I'd like ...

Matrices in LaTeX: Row and Column Labelling

So, I have an example matrix here: \[ \begin{pmatrix} t & 1-t & -1 & 0 & 0 \\ 0 & t & 1-t & -1 & 0 \\ 0 & 0 & t & 1-t & -1 \\ -1 & 0 & 0 & t & 1-t \\ 1-t & -1 & 0 & 0 & t \end{pmatrix} \] I wish to add labels to the columns and rows (such as a, b, c, d and the like) which go above and to the left (bot...

Using vim+LaTeX with Scandinavian characters

I want to create a lab write-up with LaTeX in Ubuntu, however my text includes Scandinavian characters and at present I have to type them in using /"a and "/o etc. Is it possible to get the latex-compiler to read these special characters when they are typed in as is? Additionally, I would like vim to "read" Finnish: Now when I open a .te...

Special characters in LaTeX table caption

When I include \overline{x} or other special characters in the caption text of a table, the whole caption text won't appear at all. When I put simple text without special characters, the caption works fine. How can I include special characters in the caption? ...

Typesetting New Functions in LaTeX

So, I just have a little question: What is the "best way" to typeset new functions in LaTeX which aren't already included in the various packages? Right now I'm just using \mbox as my go-to method, but I just was wondering if there was a more "acceptable way of doing it (as with mbox, I have to make sure to include spaces around the t...

LaTeX, tildes and verbatim mode

Following on from this question, I'm totally stumped on getting LaTeX to give me a tilde when I'm in verbatim mode. It has to be a tilde because it's the type of a function! sig symm : (Board, [(Int, Int)]) ~> Bool Standard methods for displaying a tilde are printed verbatim, of course.. Any suggestions? An edit to clarify: Typing ...

How to customize references to sublists in LaTeX?

I have a list/sublist structure in my LaTeX document. By default, the sublist is delimited with letters, so you end up with this: 1. Item (a) sub item (b) sub item In my document, I've got more than 26 sub items, so I was running into a Counter overflow error, which I fixed by rewriting the sub item label, so that they now lo...

Resetting page formats?

Hi, I am currently using latex, with the book document class, for a big CS project. It's about 150 pages right now, but I noticed something very odd. Randomly about half way through the document, the page formatting breaks. When I do a \chapter{newchapter} about half way through this, it creates about a page of space between it and...

Images in Latex - Whats the Solution?

I've faced so many problems using images in Latex. See for example, another question at http://stackoverflow.com/questions/382590/latex-using-eps-images-builds-slowly What tools do you use to make figures for inclusion into latex? Is there a simple solution to this? Some scenarios described below: I want to add a screenshot into latex...

Latex \hline spacing

How do you add spacing after an \hline in a tabular? I can add spacing before it using \vspace, however if I try to add spacing after the \hline, the spacing will come after the next line of text. Here is what I have so far: \multicolumn{2}{Hello!} \vspace{4pt} \\ \hline \textit{Hi!} & \textit{Ho!} I don't want to add a line break aft...

MathML, Latex or similar for web-based WYSIWYG editor

I am looking for a web-based WYSIWYG (or WYSIWYM) editor like TinyMCE or WMD Editor (used to write this question) that supports users to write mathematical formulas. I have looked at LaTeX a little bit but it has a learning curve and I am not sure if support for MathML is extensive. Ideally I would also like to avoid having to rewrite an...

Disabling underscore-to-subscript in Emacs Org-Mode export

When I export to PDF via org-mode (C-c C-e d), any words with underscores end up being partially converted to subscript. How can I prevent this from happening? I found this article on the subject: Disabling Underscore subscript in Emacs Tex Mode However, I either wasn't able to figure out the correct elisp or it simply didn't work. No...

Latex Small Caps and Bold Face

I can't seem to have both the small caps and boldface styles on a line: \huge\sc\bf Hello This will generate bold text, and if the \sc is placed after, it will generate small caps text but not bolded. They seem to override each other, so is there any way to apply them both? ...

LaTeX: how to use a required arg as the default for an optional one?

I'm trying to create a LaTeX command with two arguments, one of them optional. Normally I'd do this as \newcommand{\whatever}[2][default]{first #1 second #2} where default is the default value for the first argument. But for this command I want the value of the second argument to be used as the default value for the first argument - t...

Determine text width in LaTeX

For sizing figures in LaTeX it's helpful to know how wide the text is so that figures can be sized to match without rescaling. LaTeX provides \textwidth for reference by other commands, e.g. \includegraphics[width=\textwidth]{figure} but including \textwidth "raw" in the document produces errors. Is there a way to determine what ...