% [do_it_yourself_tex.tex] 
% version of 2019.03.17

%%%%%%%%%%%%%%%%   XETEX INPUTS    %%%%%%%%%%%%%
%      See  [FORM_PLAIN.tex ]  and the top of each macro file for
%          a discussion of the following

\input format_XETEX.mac  
\input unicode_latin.mac
\input macros.mac
\input ancestors.mac
\input additional.mac   
\input petr_olsak.mac
\input my_fonts.mac  
\input pstricks  
\input epsf        
\input color   
%%%%%%%%%%%%%%%%    END  XETEX INPUTS    %%%%%%%%%%%%%

%%%%%%%%%%%%%%%%    VARIOUS COMMANDS    %%%%%%%%%%%%%

\topglue  0pt       
\topskip  18pt      

\overfullrule=0pt
\tracingoutput  = 0   % file - minimum information ( =1  for full)
\tracingonline  = 0   % screen - minimum information ( =1  for full

%%%%%%%%%%%%%%%%   END  VARIOUS COMMANDS    %%%%%%%%%%%%%

%%%%%%%%%%%%%%%%%    DIMENSIONS    %%%%%%%%%%%%%
\pdfpageheight=11truein   % !!
\pdfpagewidth= 8.5truein   %!!

\vsize =  8.50 in       %!!  
{\hsize = 5.94 in      %!!

\voffset = 0.5 truecm   %!!
\hoffset = 0.70truecm    %!!

\baselineskip = 14pt    % default = 12pt	

%%%%%%%%%%%%%%%%%   END DIMENSIONS    %%%%%%%%%%%%%

%%%%%%%%%%%    FOOTER & HEADER          %%%%%%%%%%%%%%%%%

%         =======> 3 CHANGES TO MAKE   <=========

 \nopagenumbers
 
                 %       in final versions
 \pageno = 1     %   3 CHANGES TO MAKE 

 %  this  footer puts a page number in bold at the bottom of each page, EXCEPT FIRST
 \footline =  {      % THE FOOTLINE MATERIAL IS IN ENCLOSED IN {}  
                       \ifnum \pageno = 1   % do nothing  <== keep with false #      
                                    \else  
                                   {\centreline{\bf \folio}}  % centerline closes here for page #
                       \fi   % this  matches \ifnum	
                   } 	   
 %
                                  %           NO DATES HERE,  ONLY IN TITLE
\headline =  {% THE FOOTLINE MATERIAL IS IN ENCLOSED IN {} 
                     \centreline{    % CAN NOT PUT \centreline AFTER ELSE,  FOULS UP!
                               \ifnum \pageno = 1   % do nothing  <== keep with false #      
                      	            \else   
                                       {\bfthirteen Do It Yourself Tex}
                                \fi % THIS  MATCHES \IFNUM
                                   }   %THIS MATCHS CENTERLINE
                }   % THIS MATCHES { WITH \FOOTLINE  

%%%%%%%%%%%%%%%%%%%%  END FOOTER AND  HEADER  %%%%%%%%%%%%%%%%%%%%% 
%
% %%%%%%%%%%%%%%%%%%%%  TEXT STARTS % %%%%%%%%%%%%%%%%%%%% 
%
 {\rm   %  !! 12.5pt  I like a larger font, defined in [my_fonts.mac]
%
% 
{\verysmall . } % !! 0.1pt  used to move  text up via \vskip -20pt\nin  !!
%
\vskip -20pt\nin     % \nin = \noindent, see [format_XETEX.mac]
%
\centreline{\bftwenty Do It Yourself Tex}  %  \bftwenty is defined in [my_fonts.mac]
\mni
\centreline{\rmfifteen  March 17, 2019}  % \centreline is defined in [format_XETEX.mac] 
\mni                                                              % \mni = \medskip\noindent
\centreline{\rmfifteen Roger Herz-Fischler}
\mni                                                                           % unicode designation of ~
\centreline{\ttten  http://people.math.carleton.ca/\char"007E rhfischl/}
%
\vskip 15pt\nin

{\baselineskip = 11pt
\rmeleven
%
\centreline{C'est assez qu'ont ait vu par là qu'il ne faut point}
\pni
\hbox to 4.8truecm{} Agir chacun de même sort.
\pni
\hskip 5.6truecm{} \tiret La Fontaine \gl\fnotemark{1}
%
\par}  % end of quote
%
\fnotetext{{\it Fables\/}, \lq L'Ane chargé d'éponges et l'ane chargé de sel\rq}
%
%
\vskip 20pt\nin
%
%
\centreline{\bffourteen  Abstract}
\mni
This package consists of a collection of annotated and {\it easily modified\/}   forms and macro files, together with concrete examples which are intended to illustrate how {\it plain\/} Xe\TeX\ can be employed to typeset even quite complicated
documents. Various files illustrate how to directly use fonts of a specified type and size, how to find Unicode glyphs
and how to call them for use, how to import images, use colour etc.\gl .  Unicode tables of fonts and special glyphs \(arrows, geometric shapes \dots\) are included and an {\tt HTML} page provides direct links to font sources and further Unicode information.
\mni
A special section deals with right to left texts and the setting up of a unicode definition file which permits
the input of a pointed \(i.e. with the inclusion of vowel symbols\) text from a Latin keyboard. 
\vskip 15pt\nin
\centreline{\bffourteen  Contents}
\mni
\item{1.} Raison d'\ce tre
\mni
\item{2.} Fonts and Unicode
\sni
\itemitem{} Sources for Fonts and Unicode \({\tt HTML}\)
\mni
\item{3.} Forms and macro files
\sni
\itemitem{} Images, colour and marginal notes   
\mni
\item{4.} Text Samples
\sni
\itemitem{} Octave \(programming\) manual
\sni
\itemitem{} Genealogical texts
\sni
\itemitem{} Canadian aboriginal syllabics
\sni
\itemitem{}\[N.B. 
Further examples are available at the above web site\]
\mni
\item{5.} Right to Left Texts
\mni
\itemitem{} Texts in Hebrew, Arabic and ancient semitic scripts
%
\vfill\eject  % avoid splitting "shell"
% 
\item{6.} Shell files
\sni
\itemitem{} These include {\tt photos2eps},  {\tt  reduce},  {\tt  bak} and {\tt  del} to
quickly perform certain batch operations.
%
\vskip 18pt\nin
%
\centreline{\bffourteen   Raison d'\ce tre}
\mni
I started off using plain \TeX\ in the 1980s and over the years I developed forms, shortcuts,
font and font size definitions for use in my research books, teaching manuals, genealogical books etc.
\mni
In particular I would vary  the font and the font sizes from text to text and even within a text. As an
example, the present section headings are set in 14 point Libertine Roman Bold which is called by the command 
\bsl bffourteen. This
is defined in the macro file \[my\unl fonts.mac\] as:
\sni
\centreline{ \bsl font\bsl bffourteen =  \[\dots \fsl MY-FONTS\fsl LinLibertineRB.otf\] at 14.0 pt}
\sni
This definition leads to the unique directory MY-FONTS where I keep my fonts and also states the desired point size.
As the need for a new font or font size arose, a simple copy and paste and a few changes sufficed to create the
new definition.
\mni
The last paragraph illustrates some of the shortcuts that appear in the macro file \[format\unl XETEX.mac\]. Notice
that where it reads \lq \[my\unl fonts.mac\]\rq\
there is a little space \(in fact \bsl gl\) between the [\TH \] and \lq my\unl fonts.mac\rq\ and also
before and after the underscore. Instead
of writing the spacing commands I defined \bsl[,  \bsl ] and \bsl unl. Further I defined \bsl bsl so that I could quickly
typeset the commands themselves.
\mni
At one point, I told myself that I should learn La\TeX, but I became frustrated by the commands needed to change fonts and font sizes as well as spacings etc. It is obvious that there are some wonderful  La\TeX\ packages; however    even for importing images \(see Section 3\) I found that I could do it myself by writing simple shortcuts that I could quickly modify during trials and for different
purposes.
\mni
It was only last year that I came across Petr Olšák's {\it OPmac\tiret macros for plain\TeX\/} and from it I learned how
to create notes in the margin and a better way of creating tables. His manual inspired me to make my small contribution to
the world of plain \TeX\ in the hope that it would prove useful.
\mni
My pedagogical philosophy \(see e.g.\  the {\tt Octave} manual in the {\it Text Samples\/} di\-rec\-to\-ry\) has always been to aim for
clarity by avoiding
the most general form of a command and by  providing real examples. To this effect I have often made the commands visible in the
PDF output\tiret see \[images\unl colour\unl marginal-notes.pdf\]\tiret and by annotating other commands in the \TeX\ file.
%
%\vskip 15pt\nin
\vfill\eject
\nin
\centreline{\bffourteen Fonts and Unicode}
\mni
 Xe\TeX\ was created by Jonathan Kew in the 1990s with the idea of using Unicode based fonts. Thus, in order to facilate
 the use of  Xe\TeX,  and to avoid a great deal of searching by users,
 the directory {\tt FONTS+UNICODE} contains an  {\tt HTML} page entitled {\it Sources\_for\ Fonts and Unicode.html\/}\th
 which has direct links to various sites dealing with Unicode and sources of fonts. In addition there are two sub-directories; one 
 with tables for a selection of  fonts and the other some Unicode tables \(e.g. arrows\) which I generated.
 \mni
 Xe\TeX, which works without the necessity of further manipulation of classical Tex documents, 
in turn has a  further advantage as stated in connection with the CTAN package \lq xetex\rq:\Th \lq  Xe\TeX’s im­me­di­ate out­put is an
ex­tended vari­ant of DVI for­mat, which is or­di­nar­ily pro­cessed by a tightly bound pro­ces­sor (called xd­vipdfmx),
that pro­duces PDF\rq, i.e. if  you type:  xetex file\unl 01.tex,  you obtain: file\unl 01.pdf.
 \mni
Because of these advantages  it is assumed in the following discussions that plain Xe\TeX\ is being used.
 %
\vskip 15pt\nin
\centreline{\bffourteen Forms and Macro Files}
\mni
\[N.B. Because I work with so many \TeX\ files, often at the same time, I did not want to use the extension \lq tex\rq\ for what
I refer to as macro files. I decided to use the extension \lq mac\rq. This, of course, can be changed to suit
the user's taste.\]
\mni
This directory contains the following macro files; additional information is given at the top of each file. 
\mni
%
\item{} \[format\unl XETEX.mac\].   This contains a collection of shortcuts for spacings, special symbols, etc.\
that I created over the years, e.g  instead of repeatedly typing \bsl medskip\bsl noindent, I only have to type \bsl mni.
\mni
\item{} \[unicode\unl latin.mac\]. These provide  for the entry  of
            French and German accented letters without switching keyboards;
            e.g.\  typing \bsl ge will produce the \lq e-grave\rq\ letter \ge\gl. The same can be done
            for other languages as the file \[unicode\unl hebrew.mac\]
\mni            
\item{} \[macros.mac\].  These are macros with a specified text, e.g.
\itemitem{} Typing
\bsl infobox\lbr This is an information box\rbr\ produces:
%
\infobox{This is an information box}
%
\vskip -8pt\nin
%
\item{} \[ancestors.mac\]. This is included to suggest how one can save a great deal of
              typing by using
              abbreviations  for repeated items.
            \mni
\item{} \[additional.mac\].   This contains \bsl printdate and \bsl raggedleft \(for right to left texts\).
\mni
\item{} \[petr\unl olsak.mac\]. This is a {\it verbatim\/} copy of
Petr Olšák's {\it OPmac\tiret macros for plain\TeX\/}\tiret used here with his permission\tiret
which was renamed to clearly indicate
the author. The directory also contains a copy of his manual, again with the title changed.
\mni
% 
\item{} \[my\unl fonts.mac\]. This contains all the font definitions, e.g.\  \bsl bftwenty   
\mni
In addition the directory contains the following forms and texts.
\mni
\item{}\[FORM\unl PLAIN.tex\]. This is an easily modifiable \lq good to go\rq\ form with all the inputs and dimensions
present and in addition contains a sub-form for headers and numbering.
\mni
\item{} \[letter\unl form.tex\].  This letter form has a provision for automatically adding\tiret via PSTRICKS\tiret
your signature.
\mni
\item{}\[images-colour-marginal-notes.tex\]. This illustrates how to use  PSTRICKS to import and rotate images, 
     how to add marginal notes,
             using \[petr\unl olsak.mac\], and  colour using \bsl color.
\mni
\item{}\[two-columns.tex]. There is also a multi-column command in \[petr\unl olsak.mac\].
\mni
\item{} \[calling\unl glyphs.tex\]. This explains how to find glyphs and how to call them for use.
\mni
\item{}  \[font\unl size.tex\] . This explains how do find the actual point values associated with a font at a given
nominal value
\mni
A sub-directory contains the forms and macro files for right to left languages.
\vskip 15pt\nin
\centreline{\bffourteen   Text Samples}
\mni
This   directory contains illustrative excerpts, with both the \TeX\ and the corresponding PDF files, in three 
very different areas: a programming manual; a genealogical book and names written in Canadian aboriginal syllabics.
%
%\vfill\eject
\vskip 15pt\nin
%
\centreline{\bffourteen   Right to Left Texts}
\mni
A special, again with a ready to use form and the macro files
in this directory, illustrates the use of the bi-directional command \bsl bidi.
\mni
This section contains the following illustrative texts:
\mni
\itemitem{} A Biblical text with both coded and imported Hebrew and the use of marginal notes to indicate the verse numbers and
also to signal a special feature in the text. In addition it illustrates how one
switches from a right to left text to a left to right text.
\sni
\itemitem{} A discussion of  a fragment from the {\it Dead Sea Scrolls\/}. This file includes two imported
images and the same  text  set\tiret via the importation of the Biblical text from a web source\tiret
in  four different fonts: \lq square\rq\ letters \(i.e.\ the present day forms\),   two different ancient
semitic letters and  Samaritan \(still in use\).
\sni
\itemitem{} A sample Arabic text  with an imported portion of the {\it Quran\/} and the use
of \[petr\unl olsak.mac\] to create a table.

%%%%%%%%%%%%%%%%%%%%%%%%%%%
	      % KEEP THIS ENDING!!!   had when needed headers
\vfill\eject 
%%
            }  %  ends roman
	    \par} % ends \hsize
	    \bye
	    
%%%%%%%%%%%%%%%  FORMS %%%%%%%%%%%%%%%%
%   
% PSTRICKS FORM	  
	  \centreline{\epsfxsize = 6.5truein\epsfbox{*.eps}}
\vskip 4 truept
          \centreline{}
%
\vskip 0.7cm\nin 
%
	    
	   
