Linked Questions

1
vote
0answers
47 views

Listing next to the tikzpicture [duplicate]

I'd like to ask you about the way of putting the listing next to the tikzpicture. Is there any way to place lstlisting as it is shown below? \documentclass[12pt]{article} \usepackage{tikz} \begin{...
35
votes
6answers
3k views

Side-by-side source and output when documenting a style file

When documenting a style file, it would be nice to be able to easily put side by side different examples of code, side-by-side with the output they produce. What recommendations to people have to do ...
24
votes
1answer
821 views

Is there a listings configuration for TikZ as used in PGF/TikZ manual?

I want to create a tutorial how to use TikZ now. Is there a listings configuration for TikZ as used in PGF/TikZ manual? For example, I want to make \ as an integral part of tikz in \tikz, relevant ...
7
votes
2answers
4k views

How to make a box containing LaTeX output?

I am writing a short introductory book on LaTeX and I would like to implement nice looking code example boxes. Using this answer: Source code listing with frame around code? I made the boxes with the ...
17
votes
1answer
799 views

Automatic linking (aka code highlight) in Till Tantau's `codeexample`

I am writing docs for a tikz-based package, and I am trying to reuse Till Tantau's codeexample environment to output source code along with its output. However, I cannot manage to get syntax ...
3
votes
2answers
72 views

Displaying tikzpicture code alongside it [duplicate]

I used the following code for displaying the tikzpicture code alongside it. Is there an easy way to automate displaying the code (centered alongside the picture) without modifying it. \documentclass{...
7
votes
1answer
241 views

Show the code example below the image if the width is greater than X

I've been studying answers like this one https://tex.stackexchange.com/a/120953/85210 to create "side by side" code examples: But... I'm not sure about the way to use it when it looks like this: I ...
5
votes
1answer
231 views

Code example, as in the TikZ/PGF manual, but extending to the width of the page

I am preparing a second "edition" of my minimal guide to TikZ and would like to have more professional looking presentation for the example. Thanks to Thomas F. Strun this is for the most part easy - ...
3
votes
1answer
378 views

tikzexample code line auto wrap in beamer

In beamer, if we demo some code with tkzexample package (refer to this example),sometimes code will run out of the frame box. Is it possible to make it auto wrap if code line too long? The distance ...
2
votes
0answers
123 views

Highlight LaTeX code and presenting results as in a manual [duplicate]

I would like to write a short guidelines of LaTeX for my students. In the spirit of some LaTeX manuals, I'd like to present the code and the result as follows, This example illustrate more or less ...