latex

[LaTeX] \listingname won't change its content

I am using the listing (NOT listings) package and have been trying to use \renewcommand{\listlistingname}{Índice de código} \renewcommand{\listingname}{Código} in order to change the "List of listings" and "Listing" text which appear in the document, since I'm writing in Spanish. However only \listlistingname seems to work, \listing...

emacs uses dvi2tty instead of evince to open dvi

Hi All, I started to use emacs for LateX editing again. Back in the days, it was configured automatically that C-c C-f would open the corresponding *.dvi file with evince. With the latest version of emacs, it does not do the same. Is there a way to open the doc with evince? (I am sure there is a way. It is emacs afterall). Thanks! ...

[bibtex] How to change citation format?

Hi all, I'm using Harvard citations in a paper. I use the following options: \usepackage{natbib} \bibpunct{(}{)}{,}{a}{}{;} ... \bibliographystyle{plainnat} \bibliography{Comparison} When I use \cite and \citep I get the following at the end of the pdf: S.Shekhar and S.Chawla. Spatial databases: a tour. PrenticeHall, 2003. Actua...

Using \parindent and \parskip with \paragraph{} has no effect

I'm creating documents using the memoir class in XeLaTeX. I'm having trouble creating proper paragraph presentation, and in particular my when I create paragraphs with \paragraph{}lorem ipsum LaTeX ignores the \parskip and \parindent settings. For example, if I have a document \documentclass[oneside,11pt]{memoir} \usepackage{fontspec}%...

Compile XeLaTeX tex file with latexmk

How can one compile a XeLaTeX tex document using latexmk on Mac OS X? At present I am running latexmk job.tex and getting an error: ! ******************************************** * XeTeX is required to compile this document. * Sorry! ********************************************. \RequireXeTeX ...********************************} ...

latex question (problem)

Hello, My latex file is: \title{\large\textbf{Optimizarea rela\c tiei dintre structur\u a \c si comportament \^in modelarea UML}} \author{ Sorin Oltean \\ \textit{Universitatea Transilvania din Bra\c sov} \\ \small\textit{[email protected], [email protected]} \\ ...

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 bibliography question

Hello, Also in my document i have to specify the References. i'm using: \bibliographystyle{abbrv} \bibliography{main} Where main is the .bib file from the same folder, and contains, for example: @string{jgr = "J.~Geophys.~Res."} @MISC{primes, author = "Charles Louis Xavier Joseph de la Vall{\'e}e Poussin", note = "A strong fo...

how to rename sections in latex

Hello again, How can i give another name to the main sections of a scientific paper in Latex? So instead of 'References' i wanna write a different title, instead of 'Abstract' another, and so on. Regards ...

How to number floats in LaTeX consistently?

Hello I have a LaTeX document where I'd like the numbering of floats (tables and figures) to be in one numeric sequence from 1 to x rather than two sequences according to their type. I'm not using lists of figures or tables either and do nort need to. My documentclass is report and typically my floats have captions like this: \caption...

store a text string in latex and then add other text to it (concatenate)

I start by defining a command to store the string "Hello": \newcommand{\textstring}{Hello} I would like to append the string " world" but unfortunately this code causes an error: \renewcommand{\textstring}{\textstring world} ...

Error trying to compile latex document. Where can I find the file "report output*"?

Help!!! I am trying to compile a LaTeX document that has been compiled before, but now for some reason it just won't go through. The error message I am getting is not very informative, and I can't even find the file it is pointing to. The details: I am using Aquamacs, and when I try to compile the document the mini-buffer displays the ...

Show only leading spaces of a line?

Is there a way to show only leading spaces of a line? I searched the manual of lstlisting, but it seems it did not support this feature. I am type setting a piece of code, using lstlisting with the "showspaces" enabled, it shows all spaces in the code, which messed my eyes (and probably others I guess). Since the code is layouted, I only...

MikTeX 2.8 and xypic error

Ever since I've updated to MiKTeX 2.8, xypic does not seem to work, to the point that, if I try build an output PDF with a latex file in which I use xymatrix, for example, I get a fatal error. I've been trying to fix this for several hours to no avail. I've gathered that this is a somewhat well-known bug having to do with the .enc files ...

Is it possible to ask Latex to evaluate a command

This code: \begin{enumerate} \item Item One \def\commandOne{\alph{enumi} : One} \item Item Two \def\commandTwo{\alph{enumi} : Two} \item \commandOne, \commandTwo \end{enumerate} Gives this output: Item One Item Two c : One, c : Two I want that Latex evaluate \alph{enumi} when the command is defined inst...

foreach Loop in LaTeX

Scenario: I have a main Latex file (main.tex) in which I include a subfile (appendix.tex) using the subfiles package. Role of appendix.tex: It further includes all the appendices as subfiles kept in an appendix subfolder, so that I just need to include the appendix.tex in the main.tex file. Current Situation: I have to manually list th...

Renaming and resetting Chapter in LaTeX

Hi, I have two questions in LaTeX: How to reset the chapter counter to 1 or to set it to any other number?; How to rename Chapter 1 to Paper A? To rename it to Paper 1, I have this solution: \renewcommand\chaptername{Paper}. The first chapter then becomes Paper 1. But I can't get to rename 1 to A so as to get Paper A. Thanks in adv...

Can I to specify the width of a table but keeping the height and font size?

Hi, I want the tables of my report have the same width as the text column but keeping the height according to its content. \rezisebox is not what I need because it rezise the width and the height and change the font size. There's a way to do that? Thanks. ...

Displaying errors with sweave

I'm writing some R notes with Sweave and would like to show common errors. For example, <<echo=TRUE, eval=TRUE>>= x = 5 #Case matters! x*X @ However when sweaving, the document won't compile due to the R error. Is there any way to make sweave compile and show the (nicely formated) error? ...

How to create a white-on-black style for LaTeX listings...

I've been looking at Philip Bunge's post on how to create a "Tango" style with LaTeX listings, and trying to adapt this to make the default text style white and the background black (this is for slides, not an article!). This is what I added: \definecolor{Black}{gray}{0.0} \definecolor{White}{gray}{0.9} ... \lstset{ basicstyle=\color{...