summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/latex/mpostinl
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2017-01-05 23:01:06 +0000
committerKarl Berry <karl@freefriends.org>2017-01-05 23:01:06 +0000
commit340eee4b8ea821b774ee4b81bd980e2c053e96e9 (patch)
tree4b97b2c162624fdf7bb1aa2961093234ea5eefa8 /Master/texmf-dist/doc/latex/mpostinl
parentbe1b5c7a991901617120f200d7f6b2a7594683ab (diff)
mpostinl (5jan17)
git-svn-id: svn://tug.org/texlive/trunk@42875 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/doc/latex/mpostinl')
-rw-r--r--Master/texmf-dist/doc/latex/mpostinl/README39
-rw-r--r--Master/texmf-dist/doc/latex/mpostinl/mpinlsmp.tex307
-rw-r--r--Master/texmf-dist/doc/latex/mpostinl/mpostinl.pdfbin0 -> 308025 bytes
3 files changed, 346 insertions, 0 deletions
diff --git a/Master/texmf-dist/doc/latex/mpostinl/README b/Master/texmf-dist/doc/latex/mpostinl/README
new file mode 100644
index 00000000000..37cd2f504aa
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/mpostinl/README
@@ -0,0 +1,39 @@
+mpostinl v1.0
+Copyright 2010-2017 Niklas Beisert
+
+mpostinl is a LaTeX2e package
+which enables the embedding of metapost figures
+within a LaTeX document.
+The package automatically collects the embedded
+definitions and figures in a .mp file,
+adds an appropriate LaTeX document structure,
+and compiles it to .mps files.
+It also allows for various configuration options
+to manage the generation of files and compilation.
+
+The package consists of the files
+
+ README readme file
+ mpostinl.ins installation file
+ mpostinl.dtx source file
+ mpostinl.sty package file
+ mpinlsmp.tex sample latex file
+ mpostinl.pdf manual
+
+The distribution consists of the files
+README, mpostinl.ins and mpostinl.dtx.
+
+Run "(pdf)latex mpostinl.dtx" to compile the manual mpostinl.pdf.
+
+Run "latex mpostinl.ins" to create the package mpostinl.sty
+and the sample mpinlsamp.tex.
+Copy the file mpostinl.sty to an appropriate directory of your LaTeX
+distribution, e.g. texmf-root/tex/latex/mpostinl.
+
+This work may be distributed and/or modified under the
+conditions of the LaTeX Project Public License, either version 1.3
+of this license or (at your option) any later version.
+The latest version of this license is in
+ http://www.latex-project.org/lppl.txt
+and version 1.3 or later is part of all distributions of LaTeX
+version 2005/12/01 or later.
diff --git a/Master/texmf-dist/doc/latex/mpostinl/mpinlsmp.tex b/Master/texmf-dist/doc/latex/mpostinl/mpinlsmp.tex
new file mode 100644
index 00000000000..31139b3d958
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/mpostinl/mpinlsmp.tex
@@ -0,0 +1,307 @@
+%%
+%% This is file `mpinlsmp.tex',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% mpostinl.dtx (with options: `sample')
+%%
+%% Copyright (C) 2010-2017 Niklas Beisert
+%%
+%% This work may be distributed and/or modified under the
+%% conditions of the LaTeX Project Public License, either version 1.3
+%% of this license or (at your option) any later version.
+%% The latest version of this license is in
+%% http://www.latex-project.org/lppl.txt
+%% and version 1.3 or later is part of all distributions of LaTeX
+%% version 2005/12/01 or later.
+%%
+\NeedsTeXFormat{LaTeX2e}[1996/12/01]
+\ProvidesFile{mpinlsmp.tex}[2017/01/04 v1.0 sample for mpostinl]
+\documentclass[12pt,a4paper]{article}
+
+\parindent0pt
+\parskip6pt
+
+\usepackage[fonts=true]{mpostinl}
+
+\usepackage[utf8]{inputenc}
+
+\IfFileExists{currfile.sty}{\usepackage{currfile}}{}
+\IfFileExists{graphbox.sty}
+ {\def\align{align}\usepackage{graphbox}}
+ {\def\align{}}
+
+%% \mpostsetup{write=false}
+%% \mpostsetup{compile=false}
+\mpostsetup{now}
+%% \mpostsetup{nowall}
+\mpostsetup{lineno}
+%% \mpostsetup{latex=false}
+%% \mpostsetup{classopt={12pt}}
+
+\begin{mpostdef}[tex,global]
+\usepackage[utf8]{inputenc}
+\end{mpostdef}
+
+\begin{mpostdef}[global]
+newinternal unit;
+unit:=1cm;
+\end{mpostdef}
+
+\begin{document}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\section{Basic Functionality}
+
+a plain circle:\\
+\begin{mpostfig}
+draw fullcircle scaled unit;
+label(btex 1 etex, (0,0));
+\end{mpostfig}
+
+scaled (and aligned to centre if available):\\
+X
+\begin{mpostfig}[opt={scale=1.5,\align}]
+draw fullcircle scaled unit;
+label(btex 2 etex, (0,0));
+\end{mpostfig}
+X
+
+declare figure with label (no display).
+\begin{mpostfig}[label={fig}]
+draw fullcircle scaled unit;
+label(btex 3 etex, (0,0));
+\end{mpostfig}
+
+display:\\
+\mpostuse{fig}
+
+display with options:\\
+\mpostuse[scale=1.5,\align]{fig}
+
+display in a box:\\
+\fbox{\mpostuse{fig}}
+
+centred display:
+\begin{center}
+\mpostuse[scale=1.5]{fig}
+\end{center}
+
+display in equation (align if possible):
+\begin{equation}
+\mpostuse[scale=1.5,\align]{fig}
+\end{equation}
+
+filename: \mpostgetname{fig}
+\texttt{\mpostfigurename}
+
+figure with filename:\\
+\begin{mpostfig}[file={\jobname-name.mps},label={name},show]
+draw fullcircle scaled unit;
+label(btex 4 etex, (0,0));
+\end{mpostfig}
+\\
+filename: \mpostgetname{name}
+\texttt{\mpostfigurename}
+
+display by \verb+\includegraphics+ (if file exists):\\
+\IfFileExists{\jobname-name.mps}{\includegraphics{\jobname-name.mps}}{}
+
+label does not exist:\\
+\mpostuse{notexist}
+
+utf-8 test:\\
+\begin{mpostfig}
+interim unit:=1.5cm;
+draw fullcircle scaled unit;
+label(btex àáâãäåæ etex, (0,0));
+\end{mpostfig}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\section{Immediate Processing}
+
+immediate processing per figure:\\
+\begin{mpostfig}[now]
+interim unit:=1.5cm;
+draw fullcircle scaled unit;
+label(btex 5 etex, (0,0));
+\end{mpostfig}
+
+turn on immediate processing for all figures and keep sources.
+\mpostsetup{nowall,nowkeep}
+
+generate file \texttt{\jobname-now.mps}:
+\begin{mpostfig}[file={\jobname-now.mps}]
+draw fullcircle scaled unit;
+label(btex 6 etex, (0,0));
+\end{mpostfig}
+\\
+display by \verb+\includegraphics+:\\
+\includegraphics{\jobname-now.mps}
+\\
+source \texttt{\jobname-now.mp}
+\IfFileExists{\jobname-now.mp}{exists}{does not exist}.
+
+turn off immediate processing and discard sources.
+\mpostsetup{nowall=false,nowkeep=false}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\section{Filename Composition}
+
+by label:\\
+\mpostsetup{labelnames=true}
+\begin{mpostfig}[label={circle},show]
+draw fullcircle scaled unit;
+label(btex 7 etex, (0,0));
+\end{mpostfig}
+\mpostsetup{labelnames=false}
+\\
+filename: \mpostgetname{circle}
+\texttt{\mpostfigurename}
+
+change extension:
+\mpostsetup{extension=eps}
+\begin{mpostfig}[label={ext}]
+draw fullcircle scaled unit;
+label(btex 8 etex, (0,0));
+\end{mpostfig}
+\mpostsetup{extension=mps}
+\\
+filename: \mpostgetname{ext}
+\texttt{\mpostfigurename}
+
+change template:\\
+\mpostsetup{template=\mpostfilename-figure-#1.mps}
+\begin{mpostfig}[label={template},show]
+draw fullcircle scaled unit;
+label(btex 9 etex, (0,0));
+\end{mpostfig}
+\mpostsetup{template=\mpostfilename-#1.mps}
+\\
+filename: \mpostgetname{template}
+\texttt{\mpostfigurename}
+
+\mpostsetup{numberwithin=subsection}
+
+\subsection{Section 1}
+
+\begin{mpostfig}[show,label={sec1}]
+draw fullcircle scaled unit;
+label(btex 10 etex, (0,0));
+\end{mpostfig}
+\\
+filename: \mpostgetname{sec1}
+\texttt{\mpostfigurename}
+
+\subsection{Section 2}
+
+\begin{mpostfig}[show,label={sec2}]
+draw fullcircle scaled unit;
+label(btex 11 etex, (0,0));
+\end{mpostfig}
+\\
+filename: \mpostgetname{sec2}
+\texttt{\mpostfigurename}
+
+\begin{mpostfig}[show,label={sec3}]
+draw fullcircle scaled unit;
+label(btex 12 etex, (0,0));
+\end{mpostfig}
+\\
+filename: \mpostgetname{sec3}
+\texttt{\mpostfigurename}
+
+\subsection{Section 3}
+
+\begin{mpostfig}[show,label={sec4}]
+draw fullcircle scaled unit;
+label(btex 13 etex, (0,0));
+\end{mpostfig}
+\\
+filename: \mpostgetname{sec4}
+\texttt{\mpostfigurename}
+
+\makeatletter
+\def\thempi@count{\arabic{mpi@count}}
+\makeatother
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\section{Multiple Files}
+
+\mpostdone
+
+\mpostsetup{globaldef=true}
+
+\begin{mpostdef}
+unit:=0.8cm;
+\end{mpostdef}
+
+\mpostsetup{globaldef=false}
+
+\mpostfile[include]{\jobname-inc}
+
+\begin{mpostdef}
+def drawcircle =
+draw fullcircle scaled unit
+enddef;
+\end{mpostdef}
+
+\mpostdone
+
+\subsection*{Section 1}
+\mpostfile{\jobname-sec1}
+
+\begin{mpostfig}[show,label={sec5}]
+drawcircle;
+label(btex 14 etex, (0,0));
+\end{mpostfig}
+\\
+filename: \mpostgetname{sec5}
+\texttt{\mpostfigurename}
+
+\mpostdone
+
+\subsection*{Section 2}
+\mpostfile{\jobname-sec2}
+
+\begin{mpostfig}[show,label={sec6}]
+drawcircle;
+label(btex 15 etex, (0,0));
+\end{mpostfig}
+\\
+filename: \mpostgetname{sec6}
+\texttt{\mpostfigurename}
+
+\begin{mpostdef}
+unit:=1.5cm;
+\end{mpostdef}
+
+\begin{mpostfig}[show,label={sec7}]
+drawcircle;
+label(btex 16 etex, (0,0));
+\end{mpostfig}
+\\
+filename: \mpostgetname{sec7}
+\texttt{\mpostfigurename}
+
+\mpostdone
+
+\subsection*{Section 3}
+\mpostfile{\jobname-sec3}
+
+\begin{mpostfig}[show,label={sec8}]
+drawcircle;
+label(btex 17 etex, (0,0));
+\end{mpostfig}
+\\
+filename: \mpostgetname{sec8}
+\texttt{\mpostfigurename}
+
+\mpostdone
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\end{document}
+\endinput
+%%
+%% End of file `mpinlsmp.tex'.
diff --git a/Master/texmf-dist/doc/latex/mpostinl/mpostinl.pdf b/Master/texmf-dist/doc/latex/mpostinl/mpostinl.pdf
new file mode 100644
index 00000000000..72e1dac5c68
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/mpostinl/mpostinl.pdf
Binary files differ