Mailing List Archive


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [tlug] genkou youshi templates



On Sun, 30 Mar 2008 09:26:21 -0700
"David Arroyo" <david.a.arroyo@example.com> wrote:

> I've become very good friends with the people in my Japanese class and
> I want to make them all japanese-style threadbound notebooks with
> genkoyoushi paper in them. I want to make them very personalized, so
> I've been looking for LaTeX templates for genkoyoushi paper so I could
> put their name and other stuff on them. However I haven't found any
> and I'm about to try and make them myself. Does anybody know of or
> have anything I can start from? It doesn't necessarily have to be
> LaTeX, it may be easier to use a graphics program. Conversely, would
> anybody be interested in the finished work?

Some time ago i was faced with a similar problem to create
papers with grids on them. Unfortunately, i wasn't able
to find a solution using latex. In the end i reverted
to a solution using a perl script to directly generating
postscript code. I attached the script, but beware that
it's very ugly (10min quick and dirty work). You should
be able to adjust it to create genkouyoushi without problem.

			Attila Kinali


-- 
Praised are the Fountains of Shelieth, the silver harp of the waters,
But blest in my name forever this stream that stanched my thirst!
                         -- Deed of Morred
#!/usr/bin/perl -w

# outputs a postscript file with a adjustable grid in it

use strict;

my $max_x = 595;
my $max_y = 841;
my $grid = 50;
my $inches = 2.54;

print "%!PS-Adobe-3.0\n";
print "%%BoundingBox: 0 0 $max_x $max_y\n";
print "%%Creator: gridgen 0.0.pi\n";
print "%%Pages: 1\n";
print "%%EndComments\n";
print "%%Page: 1\n";

sub modulo($$)
{
	my $a = shift;
	my $b = shift;

	return $a-int($a/$b)*$b;
}

print "% grid*inches=" . ($grid*$inches) . "\n";
my $tmp = modulo($max_x,$grid*$inches); 	print "% tmp=$tmp\n";
my $x_start = $tmp/2; 			print "% x_start=$x_start\n";
my $x_end = $max_x - $tmp/2;		print "% x_end=$x_end\n";
$tmp = modulo($max_y,$grid*$inches);	print "% tmp=$tmp\n";
my $y_start = $tmp/2;			print "% y_start=$y_start\n";
my $y_end = $max_y - $tmp/2;		print "% y_end=$y_end\n";

print "20 dict begin\n";
print "/setlineparms { [] 0 setdash 0 setlinecap 1 setlinejoin 10 setmiterlimit} def\n";
print "/ostroke { stroke setlineparms } def\n";
print "/endstroke { ostroke } def /npath { newpath } def\n";

print "setlineparms\n";
print "0.8 setlinewidth\n";

my ($i,$j);
for($i=$x_start;$i <= $x_end; $i+=$grid*$inches)
{
	print "npath\n";
	print "$i $y_start moveto\n";
	print "$i $y_end lineto endstroke\n";
}
for($i=$y_start;$i <= $y_end; $i+=$grid*$inches)
{
	print "npath\n";
	print "$x_start $i moveto\n";
	print "$x_end $i lineto endstroke\n";
}


print "showpage end\n";
print "%%EOF\n";

Home | Main Index | Thread Index

Home Page Mailing List Linux and Japan TLUG Members Links