[svn] r5818: wiki2pdf: Makefile parskip.sty totex

malekith svnadmin at nemerle.org
Fri Oct 14 00:32:36 CEST 2005


Log:
Add parskip package for more www-like look.

Author: malekith
Date: Fri Oct 14 00:32:35 2005
New Revision: 5818

Added:
   wiki2pdf/parskip.sty
Modified:
   wiki2pdf/Makefile
   wiki2pdf/totex

Modified: wiki2pdf/Makefile
==============================================================================
--- wiki2pdf/Makefile	(original)
+++ wiki2pdf/Makefile	Fri Oct 14 00:32:35 2005
@@ -1,5 +1,6 @@
 all:
-	RAISE_LEVEL=1 ./totex "Nemerle for OOP Programmers Week \\#1"
+	cp Nemerle_for_OOP_Programmers_Week_2.html output.html
+	RAISE_LEVEL=1 ./totex
 	acroread output.pdf
 
 clean:

Added: wiki2pdf/parskip.sty
==============================================================================
--- (empty file)
+++ wiki2pdf/parskip.sty	Fri Oct 14 00:32:35 2005
@@ -0,0 +1,87 @@
+% parskip.sty; last edited by Robin Fairbairns (rf10 at cam.ac.uk),
+%              derived from:
+%
+% This is PARSKIP.STY by H.Partl, TU Wien, as of 19 Jan 1989.
+%
+% Package to be used with any document class at any size.
+% It produces the following Paragraph Layout:
+%     Zero Parindent and non-zero Parskip. The stretchable glue in \parskip
+%     helps LaTeX in finding the best place for page breaks.
+%
+% This package is no more than quick fix; the `proper' way to achieve
+% effects as far-reaching as this is to create a new class.  An
+% example class is to be found in the ntgclass set: artikel3.cls
+
+\NeedsTeXFormat{LaTeX2e}
+\ProvidesPackage{parskip}[2001/04/09 non-zero parskip adjustments]
+
+\parskip=0.5\baselineskip \advance\parskip by 0pt plus 2pt
+\parindent=\z@
+     
+%
+% from a suggestion by Donald Arseneau on comp.text.tex:
+
+\DeclareOption{parfill}{\setlength{\parfillskip}{30\p@ \@plus 1fil}}
+\ProcessOptions
+
+% To accompany this, the vertical spacing in the list environments is changed
+% to use the same as \parskip in all relevant places (for normalsize only):
+%   \parsep = \parskip
+%   \itemsep = \z@ % add nothing to \parskip between items
+%   \topsep = \z@ % add nothing to \parskip before first item
+
+\def\@listI{\leftmargin\leftmargini
+   \topsep\z@ \parsep\parskip \itemsep\z@}
+\let\@listi\@listI
+\@listi
+     
+\def\@listii{\leftmargin\leftmarginii
+   \labelwidth\leftmarginii\advance\labelwidth-\labelsep
+   \topsep\z@ \parsep\parskip \itemsep\z@}
+     
+\def\@listiii{\leftmargin\leftmarginiii
+    \labelwidth\leftmarginiii\advance\labelwidth-\labelsep
+    \topsep\z@ \parsep\parskip \itemsep\z@}
+     
+% and, now...
+%   \partopsep = \z@ % don't even add anything before first item (beyond 
+%                    % \parskip) even if the list is preceded by a blank line
+\partopsep=\z@
+ 
+% Note that listiv, listv and listvi don't change vertical parameters.
+
+% deal with a problem raised on comp.text.tex in april 2001
+%
+% don't expand the table of contents any further
+%
+% first: check that the definition of \@starttoc is unchanged from
+% that in latex.ltx
+\@ifundefined{CheckCommand}{}{%
+  \CheckCommand*{\@starttoc}[1]{%
+    \begingroup
+      \makeatletter
+      \@input{\jobname.#1}%
+      \if at filesw
+        \expandafter\newwrite\csname tf@#1\endcsname
+        \immediate\openout \csname tf@#1\endcsname \jobname.#1\relax
+      \fi
+      \@nobreakfalse
+    \endgroup}}
+%
+% now having generated any warning that might help, redefine
+\renewcommand*{\@starttoc}[1]{%
+  \begingroup
+    \makeatletter
+    \parskip\z@
+    \@input{\jobname.#1}%
+    \if at filesw
+      \expandafter\newwrite\csname tf@#1\endcsname
+      \immediate\openout \csname tf@#1\endcsname \jobname.#1\relax
+    \fi
+    \@nobreakfalse
+  \endgroup
+}
+
+\endinput
+     
+     

Modified: wiki2pdf/totex
==============================================================================
--- wiki2pdf/totex	(original)
+++ wiki2pdf/totex	Fri Oct 14 00:32:35 2005
@@ -9,22 +9,28 @@
 my $title = shift;
 $title = "Nemerle documentation" unless defined $title;
 
+$header_commands = '
+\documentclass[a4paper]{article}
+\usepackage[latin2]{inputenc}
+\usepackage{fancyhdr}
+\usepackage[margin=2cm,tmargin=3cm]{geometry}
+\usepackage{graphicx}
+\usepackage{parskip}
+\usepackage[colorlinks,urlcolor=red,linkcolor=blue]{hyperref}
+
+\newcommand{\backslashent}{{$\backslash$}}
+\newcommand{\leftbrace}{{$\{$}}
+\newcommand{\rightbrace}{{$\}$}}
+\newcommand{\entlt}{{$<$}}
+\newcommand{\entgt}{{$>$}}
+\newcommand{\entbar}{{$|$}}
+\newcommand{\amp}{{\&}}
+\newcommand{\nbsp}{\hspace*{0.4em}}
+
+';
+
 print OUT <<EOF
-\\documentclass[a4paper]{article}
-\\usepackage[latin2]{inputenc}
-\\usepackage{fancyhdr}
-\\usepackage[margin=2cm,tmargin=3cm]{geometry}
-\\usepackage{graphicx}
-\\usepackage[colorlinks,urlcolor=red,linkcolor=blue]{hyperref}
-
-\\newcommand{\\backslashent}{{\$\\backslash\$}}
-\\newcommand{\\leftbrace}{{\$\\{\$}}
-\\newcommand{\\rightbrace}{{\$\\}\$}}
-\\newcommand{\\entlt}{{\$<\$}}
-\\newcommand{\\entgt}{{\$>\$}}
-\\newcommand{\\entbar}{{\$|\$}}
-\\newcommand{\\amp}{{\\&}}
-\\newcommand{\\nbsp}{\\hspace*{0.4em}}
+$header_commands
 
 \\title{$title}
 \\date{\\today}
@@ -180,16 +186,17 @@
       s/ /{\\nbsp}/g;
       $_ = fix_ent($_);
 
-    print OUT "\\vspace*{5mm}
+    print OUT "\\vspace*{3mm}
                \\hspace*{5mm}
 		      \\colorbox[rgb]{0.95,0.95,0.95}{
 		    \\hspace*{2mm}
-		    \\begin{minipage}{14cm}
+		    \\begin{minipage}{15cm}
 		      \\vspace*{2mm}
 		      \\noindent \\texttt{$_}
+		      \\vspace*{-2mm}
 		    \\end{minipage}
 		  }
-		\\vspace*{5mm}";
+		\\vspace*{3mm}";
 
     next;
   }



More information about the svn mailing list