latex

LaTeX - Proper vertical spacing on multi-line parboxes with multicols

I'm trying to get two-column typesetting working, with a list of items. However, that list has elements that are either one or two lines, i.e. Alpha Beta Zeta Alternative: Upsilon < (second line of the Zeta) Gamma Alternative: Lambda Epsilon Omega Omicron Alternative: Upsilon ... I'd like to have this list on two column...

LaTeX - Add clickable links to a section/subsection with a PDF document

I am making PDF with LaTeX. I have a few sections and subsections. I want to put a link towards the top of the document so that in the PDF someone can click on it and it'll go to that section/subsection. I know it's possible to have this with a linkable table of contents, but I don't want to make a table of contents, I need more control....

How do I treat LaTeX warnings as errors

I am using the MiKTeX 2.8 distibution for Windows. We develop software primarily, and use LaTeX to make our user instructions. We use LaTeX because: It's great under source control for tracking changes etc. The source files don't suddenly decide to become corrupt, unlike Word documents. Multiple documents can share single sections, so...

How to change the font size of line numbers using the Minted Latex Package.

I tried redefining the \FancyVerbLine to have a \large, but that didn't help. Is there another way to do this? ...

[Latex Glossaries] How to generate output depending on whether or not a userkey has been defined.

I would like to modify the glossaryentryfield so that it creates output depending on whether or not user1 (key provided by the package has been defined/set or not. I tried the following: \renewcommand*{\glossaryentryfield}[5]{\bfseries{\glstarget{##1}{##2}} & ##3 \\ \ifempty{\glsentryuseri{##1}} it & is very empty \\ \else & \gl...

LaTeX - Using hyperref & \ref - Special characters in reference name?

I'm making a LaTeX PDF document and using the hyperref package and \ref to make references to section & subsections later in the document. Some of my (sub)section references have an underscore (_) in them, so I have escaped them (i.e. put in \_), however when I run pdflatex on it I get the following error: ! Missing \endcsname inserted....

LaTeX - using \hyperref to refer to a section/subsection before the section/subsection is defined?

I have been using the hyperref package and \hyperref[…]{…} to put a clickable link (in a PDF) to a section or subsection. However I want to put the clickable link before i put the \subsection declaration. My first attempt seems to produce a link that goes to the first page. Is there something special you have to do to get the links worki...

How to include a Percent Symbol in an xtable caption using Sweave in R

I'm trying to use Sweave to generate a statistical report, and am trying to put a caption on an xtable, however if I include the percent symbol this breaks things. Some example code <<label=Analyte2_Results, results=tex, echo=FALSE>>= print(xtable(result[[2]], caption=paste(levels(vardata$Analyte)[1], " ...

Latex, TikZ and separate compilation of chapters and figures.

I have fairly large Latex document with a lot of TikZ figures inside. I have a habit of frequent recompilation and it takes forever to compile it using pdflatex. Figures in TikZ take most of the time. My question is what is the best way to split the document into separate tex files (figures/chapters) to achieve separate compilation of ...

How to highlight "what's new" between two latex documents

Hi, For my Master Thesis I am writing a Latex document where I must put all the research I do. This document is reviewed periodically by my thesis advisors once or twice per month. Since this is a big document I'd like to automatically highlight what's new in the document since the last revision same way like Word or Openoffice do. So...

LaTeX listings package: different style for constants/classes/variables

I'm using the listings package for syntax highlighting, set up with the following arguments: \lstset{ language=Java, captionpos=b, tabsize=3, frame=lines, numbers=left, numberstyle=\tiny, numbersep=5pt, breaklines=true, showstringspaces=false, basicstyle=\footnotesize, identifierstyle=\color{magenta}, keywordstyl...

Creating an environment in Latex

Hi I'm trying to create an environment in Latex that recreates the effect of the following. \colorbox{bg}{\ttfamily{\color[RGB]{222,222,222} Hello Whats up } } I want to be able to say. \begin{bashcommands} Hello Whats Up \end{bashcommands} ...

How to execute shell script from LaTeX?

I'm trying to do the following in LaTeX: \documentclass{article} \begin{document} \execute{/usr/local/bin/my-shell-script.sh} \end{document} The idea is to execute /usr/local/bin/my-shell-script.sh at the moment of .tex document processing and inject its output into LaTeX stream. Is it possible at all? Thanks! ...

Why \linebreak doesn't work when text width is not set?

This is the code I have: \documentclass{article} \usepackage{tikz} \usetikzlibrary{shapes} \begin{document} \tikz \node[rectangle split, rectangle split parts=2] {first\nodepart{second}second\linebreak{}third}; \end{document} Second and third lines are glued to each other. When I'm adding text width=5em to the style of this node — e...

beamer utility?

Hello! I want to make a presentation in Beamer. I have use Beamer for some time, still for this new feature I want to make in the presentation, I cannot find the solution with Beamer, as much as I would look for it. I hope that maybe you can help me with some idea. What I would want to do is the following: I want to have a slide with se...

LaTeX: indent from second line

I want to indent from the second line. I want to write in LaTeX something like this: Lorem ipsum dolor sit amet, consectetur adipiscing elit. Proin eu tempor velit. Fusce accumsan ultrices fringilla. Praesent sed odio mi. Mauris non ligula turpis. Duis posuere lacus nec diam interdum dictum suscipit magna molestie. Vestibulum nibh dol...

How to make your own laTex math symbol?

How do you make your own laTex math symbol? Is it possible? ...

tools::texi2dvi - what happened to it?

I'm familiar with the fact that you can create LaTeX reports directly from R with tools package and texi2dvi function, but I was surprised to see that tools package is missing. It's just not in CRAN repositories. Does anyone know about an adequate replacement for texi2dvi? ...

Define linespacing using a Point-Value

Hello Guys, i have to write a paper where the chair claims a font size of 12pt AND a line-spacing of 15pt (which seems not to be \onehalfspacing). Can anyone tell me how to define the spacing using the value 15pt? Best regards and thanks! Philipp ...

VIM latex-suite inserts macro code instead of executing macros

Hi all, I have a problem that's been bugging me for quite a while and that I can't find the solution to. I want to use the feature where I can press <C-j> and the cursor moves to the next placeholder. This works for regular files, but when I edit .tex files (i.e. latex-suite is enabled), this inserts: \right=IMAP_Jumpfunc('', 0) ins...