How to include a code snippet in a beamer presentation?
Hi folks, What's the best way to include some code snippets in a beamer presentation? I've already tried verbatim, and lstlisting environments - both destroyed my presentation. ...
Hi folks, What's the best way to include some code snippets in a beamer presentation? I've already tried verbatim, and lstlisting environments - both destroyed my presentation. ...
In LaTeX, the \includeonly statement exists to selectively add or exclude sub-documents. One quirk in the whole process is that when sections are excluded, LaTeX decides to insert a page-break. The article at http://stackoverflow.com/questions/1209065/to-have-no-pagebreak-after-include-in-latex recommends using newclude to avoid this is...
I'm writing an article for a magazine. I'm trying to insert a (floating) 2-column box at the upper right corner of a 3-column document, with the text wrapping around it nicely andn the columns being aligned. I'm making the box using the tikz package so I can have a box with rounded edges and a background color. I was trying to do the wra...
I'd like to take some user input text and quickly parse it to produce some latex code. At the moment, I'm replacing % with \% and \n with \n\n, but I'm wondering if there are other replacements I should be making to make the conversion from plain text to latex. I'm not super worried about safety here (can you even write malicious latex ...
Hello *, I currently have a problem, that listings package cannot spread source files across multiple pages. In the doc is written, that the "framed" package should be used for various formatting option. Unfortunately I did not find any docs for the "framed" package. My current source formatting looks like this for C# sources: My for...
I'm working on an open-source project called python-graph. We've come to the point where our APIs are stabilising and we've realised that we need some user docs. We already have automatically generated Epydoc API reference documents, however I want to I want to create something more useful for beginner programmers who find the auto-gener...
that is I'd like $\mathcal{l}=\mathcal{L}$ to produce two letters. I know \mathcal works (predictably) on upper case letters only. Thanks. ...
I'd like to express the following sentence (source_location is also italic, it's not correctly rendered): Each entry has a list of tuple: < *source_location*, R/W, trip_counter, occurrence, killed (explained in the later) > My current workaround for this is: $ \left\langle \textit{source\_location}, \textit{R/W}, \textit{trip\_cou...
For some fonts, it's easy to replace the default font with something like: \renewcommand{\rmdefault}{somefont}. However, some fonts, like BrushScriptX want you to use a special command like \bsifamily to use the font. In the \bsifamily is defined in /usr/share/texmf-texlive/tex/latex/brushscr/pbsi.sty: \DeclareRobustCommand\bsifamily...
Where do I find a good introductory tutorial on writing sty packages for latex? ...
When compiling a latex document with 15 or so packages and about five includes, pdflatex throws a "too many open files"-error. All includes are ended with \endinput. Any ideas what might cause the error? The error seems to depend on how many packages are used (no surprise...); however, this is not the first time I use this many packages...
Hello *, I currently use the \textnumero sign in my LaTeX document. Therefore, I need to include the 'textcomp' package. When doing so I get a compiler error stating: ! Package textcomp Error: Symbol \texnumero not provided by (textcomp) font family ptm in TS1 encoding. (textcomp) Default family...
I have just begun using LaTeX. I am working in Windows and am using TeXnicCenter as my editor. When I build and output, having the following code: \documentclass{article} \begin{document} This is a test document \end{document} I do get a document that has the words "This is a test document". If I change the sentence in the above co...
I am trying to align the following equations around the equal sign. What can I do? Thanks! I am using the AMSMath package $$m\ddot{x}_{1}-K(x_{2}+x_{12})+C(\dot{x}_{12}+\dot{x}_{2})+2C\dot{x}_{1} = fx_{1}$$ $$m\ddot{x}_{2}-K(x_{3}+x_{1})+C(\dot{x}_{1}+\dot{x}_{3})+2C\dot{x}_{2} = fx_{2}$$ $$m\ddot{x}_{3}-K(x_{4}+x_{2})+C(\dot{x}_{2}+\...
For the life of me, I cannot figure out the cause of this: when writing in LaTeX documents, I like to keep my line width to maximum of 80 characters. As such, I will execute the vim command gqap and vim will automatically re-wordwrap the paragraph I am writing. For example, it will cause a long line to become many shorter ones: Lorem i...
I am trying to add a table of contents for my LaTex document. The issue I am having is that this line: \subsubsection{The expectation of \(X^2\)} Causes an error in the file that contains the table of contents \contentsline {subsubsection}{\numberline {1.2.3} The expectation of \relax $X^2\relax \GenericError { }{ LaTeX Error: Bad m...
I want to typeset an algorithm in LaTeX. I'm using the algorithmic package and environment to do so. Everything is working great except when I add comments (using \COMMENT), they are output immediately after the statements. I would like for all the comments to be aligned (and offset from the statements). Is there an easy way to do so? "...
I'm in the process of writing a whitepaper, and am about half-way through. I've just realized that it would be far simpler to write this in org-mode and export to latex/pdf than writing it directly in latex-mode. Is there any way I can convert the existing work into an org mode file? It would save a lot of work I'd have to do manually. ...
I've been using LaTeX for a little while now to typeset my algorithms homework, and I really like the quality of the output as well as the ease-of-use. I'd like to starting using LaTeX in other classes as well, but non–computer-science subjects have more stringent formatting requirements than I've come across in CS. Most classes that req...
I'm setting up a new environment for my latex document for consistent tables. It looks like this: \newenvironment{defaultTable}[2] { \begin{table}[h] \noindent \tabularx{\textwidth}{#1} \specialrule{0.5pt}{10pt}{0pt} \rowcolor[gray]{.9} } { \bottomrule \endtabularx \caption{#2} \end{table} } It doesn't...