summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/generic/genmisc/epigram.tex
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/generic/genmisc/epigram.tex')
-rw-r--r--Master/texmf-dist/tex/generic/genmisc/epigram.tex20
1 files changed, 20 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/generic/genmisc/epigram.tex b/Master/texmf-dist/tex/generic/genmisc/epigram.tex
new file mode 100644
index 00000000000..e797ceba8ab
--- /dev/null
+++ b/Master/texmf-dist/tex/generic/genmisc/epigram.tex
@@ -0,0 +1,20 @@
+% From TeXMaG Volume 2, Number 6
+% Don Hosek <DHOSEK@HMCVAX.BITNET>
+%
+\long\def\epigram#1{% We use \long\def to allow the argument
+ % to span several paragraphs.
+ \bigskip % extra space above.
+ \setbox0=\hbox{#1} % put the text into a box
+ \ifdim\wd0>\critwidth %check the length
+ \centerline{\vtop{\hsize=\episize\noindent#1}}
+ % If the length is greater than
+ % the critical length, make a
+ % displayed paragraph
+ \else % otherwise, we just center the text.
+ \centerline{\box0}
+ \fi
+ \smallskip % extra space for the end.
+}
+
+\newdimen\critwidth \critwidth=.75\hsize
+\newdimen\episize \episize=.6\hsize