showexpl is a package for including example LaTeX code together with its output

learn more… | top users | synonyms

7
votes
1answer
96 views

How can I color braces in showexpl?

I want to use showexpl and have the LaTeX code printed with colored braces. I can do this within a lstlisting environment by adding a literate option like in the example below, but not within a ...
5
votes
2answers
140 views

graphic in tcblisting

I'm using the package tcolorbox to create a file with examples Latex, I have reviewed the options tcblisting environment and use these: text outside listing listing outside text listing above text ...
7
votes
1answer
53 views

\centering and showexpl

Consider the following MWE, where the table is clearly not centered by \centering. Actually, moving \centering outside the table environment give the desired output, but that's no good... ...
5
votes
1answer
83 views

\lstset{numbers=none} not working

I'm trying to have LaTeX examples in a document. I use the showexpl package which lets me use the listings package options. Because all fragments are short, line numbers are redundant. The following ...
10
votes
2answers
245 views

How to make a \only<> like macro to be used at the end of line and escape it?

I want to produce a tutorial showing code and its rendered output step by step. The requirements are as follows. The source code should be kept simple. \LTXexample ...
7
votes
1answer
265 views

Package showexpl throws “Label … multiply defined” [closed]

With the following MWE you will get a warning Label lst:HalloWelt multiply defined. In the MWE I have added the calls for packages showlabels and refcheck to show the used labels and to check ...
7
votes
1answer
143 views

How to prevent LTXexample from ignoring the paragraph indentation?

How to prevent LTXexample from ignoring the paragraph indentation? \documentclass[preview,border=3pt]{standalone} \usepackage{etoolbox} \edef\keptparindent{\the\parindent} \patchcmd{\preview} ...
1
vote
1answer
23 views

rframe is not working in showexpl

the option rframe=empty has not effect in showexpl. Here is a WME \documentclass{article} \usepackage{showexpl} \begin{document} Here is: \begin{LTXexample}[rframe=empty] \begin{center} Hello ...
7
votes
1answer
272 views

Can you make the “graphic” option of LTXinputExample able to render all pages of a multi-page PDF file?

I have a source code named source.tex which produces a PDF file consisting of more than one page. The source code will be displayed by LTXinputExample as a formatted text and the corresponding output ...
1
vote
1answer
40 views

How to resize a graphic attached to LTXinputExample?

I want to attach a PDF output of a source code using graphic option of LTXinputExample. Shortly speaking, how to resize the attached graphic? \documentclass{article} \usepackage{filecontents} ...
5
votes
2answers
175 views

How to remove the unbalanced white space below the top rule of the formatted output?

How to remove the unbalanced white space below the top rule of the formatted output? \documentclass{article} \usepackage[a4paper,margin=25mm]{geometry} \usepackage{xcolor,showexpl} ...
8
votes
1answer
2k views

Inline LaTeX code and result of the code (similar to showexpl)

I would like to write a macro that works somewhat like showexpl but just reproduces the LaTeX code and the results of the code in a way that I can use inline. \documentclass{article} ...
4
votes
1answer
1k views

How to change the \fboxsep and \fboxrule of LTXexample's rframe?

The formatted output is enclosed by rframe. But for a certain case, the grid label of pspicture goes beyond the frame. The grid label of pspicture might be rendered outside TeX engine so TeX does not ...
14
votes
3answers
399 views

How to align the top lines of frames?

I want to align the top lines of the left and right frames. How to do it? \documentclass[12pt]{book} \usepackage[a4paper,margin=25mm,showframe=true]{geometry} \usepackage{xcolor} ...
1
vote
1answer
151 views

How to execute \LTXexample repeatitively with a looping macro such that its counter value gets rendered in both input/output parts?

The following code is the simplified version of my real scenario. It might look trivial. I forgot to say that the following code is the Minimal Not Working Example (MNWE): \documentclass{article} ...
4
votes
2answers
130 views

What is explpreset actually for?

showexpl package is intended to show (La)TeX, TikZ, PSTricks codes and their coressponding rendered outputs at the same time (either horizontally or vertically). Note that it cannot be used to ...
0
votes
1answer
147 views

How to align the top frame edges of source and formatted text with the same horizontal line? [closed]

The following code will be referred multiple times in my questions later. Patching is needed to make the frames of both source code and formatted text inside the text width. \documentclass{article} ...
3
votes
2answers
964 views

Emphasizing a string in code example using showexpl

I am writing documentation for a package using the showexpl package which in turn uses the listings package. When using listing I can highlight a portion of the code like this: ...
4
votes
2answers
1k views

Fixed Width Font with LTXexample environment

Not sure why this problem has eluded me but I can't seem to get fixed width font in the code portion. I thought that this question on how to change code font would do the trick but it doesn't for me. ...
2
votes
1answer
247 views

Without using minipage, can we resize both input and output boxes of LTXexample?

\documentclass[dvipsnames]{article} \usepackage{xcolor} \usepackage[margin=50mm]{geometry} \usepackage{showexpl} \usepackage{etoolbox} \makeatletter ...
3
votes
3answers
369 views

Is it possible to separate the input and output of LTXexample such that I can put each in a table cell?

My objective is to create a long tabular list of PSTricks inputs and their corresponding outputs side by side. The table consists of 3 columns, i.e., Number column, Input column, & Output ...
5
votes
2answers
1k views

How to control the left margin for the formatted text produced by LTXexample?

I want to use both LaTeX code snippet using LTXexample and C# code snippet using lstlisting in my book. If you see my screenshot below, lstlisting behaves well but LTXexample does not. How to prevent ...
12
votes
2answers
412 views

How to use showexpl with an external class?

The showexpl package defines LTXexample environment which allows to define a latex code and shows its result side by side. The problem is that it uses the same document class where the LaTeX code is ...