latex

LaTex, trying to use \ref{} or \autoref{} to a label in an appendix shows up empty in pdf

Trying to use \ref{} or \autoref{} to a label in an appendix, but it just shows up as empty with \ref{} and 'Section' with no number/letter for \autoref{}. I'm not sure if I'm misreading examples out there, or if I have a package conflict... % MainFile.tex Details of obfuscation of evil are provided in \autoref{app:One}. \appendix ...

Converting between pt and pixels

My netbook has a monitor with 10.1 inch length and 1024*600 solution. I think 1pt is about 1/72inch - is the following computation right? Since the resolution is 1024*600, the diagonal has about 1186.83 pixels, thus 1 inch is about 1186.83/10.1 = 117.51 pixels, and thus 1pt is about 117.51/72 = 1.63 pixels, or 1 pixel is about ...

Selection in PDF files

Hello, I'm working on an ebook conversion script. When I create a PDF file using emacs ps-print-buffer-with-faces and then ps2pdf, I can select the words one by one on my ebook (Sony PRS 600). Same when I use Microsoft Word to print to PDF. Yet, when I create a PDF using pdflatex, or latex -> dvips -> ps2pdf, I can't select but blocks...

Emacs, changing the default reftex citation

I'd like to modify emacs' behaviour when using reftex, so that after pressing 'C-c [' and choosing a citation format the default regex that comes up is one that will give me the citation I used last (the normal behaviour is to default to the word before the cursor, which is rarely of any use). I often cite the same source many times in a...

Latex Item inline "Missing $ inserted." error

Why does this line yield the "Missing $" error: \begin{item} Hello \rightarrow \end{item} ...

How to insert latex dot without new line

Im trying to add a dot like • for a dot product but it always ends up acting like a bullet point creating a new line. I've tried \cdot and \bullet. I think its being treated as a bullet because I'm doing it inside an itemized list. Is there a way to make it just as a dot? ...

Page numbers in LaTeX Beamer

Hey guys, in LaTeX Beamer, the total number of slides includes those that only contain the table of contents before each section/subsection, which increases the total number of slides unnecessarily. Is there any way to prevent this? In other words: I don't want slides containing the TOC to have page numbers. Kind regards, mefiX ...

[LaTeX] debugging errors when you have document split into multiple files?

Sometimes I construct a LaTeX document by breaking it up in sections and calling \input from the main file. When I do this, debugging becomes difficult because when I compile it with latex or pdflatex, it will give me the location of the error in terms of global line numbers rather than line numbers in the offending document. Is there a ...

How can I top-align the content of a "fragile" frame in a LaTeX Beamer presentation?

So I am a total novice with LaTeX. I'm working on beamer presentations for introductory programming lectures, so I frequently use the examplebox object in my slides. I was told that whenever I have a frame that contains an examplebox, I need to declare it with the keyword 'fragile,' as in: \begin{frame}[fragile] I don't know precisely ...

Latex for Mac OS X

Does anyone know of a latex distribution/front end they highly recommend for OS X? If the front end had some features you recommend, what are they and why? Thanks! ...

How to do document review in LaTeX?

I have a LaTeX document that I wrote, that needs to be reviewed by my boss. What do I send him? The .tex? The generated .pdf? How will he make his comments? In the case of the .tex, should I suggest him something like the todonotes package? Or just tell him to edit away, and I'll diff to see his changes? In the case of the .pdf, is it ...

insert big images...cut in two parts, LaTeX

Hi all, i would like to know how can i cut a figure in a way that some part is show in one page and the continuation in other page. Actually it just take the all figure to the next page and i get a lots of space empty that really looks ugly. ...

Latex and multibib

Hi All, I wanna split my bibliography into two parts, and found the multibib package [1] which seems to be perfect for this. But: somehow it doesn't work, not even the simple example works: \documentclass{article} \usepackage{multibib} \newcites{ltex}{\TeX\ and \LaTeX\ References} \begin{document} References to the \TeX book \citeltex{...

Latex \newcommand restrict the value of an argument

When defining a macro, is it possible to restrict the value of an argument, so that if the thing followed it is a number, then it takes it as an argument, but if it is not, then it is just empty. To be concrete, I defined \newcommand{\R}[1]{\ensuremath{\mathbb{R}^{#1}}} for a real vector space, so the \R2 and \R3 give the 2-dim and 3...

Latex indentation/centering in tables

Is it possible to set the centering of the individual rows with ctable, ie so that column 1 has left centering for the first 3 rows and then right centering for the last 5 rows? On a more specific note--I´d like male/female and 1..3 in this table to be right aligned instead of left aligned whilst the rest of the variablenames remain le...

String replacement in latex

Hi, I'd like to know how to replace parts of a string in latex. Specifically I'm given a measurement (like 3pt, 10mm, etc) and I'd like to remove the units of that measurement (so 3pt-->3, 10mm-->10, etc). The reason why I'd like a command to do this is in the following piece of code: \newsavebox{\mybox} \sbox{\mybox}{Hello World!} \n...

Conditional Import in LaTeX?

Hi everybody! I'm going to be taking a ton of lecture notes, and then compiling them into LaTeX so that I can have excellent documents for future me to look over. I'm trying to organize things so that I can have a bunch of little documents containing the notes from a lecture, and then compile them at the end of the semester into one la...

Environment 'Preformatted' in Latex

I know two environments, lstlisting and verbatim but both behave difficult in my case. Is there a Latex environment which allows pre-formatted text, conserving my white space characters (most important the indentation)? I do not want to use verbatim or lstlisting for two reasons: I try to use lstlisting in a macro: \newcommand*{\fdesc...

LaTex: Is it possible to vertically center multiple columns in a table?

I've found an example here but that only centers one column and I can't really adapt it to my needs. What I'd like is something like this: ...

How to adjust \listing package width in Latex Editor (LEd)

Hi, I am trying to use the \listing package to include some .cpp files into my article. I add: \usepackage{listings} And then I use \lstinputlisting[language=c++]{File.cpp} The problem is that the width is not adjusted, so the code is cutted. Which is the solution? ...