summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/latex
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/doc/latex')
-rw-r--r--Master/texmf-dist/doc/latex/hvextern/Changes1
-rw-r--r--Master/texmf-dist/doc/latex/hvextern/hvextern.pdfbin1148759 -> 1185723 bytes
-rw-r--r--Master/texmf-dist/doc/latex/hvextern/hvextern.tex91
3 files changed, 83 insertions, 9 deletions
diff --git a/Master/texmf-dist/doc/latex/hvextern/Changes b/Master/texmf-dist/doc/latex/hvextern/Changes
index 5543cdd49fa..9c754a92770 100644
--- a/Master/texmf-dist/doc/latex/hvextern/Changes
+++ b/Master/texmf-dist/doc/latex/hvextern/Changes
@@ -1,5 +1,6 @@
hvextern.sty ----------------
+v 0.21 2022-04-30 - added java support
v 0.20 2022-04-27 - use L3 for the comma separated lists
cleanup and runsequence
- move the config files into the main file
diff --git a/Master/texmf-dist/doc/latex/hvextern/hvextern.pdf b/Master/texmf-dist/doc/latex/hvextern/hvextern.pdf
index bdefe9bd891..963cef8772d 100644
--- a/Master/texmf-dist/doc/latex/hvextern/hvextern.pdf
+++ b/Master/texmf-dist/doc/latex/hvextern/hvextern.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/hvextern/hvextern.tex b/Master/texmf-dist/doc/latex/hvextern/hvextern.tex
index 50d93cef06f..0ad44196277 100644
--- a/Master/texmf-dist/doc/latex/hvextern/hvextern.tex
+++ b/Master/texmf-dist/doc/latex/hvextern/hvextern.tex
@@ -30,7 +30,7 @@ from within a main \LaTeX\ document~--v. \hvexternFileversion}
\end{verbatim}
\begin{sloppypar}
-This package allows to write external \MP, \TeX, \ConTeXt, \LaTeX, \LuaTeX, \LuaLaTeX, \XeTeX, \XeLaTeX, Lua, Perl and/or Python
+This package allows to write external \MP, \TeX, \ConTeXt, \LaTeX, \LuaTeX, \LuaLaTeX, \XeTeX, \XeLaTeX, Lua, Perl, Java and/or Python
source code, which will then be run via \texttt{shell escape} to create a PDF oder text output to include
it into the main \LaTeX\ document.
\end{sloppypar}
@@ -82,7 +82,7 @@ shown by the environment \texttt{externalDocument}.
\begin{minipage}{.59\linewidth}
\begin{lstlisting}
\begin{externalDocument}[
- compiler=pdflatex,force,cleanup]{Roemer1}
+ compiler=pdflatex,force,cleanup]{voss}
\documentclass{standalone}
%StartVisiblePreamble
\usepackage{fontenc}
@@ -106,7 +106,7 @@ shown by the environment \texttt{externalDocument}.
\end{minipage}
\begin{minipage}{.39\linewidth}
\begin{externalDocument}[
- compiler=pdflatex,force,cleanup={log,aux},verbose]{Roemer1}
+ compiler=pdflatex,force,cleanup={log,aux},verbose]{voss}
\documentclass{standalone}
%StartVisiblePreamble
\usepackage{fontenc}
@@ -261,11 +261,9 @@ image.save(imageName+".png", "PNG")
-
-
\begin{externalDocument}[grfOptions={width=0.95\linewidth},
compiler=xelatex,code,mpwidth=0.6\linewidth,
- crop,cleanup,force,usefancyvrb=false,ext=tex]{Senger3}
+ crop,cleanup,force,usefancyvrb=false,ext=tex]{voss}
\documentclass{article}
%StartVisiblePreamble
\usepackage{tikz}
@@ -400,6 +398,80 @@ Sort with xindex \verb|-l DE --config AU|
\end{externalDocument}
+The following Java-program creates the Mandelbrot set as png image. The valid setting for
+the environment \texttt{externalDocument} is:
+
+\begin{verbatim}
+ compiler=java,ext=java,docType=java,
+\end{verbatim}
+
+\begin{externalDocument}[
+ verbose,
+ compiler=java,ext=java,code,
+ force,docType=java,includegraphic,
+ usefancyvrb,grfOptions={width=0.9\linewidth}]{java}
+import java.awt.Color;
+import java.awt.Graphics;
+import java.awt.image.BufferedImage;
+import java.awt.image.RenderedImage;
+import java.io.File;
+import javax.imageio.ImageIO;
+
+public class Main {
+
+//StartVisiblePreamble
+ public static int iterZahl(final double cx, final double cy, int maxIt,
+ final double radius) {
+ // bestimmt Anzahl der Iterationen
+ int zaehler = 0;
+ double zx = 0.0, zy = 0.0, tmp;
+ do {
+ tmp = zx*zx - zy*zy + cx;
+ zy = 2*zx*zy + cy; zx = tmp;
+ zaehler++;
+ } while (zx*zx + zy*zy <= radius && zaehler < maxIt);
+ return zaehler;
+ }
+//StopVisiblePreamble
+ public static void main(String[] argv) throws Exception {
+ String f_name = new File ((Main.class.getProtectionDomain().getCodeSource().getLocation().toURI()).getPath()).getName();
+ String basename = f_name.replaceAll("\\.[^.]*$", "");
+ int imageBreite = 540, imageHoehe = 405;
+ BufferedImage bufferedImage = new BufferedImage(imageBreite, imageHoehe, BufferedImage.TYPE_INT_RGB);
+ Graphics g = bufferedImage.createGraphics();
+//StartVisibleMain
+ double xa = -2.5, xe = 0.7, ya = -1.2, ye = 1.2; // Ratio 20:15
+ double dx = (xe-xa)/(imageBreite-1), dy = (ye-ya)/(imageHoehe-1);
+ double cx, cy; int R, G, B;
+ double radius = 10.0; int maxIt = 1024;
+ cx = xa;
+ for (int sp = 0; sp < imageBreite; sp++) {
+ cy = ye; // von oben nach unten
+ for (int ze = 0; ze < imageHoehe; ze++) {
+ int zIter = iterZahl(cx, cy, maxIt, radius);
+ if (zIter == maxIt) {
+ g.setColor(Color.WHITE);
+ g.drawLine(sp, ze, sp, ze);
+ } else {
+ R = zIter % 4 * 6 ; G = zIter % 8 * 32; B = zIter % 16 * 16;
+ g.setColor(new Color(R,G,B));
+ g.drawLine(sp, ze, sp, ze);
+ }
+ cy = cy - dy;
+ } // for ze
+ cx = cx + dx;
+ } // for sp
+//StopVisibleMain
+ g.dispose();
+ RenderedImage rendImage = bufferedImage;
+
+ File file = new File(basename+".png");
+ ImageIO.write(rendImage, "png", file);
+ }
+}
+\end{externalDocument}
+
+
@@ -413,7 +485,7 @@ the follwing example.
\begin{externalDocument}[grfOptions={angle=90,width=\linewidth},
compiler=xelatex,code,mpwidth=0.6\linewidth,
- crop,cleanup,force]{Senger3}
+ crop,cleanup,force]{voss}
\documentclass{article}
%StartVisiblePreamble
\usepackage{tikz}
@@ -1305,6 +1377,7 @@ it makes no difference using the optional argument \texttt{usefancyvrb} or not.
showFilename,
% crop,
force,
+ cleanup,
code,
docType=mp,
ext=mp,]{voss}
@@ -1394,7 +1467,7 @@ This is the start of the introduction.
\begin{externalDocument}[
grfOptions={width=0.5\linewidth},
% pages={1,3},
- frame,
+% frame,
verbose=false,
compiler=lualatex,
showFilename,
@@ -1414,7 +1487,7 @@ This is the start of the introduction.
\begin{pspicture}(-9,-15)(9,2)
\psaxes(0,0)(-9,-15)(9,2)
\psplot[algebraic,plotstyle=curve,curvature=1 1 0,
- linewidth=1pt,linecolor=red]{-8}{8}{
+ linewidth=2pt,linecolor=red]{-8}{8}{
1 - 3876218985722260225*x^2/10892114744073986176
+ 14975974793271450625*x^4/174273835905183778816
- 317095420958296875*x^6/26811359370028273664