Skip to main content

New answers tagged

3 votes

Removing extra characters from code environment in beamer

The mysterious ^^I in the output mean two things: you're using TAB for indenting the code; you're using XeLaTeX to process your beamer document. I learned several years ago that TABs in TeX files ...
egreg's user avatar
  • 1.2m
5 votes
Accepted

Removing extra characters from code environment in beamer

In TeX the notation ^^<char> means use the character at ASCII-code of <char>-64 (for <char> having an ASCII-code >= 64 that is). For ^^I you end at ASCII-code 73-64=9 which is Tab....
Skillmon's user avatar
  • 63.3k
2 votes
Accepted

How to include Latex listing in a command using minipage?

You can avoid such problems by using a custom environment instead of a command: \documentclass{article} \usepackage{xcolor} \usepackage{fancyvrb} \usepackage{listings} \lstset{% language=[LaTeX]{...
samcarter_is_at_topanswers.xyz's user avatar
2 votes

How to include Latex listing in a command using minipage?

The following uses a verbatim argument to grab your fourth argument and then uses \scantokens to allow the code to be interpreted. Please note that this way the macro \foocmd is not allowed to be used ...
Skillmon's user avatar
  • 63.3k
1 vote
Accepted

listings not cover the whole minipage area

You can adjust the belowskip: \documentclass[border=2pt]{standalone} \usepackage{listings} \usepackage{xcolor} \begin{document} \begin{minipage}{\linewidth} \pagecolor[RGB]{128,128,128}% \begin{...
samcarter_is_at_topanswers.xyz's user avatar
3 votes
Accepted

below part not show up with standalone and listings

Only the edges need to be overlayed. Instead of overlaying the whole diagram, we'll just let PGF/TikZ find the right horizontal position itself by setting trim left = 0pt. On the second compilation ...
Qrrbrbirlbel's user avatar
1 vote

below part not show up with standalone and listings

overlay TikZ pictures does not take up space. Here is a solution where vertical space is added manually at the end. \documentclass[border=2pt, preview]{standalone} \usepackage{tikz} \usetikzlibrary{...
hpekristiansen's user avatar
1 vote
Accepted

You can't use `macro parameter character #' in horizontal mode. I can't print a code .py with special characters

From the manual of listings: When the language is Python, # is the comment character and therefore everything that follows the first one (on the same line) is treated as LaTeX code. The second # ...
egreg's user avatar
  • 1.2m
1 vote

two symbols in escapechar in lstset (listings package) doesn't work

escapeinside cancels the escapechar feature: you can only have one of them. \documentclass{article} \usepackage{listings} \begin{document} \lstset{escapechar=\%} \begin{lstlisting} Listing 1: %\...
egreg's user avatar
  • 1.2m
1 vote
Accepted

Error when using mcode.sty package - Inserts "2D at first page

Never use \usepackage[utf8x]{inputenc} it does nothing other than issue a warning Package ucs Info: utf8x disabled, assuming standard utf8 processing (ucs) load ucs package to force utf8x ...
David Carlisle's user avatar

Top 50 recent answers are included