From 0d01365d53c456d246da0ca1f0b3cd9868f02b35 Mon Sep 17 00:00:00 2001
From: Taco Hoekwater <taco@elvenkind.com>
Date: Thu, 12 Jun 2008 10:42:53 +0000
Subject: ConTeXt release 2008.05.21

git-svn-id: svn://tug.org/texlive/trunk@8691 c570f23f-e606-0410-a88d-b1316a301751
---
 Master/texmf-dist/tex/context/base/x-ldx.tex | 133 +++++++++++++++++++++++++++
 1 file changed, 133 insertions(+)
 create mode 100644 Master/texmf-dist/tex/context/base/x-ldx.tex

(limited to 'Master/texmf-dist/tex/context/base/x-ldx.tex')

diff --git a/Master/texmf-dist/tex/context/base/x-ldx.tex b/Master/texmf-dist/tex/context/base/x-ldx.tex
new file mode 100644
index 00000000000..0d9350c1cd3
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/x-ldx.tex
@@ -0,0 +1,133 @@
+\defineregister[function][functions]
+\defineregister[variable][variables]
+
+\definehead[source][subject]
+\definehead[extra] [subsubject]
+\definehead[topic] [subsubsubject]
+
+\setuphead[source][style=\bfb]
+\setuphead[extra] [style=\bfa]
+\setuphead[topic] [style=\bf]
+
+\def\LDXkey     #1{\bold{#1}}
+\def\LDXfunction#1{\LDXkey{function} #1\function{#1}}
+\def\LDXvariable#1{#1\variable{#1}}
+\def\LDXcomment #1{{\tt--#1}}
+\def\LDXsource  #1{\source{#1}}
+
+\defineXMLenvironment
+    [ldx:document]
+    {\page}
+    {\determineregistercharacteristics[function]
+     \startmode[*register]
+        \extra{Functions}
+        \placeregister[function]
+     \stopmode
+     \determineregistercharacteristics[variable]
+     \startmode[*register]
+        \extra{Variables}
+        \placeregister[variable]
+     \stopmode}
+
+\defineXMLargument [ldx:source]   \LDXsource
+\defineXMLargument [ldx:key]      \LDXkey
+\defineXMLargument [ldx:variable] \LDXvariable
+\defineXMLargument [ldx:function] \LDXfunction
+\defineXMLargument [ldx:com]      \LDXcomment
+
+\newcounter\CommentCounter
+
+\defineXMLenvironment[ldx:comment]
+  {\endgraf
+   \blank
+   \doglobal\increment\CommentCounter
+   \margintitle{\bf\CommentCounter}}
+  {\blank
+   \endgraf}
+
+\defineXMLenvironment[ldx:dqs]
+  {\bgroup\tt"}
+  {"\egroup}
+
+\defineXMLenvironment[ldx:sqs]
+  {\bgroup\tt'}
+  {'\egroup}
+
+\defineXMLenvironment[ldx:code]
+  {\startpacked}
+  {\stoppacked}
+
+\defineXMLenvironment[ldx:line][n=0,comment=] % maybe hangindent or leftskip
+  {\dontleavehmode
+   \hbox to \hsize\bgroup
+   \strut\hskip\dimexpr\XMLop{n}em/4\relax\relax
+   \doif {\XMLop{comment}} {yes} {\tt}}
+  {\hss
+   \egroup
+   \endgraf}
+
+\defineXMLsingular[ldx:line]
+  {\crlf}
+
+\defineXMLargument [source] \LDXsource
+\defineXMLargument [key]    \LDXkey
+
+\defineXMLsingular[logo][label=,name=]
+  {\uppercasestring\XMLop{label}\XMLop{label}\to\ascii
+   \getvalue{\ascii}}
+
+\defineXMLsingular[l][l=,n=]
+  {\uppercasestring\XMLop{l}\XMLop{l}\to\ascii
+   \getvalue{\ascii}}
+
+\defineXMLenvironment
+  [typing]
+  {\blank
+   \startpacked \tt
+   \obeyspaces}
+  {\stoppacked
+   \blank}
+
+\defineXMLentity[amp]{\&}
+\defineXMLentity[lt] {<}
+\defineXMLentity[gt] {>}
+
+\usemodule[abr-02]
+
+\startnotmode[atpragma]
+    \definetypeface[mainfacenormal]  [ss][sans] [iwona]       [default]
+    \definetypeface[mainfacenormal]  [rm][serif][palatino]    [default]
+    \definetypeface[mainfacenormal]  [tt][mono] [modern]      [default][rscale=1.1]
+    \definetypeface[mainfacenormal]  [mm][math] [iwona]       [default][encoding=default]
+
+    \definetypeface[mainfacemedium]  [ss][sans] [iwona-medium][default]
+    \definetypeface[mainfacenormal]  [rm][serif][palatino]    [default]
+    \definetypeface[mainfacemedium]  [tt][mono] [modern]      [default][rscale=1.1]
+    \definetypeface[mainfacemedium]  [mm][math] [iwona-medium][default][encoding=default]
+
+    \definetypeface[mainfacenarrowtt][tt][mono] [modern-cond] [default][rscale=1.1]
+\stopnotmode
+
+\startmode[atpragma]
+    \usetypescriptfile[type-ghz]
+
+    \definetypeface[mainfacenormal]  [ss][sans] [optima-nova] [default]
+    \definetypeface[mainfacenormal]  [rm][serif][palatino]    [default]
+    \definetypeface[mainfacenormal]  [tt][mono] [modern]      [default][rscale=1.1]
+    \definetypeface[mainfacenormal]  [mm][math] [palatino]    [default][encoding=default]
+
+    \definetypeface[mainfacemedium]  [ss][sans] [optima-nova] [default]
+    \definetypeface[mainfacenormal]  [rm][serif][palatino]    [default]
+    \definetypeface[mainfacemedium]  [tt][mono] [modern]      [default][rscale=1.1]
+    \definetypeface[mainfacemedium]  [mm][math] [palatino]    [default][encoding=default]
+
+    \definetypeface[mainfacenarrowtt][tt][mono] [modern-cond] [default][rscale=1.1]
+\stopmode
+
+\setupbodyfont[mainfacenormal,11pt]
+
+\setupwhitespace[big]
+
+% \starttext
+%     \processXMLfilegrouped{\inputfilename}
+% \stoptext
-- 
cgit v1.2.3

