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

learn more… | top users | synonyms

0
votes
0answers
31 views

What is the purpose of reseting xleftmargin and xrightmargin when numbers=none? [on hold]

I don't understand why the author of showexpl sets xleftmargin and xrightmargin to 0 whenever numbers=none. If I override his setting (to make the frames fill the entire horizontal margin) as shown in ...
1
vote
2answers
40 views

How to center the graphic of LTXexample?

Scenario I want to write a tutorial on PSTricks, but because latex-dvips-ps2pdf (see the code shown in First Attempt section) makes my effort to prevent reader from copying the listing numbers no ...
2
votes
1answer
26 views

showexpl not showing caption of a lstlisting within

How can I make the LTXexample environment to show the caption (like it does with other environments) of a lstlisting that is inside it. Consider the following code \documentclass{article} ...
2
votes
1answer
26 views

Create a LTXexample environment ala figure*

How can I patch LTXexample to have the behavior of span two columns when used as LTXexample* (like using figure* in a twocolumn mode document)? Thus, the following code doesn't work due to the ...
3
votes
2answers
57 views

`showexpl` doesn't work with accents

It seems that showexpl removes the accents when it is processing them. How can I make it to use accented letters? Is there a replacement or a similar package that is more robust? ...
2
votes
1answer
113 views

How can I change the syntax of showexpl's graphic key?

I'm trying to rewrite the option graphic from showexpl package, I have reviewed the source code showexpl.sty but, fail to find the modification, the package use keyval (or xkeyval) and listings for ...
7
votes
1answer
127 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
216 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
68 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
135 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
290 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
288 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 ...
8
votes
1answer
159 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
26 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
280 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
46 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
185 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
416 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
158 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
150 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
149 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
1k 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: ...
5
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
254 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
374 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
442 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 ...