tex

How to put a newline into a column header in an xtable in R

I have a dataframe that I am putting into a sweave document using xtable, however one of my column names is quite long, and I would like to break it over two lines to save space calqc_table<-structure(list(RUNID = c(1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L), ANALYTEINDEX = c(1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L), ID = structur...

Why does Tex/Latex not speed up in subsequent runs?

I really wonder, why even recent systems of Tex/Latex do not use any caching to speed up later runs. Every time that I fix a single comma*, calling Latex costs me about the same amount of time, because it needs to load and convert every single picture file. (* I know that even changing a tiny comma could affect the whole structure but o...

Best method of including an abstract in a latex 'book'?

Hello there. I've been looking for the answer to this question for a while now but can't seem to find it, so I'm hoping someone on here can help me. I'm writing up a thesis in Latex, and really like the \frontmatter, \mainmatter and \backmatter ability when using the "book" environment. However I need to add an abstract and the \begin...

TeX on iPad compatible with Apple's policy?

Hi, As a nerd, I think it would be nice to have a TeX editor on the iPad. But TeX is a Turing-complete language, and it is arguably a general-purpose compiler/interpreter. Does that make it unacceptable to the App Store? Furthermore, if somebody ports TeX compiler to javascript and runs inside WebKit, does it make acceptable to the App ...

[LaTex]: Add in the TOC an included PDF

In my document I include a PDF using \includepdf[pages=-]{./mypdf.pdf} The problem I'm having is how to add a TOC entry for this pdf. It supposed to be an appendix. I tried adding a new section in the appendix but of course the section name can't be printed on the same page than the included pdf, so the resulting TOC line directs...

How to insert a full-page letter-size figure?

I have been trying to insert a letter-size figure, but either this is cut because of the margins definition of the document style (book), or its size is limited to the specified margins. Below is the code with which I have managed to obtain the size of the figure: ... \newenvironment{pagportada}{ \begin{list}{}{ \setlength{\hoffset}{-1...

Trouble using latex in Matplotlib / Scipy etc.

I'm having some issues with my first attempts at using matplotlib and scipy to make some scatter plots of my data (too many variables, trying to see many things at once). Here's some code of mine that is working fairly well... import numpy from scipy import * import pylab from matplotlib import * import h5py FileID = h5py.File('3DiPVD...

Can I make a LaTeX macro 'return' a filename?

I'm writing my thesis/dissertation and since its an on-going work I don't always have the actual images ready for the figures I put into my document, but for various reasons want to automatically have it substitute a dummy figure in place when the included graphics file doesn't exist. E.g. I can do something like \includegraphics[width=8...

Inlining the LaTeX \input Command

I'm looking a program to recursively inline all \input{} commands in a LaTeX file. By "recursively", I mean doing the inlining iteratively until no \input{} command remains in the final LaTeX file. I've already come across the flatten package. But, for some reason, my TeXLive distribution doesn't install it. When I execute the command s...

Is there a way to override LaTeX's errors about double subscripts and superscripts?

Minor point about LaTeX that bothers me. When one writes a^b^c, a_b_c or a'^b in math mode, LaTeX gives an error message complaining about multiple super/subscripts. This is particularly annoying after replacing a string containing a super/subscript or when using the apostrophe, '. Is there a way to override the error an...

Latex two captioned verbatim environments side-by-side

How to get two verbatim environments inside floats with automatic captioning side-by-side? \usepackage{float,fancyvrb} ... \DefineVerbatimEnvironment{filecontents}{Verbatim}% {fontsize=\small, fontfamily=tt, gobble=4, frame=single, framesep=5mm, baselinestretch=0.8, labelposition=topli...

LaTeX - vertical space equivalent of \makebox ?

I'm making a LaTeX document and I'm getting success with \makebox, which puts text in an invisible box and will add extra horizontal whitespace to the end to make the whole thing fit within the size you specify. Is there something like that for vertical space? I have a few variable length paragraphs, images, etc. that I want to put in ...

vspace vs. vskip

What is the difference between \vspace{-1em} and \vskip -1em, for example? I guess the first is LaTeX, and the latter is TeX. When is the proper time to use one and not the other, and why? ...

LaTeX table cells content vertical alignment problem.

Hello, I'd like to align text in right cell of table created below, to be vertically align to the top. How to do that ? \begin{tabular}{l|p{3cm}} \rule{2cm}{5cm} & Top align content ? \\ \end{tabular} Regards ...

Frustration with fancyhdr

Hi I have the following tex document: \documentclass[a4paper,11pt,oneside]{book} \usepackage[usenames,dvipsnames]{color} \usepackage[T1]{fontenc} \usepackage[utf8x]{inputenc} \usepackage{lipsum} \usepackage[left=2cm,top=3cm,right=1.5cm,bottom=2cm]{geometry} \renewcommand{\chaptermark}[1]{\markboth{#1}{}} \renewcommand{\sectionmark}[1]...

LaTeX: Multiple authors in a two-column article

I'm kind of new to LaTeX and I am having a bit of a problem.. I am using a twocolumn layout for my article. There are four authors involved with different affiliations, and I am trying to list all of them under the title so they span the entire width of the page (all on the same level). It should be similar to this: A...

TeX/LaTeX algorithmic package issue

Hi all, I try to layout an algorithm in pseudocode with TeX and the package "algorithmic". It gets a mess: no spaces between words, and no linebreaks. Can anyone help me out. How do I get spacing and linebreaks into algorithmic comments? Thanks! Here's my TeX code: \documentclass{llncs} \usepackage{algorithmic} \begin{document} \be...

LaTeX: Show block only if there is enough space left

Hi LaTeX enthusiasts and TeX programmers! I'm currently developing a single-page document class for some kind of flyers which should be generated automatically. Unfortunately the limited amount of space doesn't make it possible to display everything on the page, so I need to skip some articles completely (I don't want only one half of a...

Replace balanced brackets with balanced braces in LaTeX

How can I write a (La)TeX command that replaces all [ with { and all ] with }, assuming that every [ has a matching ], and that any braces between the [ and ] are balanced? It needs to be able to deal with nested brackets. For example, I want to be able to write a command \mynewcommand so that \mynewcommand{{[[{1}{2}][{3}{4}]]}} is the...

Latex insert date setted with \date command

Hi, I searched all morning to do this. I want to insert in my custom title page the date , author , title setted with the following commands \date{The date} \author{Me \and Other} \title{the document title} I want to insert those in my document anywhere (and my custom title page) Solution \makeatletter \@date \@title \makeatother...