diff options
author | Norbert Preining <norbert@preining.info> | 2019-09-02 13:46:59 +0900 |
---|---|---|
committer | Norbert Preining <norbert@preining.info> | 2019-09-02 13:46:59 +0900 |
commit | e0c6872cf40896c7be36b11dcc744620f10adf1d (patch) | |
tree | 60335e10d2f4354b0674ec22d7b53f0f8abee672 /support/hoffset-voffset |
Initial commit
Diffstat (limited to 'support/hoffset-voffset')
-rw-r--r-- | support/hoffset-voffset/README | 9 | ||||
-rw-r--r-- | support/hoffset-voffset/dimfile.txt | 0 | ||||
-rw-r--r-- | support/hoffset-voffset/hovo.pas | 69 | ||||
l--------- | support/hoffset-voffset/readme.txt | 1 |
4 files changed, 79 insertions, 0 deletions
diff --git a/support/hoffset-voffset/README b/support/hoffset-voffset/README new file mode 100644 index 0000000000..9b8998cf83 --- /dev/null +++ b/support/hoffset-voffset/README @@ -0,0 +1,9 @@ +How to calculate \hoffset and \voffset to center textbody, +header and footer on a page? Your must set up some initial +parameters and, of course, the \textwidth. This program will +compute such parameters as \hoffset, \voffset and \textheight. + +Best wishes, Anatoly A. Zabelin (Russia, Chita). +This material is subject to the LaTeX Project Public License. +See http://www.ctan.org/tex-archive/help/Catalogue/licenses.lppl.html +for the details of that license. diff --git a/support/hoffset-voffset/dimfile.txt b/support/hoffset-voffset/dimfile.txt new file mode 100644 index 0000000000..e69de29bb2 --- /dev/null +++ b/support/hoffset-voffset/dimfile.txt diff --git a/support/hoffset-voffset/hovo.pas b/support/hoffset-voffset/hovo.pas new file mode 100644 index 0000000000..f334dced09 --- /dev/null +++ b/support/hoffset-voffset/hovo.pas @@ -0,0 +1,69 @@ +uses crt; +const oneinch:longint=72; +var f:text; + paperwidth, + hoffset, + oddsidemargin, + textwidth, + marginparsep, + marginparwidth, + hsomething, + paperheight, + voffset, + topmargin, + headheight, + headsep, + textheight, + footskip, + vsomething:longint; +begin +clrscr; +assign(f,'dimfile.txt'); +rewrite(f); + +writeln('please input parameters (pt, one-side printing):'); +writeln(f,'layout parameters (pt, one-side printing):'); +write('\paperwidth=');readln(paperwidth); +write('\oddsidemargin=');readln(oddsidemargin); +write('\marginparsep=');readln(marginparsep); +write('\marginparwidth=');readln(marginparwidth); +write('\paperheight=');readln(paperheight); +write('\topmargin=');readln(topmargin); +write('\headheight=');readln(headheight); +write('\headsep=');readln(headsep); +write('\footskip=');readln(footskip); +write('ATTENTION! What do you want: \textwidth=');readln(textwidth); + +writeln(f,'\paperwidth=',paperwidth); +writeln(f,'\oddsidemargin=',oddsidemargin); +writeln(f,'\marginparsep=',marginparsep); +writeln(f,'\marginparwidth=',marginparwidth); +writeln(f,'\paperheight=',paperheight); +writeln(f,'\topmargin=',topmargin); +writeln(f,'\headheight=',headheight); +writeln(f,'\headsep=',headsep); +writeln(f,'\footskip=',footskip); +writeln(f,'ATTENTION! What do you want: \textwidth=',textwidth); + +hoffset:=(paperwidth-2*oneinch-2*oddsidemargin-textwidth)div(2); +writeln('Your \hoffset=',hoffset); +writeln(f,'Your \hoffset=',hoffset); + +voffset:=hoffset+oddsidemargin-topmargin; +writeln('Your \voffset=',voffset,' (if take header into account).'); +writeln(f,'Your \voffset=',voffset,' (if take header into account).'); +textheight:=paperheight-2*(oneinch+voffset+topmargin+headheight+headsep); +writeln('Your \textheight=',textheight,' (if take header into account).'); +writeln(f,'Your \textheight=',textheight,' (if take header into account).'); + +voffset:=hoffset+oddsidemargin-topmargin-headheight-headsep; +writeln('Your \voffset=',voffset,' (if not take header into account).'); +writeln(f,'Your \voffset=',voffset,' (if not take header into account).'); +textheight:=paperheight-2*(oneinch+voffset+topmargin+headheight+headsep); +writeln('Your \textheight=',textheight,' (if not take header into account).'); +writeln(f,'Your \textheight=',textheight,' (if not take header into account).'); + +close(f); +writeln('Done. Press [Enter]...'); +readln; +end.
\ No newline at end of file diff --git a/support/hoffset-voffset/readme.txt b/support/hoffset-voffset/readme.txt new file mode 120000 index 0000000000..100b93820a --- /dev/null +++ b/support/hoffset-voffset/readme.txt @@ -0,0 +1 @@ +README
\ No newline at end of file |