From 007f67a693e4d031fd3d792df8e4d5f43e2cb2e7 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Mon, 9 Jan 2006 00:49:07 +0000 Subject: doc/latex git-svn-id: svn://tug.org/texlive/trunk@84 c570f23f-e606-0410-a88d-b1316a301751 --- .../rotpages/Examples/rotpages-doublecolumn-ex.pdf | Bin 0 -> 38915 bytes .../rotpages/Examples/rotpages-doublecolumn-ex.tex | 319 +++++++++++++++++++ .../latex/rotpages/Examples/rotpages-fancy-ex.pdf | Bin 0 -> 38956 bytes .../latex/rotpages/Examples/rotpages-fancy-ex.tex | 340 +++++++++++++++++++++ .../rotpages/Examples/rotpages-singlecolumn-ex.pdf | Bin 0 -> 38522 bytes .../rotpages/Examples/rotpages-singlecolumn-ex.tex | 319 +++++++++++++++++++ Master/texmf-dist/doc/latex/rotpages/README | 25 ++ .../texmf-dist/doc/latex/rotpages/rotpages-doc.pdf | Bin 0 -> 56410 bytes .../texmf-dist/doc/latex/rotpages/rotpages-doc.tex | 214 +++++++++++++ 9 files changed, 1217 insertions(+) create mode 100644 Master/texmf-dist/doc/latex/rotpages/Examples/rotpages-doublecolumn-ex.pdf create mode 100644 Master/texmf-dist/doc/latex/rotpages/Examples/rotpages-doublecolumn-ex.tex create mode 100644 Master/texmf-dist/doc/latex/rotpages/Examples/rotpages-fancy-ex.pdf create mode 100644 Master/texmf-dist/doc/latex/rotpages/Examples/rotpages-fancy-ex.tex create mode 100644 Master/texmf-dist/doc/latex/rotpages/Examples/rotpages-singlecolumn-ex.pdf create mode 100644 Master/texmf-dist/doc/latex/rotpages/Examples/rotpages-singlecolumn-ex.tex create mode 100644 Master/texmf-dist/doc/latex/rotpages/README create mode 100644 Master/texmf-dist/doc/latex/rotpages/rotpages-doc.pdf create mode 100644 Master/texmf-dist/doc/latex/rotpages/rotpages-doc.tex (limited to 'Master/texmf-dist/doc/latex/rotpages') diff --git a/Master/texmf-dist/doc/latex/rotpages/Examples/rotpages-doublecolumn-ex.pdf b/Master/texmf-dist/doc/latex/rotpages/Examples/rotpages-doublecolumn-ex.pdf new file mode 100644 index 00000000000..f0664bef32e Binary files /dev/null and b/Master/texmf-dist/doc/latex/rotpages/Examples/rotpages-doublecolumn-ex.pdf differ diff --git a/Master/texmf-dist/doc/latex/rotpages/Examples/rotpages-doublecolumn-ex.tex b/Master/texmf-dist/doc/latex/rotpages/Examples/rotpages-doublecolumn-ex.tex new file mode 100644 index 00000000000..fce34674f3a --- /dev/null +++ b/Master/texmf-dist/doc/latex/rotpages/Examples/rotpages-doublecolumn-ex.tex @@ -0,0 +1,319 @@ +\documentclass[12pt,twoside,twocolumn]{article} +\usepackage[a4paper,headheight=4ex]{geometry} +\usepackage{times} +\usepackage{rotpages} +\usepackage{fancyhdr} + +\title{\texttt{rotpages.sty} --- Multiple page rotation in \LaTeX\\ + Example file} +\author{Sergio Callegari} +\date{January 1st, 2003} + +\fancyhead[LE]{\emph{rotpages.sty}} +\fancyhead[RO]{Multiple page rotation in \LaTeX} +\fancyfoot{} +\fancyfoot[L]{{\footnotesize Example file for a two column document.}} +\fancyfoot[R]{\thepage} + + +\begin{document} +\sloppy +\pagestyle{fancy} +\maketitle +\thispagestyle{fancy} + +This is the first column of the document. In this document we take +advantage only of the simplest features of the \texttt{rotpages.sty} +package, i.e.\@ we only use the basic \verb|\rotboxpages| and +\verb|\endrotboxpages| commands. + + +The first columns are typeset normally. To fill them a little, we include +the first part of \emph{Pinocchio} by Carlo Collodi. + +\bigskip +{\slshape% + \textbf{CHAPTER 1} + + \emph{How it happened that Mastro Cherry, carpenter, + found a piece of wood that wept and laughed like a child} + \medskip + + Centuries ago there lived --- + + "A king!" my little readers will say immediately. + + No, children, you are mistaken. Once upon a time + there was a piece of wood. It was not an expensive piece + of wood. Far from it. Just a common block of firewood, + one of those thick, solid logs that are put on the fire in + winter to make cold rooms cozy and warm. + + I do not know how this really happened, yet the fact + remains that one fine day this piece of wood found itself + in the shop of an old carpenter. His real name was + Mastro Antonio, but everyone called him Mastro Cherry, + for the tip of his nose was so round and red and shiny + that it looked like a ripe cherry. + + As soon as he saw that piece of wood, Mastro Cherry + was filled with joy. Rubbing his hands together happily, + he mumbled half to himself: + + "This has come in the nick of time. I shall use it to + make the leg of a table." + + He grasped the hatchet quickly to peel off the bark and + shape the wood. But as he was about to give it the first + blow, he stood still with arm uplifted, for he had heard a + wee, little voice say in a beseeching tone: "Please be careful! + Do not hit me so hard!" + + What a look of surprise shone on Mastro Cherry's + face! His funny face became still funnier. + + He turned frightened eyes about the room to find out + where that wee, little voice had come from and he saw + no one! He looked under the bench--no one! He peeped + inside the closet--no one! He searched among the shavings-- + no one! He opened the door to look up and down + the street--and still no one! + + "Oh, I see!" he then said, laughing and scratching his Wig. + "It can easily be seen that I only thought I heard the tiny + voice say the words! Well, well--to work once more." + + He struck a most solemn blow upon the piece of wood. + + "Oh, oh! You hurt!" cried the same far-away little voice. + + Mastro Cherry grew dumb, his eyes popped out of his + head, his mouth opened wide, and his tongue hung down + on his chin. + + As soon as he regained the use of his senses, he said, + trembling and stuttering from fright: + + "Where did that voice come from, when there is no + one around? Might it be that this piece of wood has + learned to weep and cry like a child? I can hardly + believe it. Here it is--a piece of common firewood, good + only to burn in the stove, the same as any other. Yet-- + might someone be hidden in it? If so, the worse for him. + I'll fix him!" + + With these words, he grabbed the log with both hands + and started to knock it about unmercifully. He threw it + to the floor, against the walls of the room, and even up + to the ceiling. + + He listened for the tiny voice to moan and cry. + He waited two minutes--nothing; five minutes--nothing; + ten minutes--nothing. + + "Oh, I see," he said, trying bravely to laugh and + ruffling up his wig with his hand. "It can easily be seen + I only imagined I heard the tiny voice! Well, well--to + work once more!" + + The poor fellow was scared half to death, so he tried + to sing a gay song in order to gain courage. + + He set aside the hatchet and picked up the plane to + make the wood smooth and even, but as he drew it to + and fro, he heard the same tiny voice. This time it giggled + as it spoke: + + "Stop it! Oh, stop it! Ha, ha, ha! You tickle my stomach." + + This time poor Mastro Cherry fell as if shot. When + he opened his eyes, he found himself sitting on the floor. + + His face had changed; fright had turned even the tip of + his nose from red to deepest purple. + +} +\bigskip +Note that the next columns are upside down. + +\rotboxpages% +Here come the rotated columns. Note that while formatting the +document, this column is \emph{deferred}, until all the block of rotated +columns is processed. In this way, this column is printed as the last one +of the block. However, if the printed work is read upside down, this +column correctly appears as the first of the block. + +Obviously, also this column contains the continuation of the novel: + +\bigskip +{\slshape% + + \textbf{CHAPTER 2} + + \emph{Mastro Cherry gives the piece of wood to his friend Geppetto, + who takes it to make himself a Marionette that will dance, + fence, and turn somersaults} + \medskip + + In that very instant, a loud knock sounded on the door. + "Come in," said the carpenter, not having an atom of + strength left with which to stand up. + + At the words, the door opened and a dapper little old man came in. + His name was Geppetto, but to the boys of the neighborhood he was + Polendina\footnote{Corneal mush}, on account of the wig he always + wore which was just the color of yellow corn. + +} + +\bigbreak + +Here we make a small break in the story. Please, take a second to +observe how the column content is rotated, while the page headers and +footers, comprising the page number, are printed with the standard +orientation. Take also a quick look at the footnote and observe that +it is in the right place. + +Note also that in order to introduce a frame, the rotated columns are +slightly smaller (i.e.\@ they contain a little less text than the +normal ones.) + +After this informative bit, it is time for some more Pinocchio: + +\bigskip +{\slshape% + Geppetto had a very bad temper. Woe to the one who + called him Polendina! He became as wild as a beast and + no one could soothe him. + + "Good day, Mastro Antonio," said Geppetto. "What + are you doing on the floor?" + + "I am teaching the ants their A B C's." + + "Good luck to you!" + + "What brought you here, friend Geppetto?" + + "My legs. And it may flatter you to know, Mastro + Antonio, that I have come to you to beg for a favor." + + "Here I am, at your service," answered the carpenter, + raising himself on to his knees. + + "This morning a fine idea came to me." + + "Let's hear it." + + "I thought of making myself a beautiful wooden + Marionette. It must be wonderful, one that will be able to + dance, fence, and turn somersaults. With it I intend to go + around the world, to earn my crust of bread and cup of + wine. What do you think of it?" + + "Bravo, Polendina!" cried the same tiny voice which + came from no one knew where. + + On hearing himself called Polendina, Mastro Geppetto + turned the color of a red pepper and, facing the carpenter, + said to him angrily: + + "Why do you insult me?" + + "Who is insulting you?" + + "You called me Polendina." + + "I did not." + + "I suppose you think \_I\_ did! Yet I KNOW it was you." + + "No!" + + "Yes!" + + "No!" + + "Yes!" + + And growing angrier each moment, they went from + words to blows, and finally began to scratch and bite and + slap each other. + + When the fight was over, Mastro Antonio had Geppetto's + yellow wig in his hands and Geppetto found the carpenter's + curly wig in his mouth. + + "Give me back my wig!" shouted Mastro Antonio in a surly voice. + + "You return mine and we'll be friends." + + The two little old men, each with his own wig back on + his own head, shook hands and swore to be good friends + for the rest of their lives. + + "Well then, Mastro Geppetto," said the carpenter, to + show he bore him no ill will, "what is it you want?" + + "I want a piece of wood to make a Marionette. Will you give it to + me?" + + Mastro Antonio, very glad indeed, went immediately + to his bench to get the piece of wood which had frightened + him so much. But as he was about to give it to his friend, + with a violent jerk it slipped out of his hands and hit + against poor Geppetto's thin legs. + + "Ah! Is this the gentle way, Mastro Antonio, in which + you make your gifts? You have made me almost lame!" + + "I swear to you I did not do it!" + + "It was \_I\_, of course!" + + "It's the fault of this piece of wood." + + "You're right; but remember you were the one to throw it at my legs." + + "I did not throw it!" + + "Liar!" + + "Geppetto, do not insult me or I shall call you Polendina." + + "Idiot." + + "Polendina!" + + "Donkey!" + + "Polendina!" + + "Ugly monkey!" + + "Polendina!" + + On hearing himself called Polendina for the third time, + Geppetto lost his head with rage and threw himself upon + the carpenter. Then and there they gave each other a + sound thrashing. + + After this fight, Mastro Antonio had two more scratches + on his nose, and Geppetto had two buttons missing from + his coat. Thus having settled their accounts, they shook + hands and swore to be good friends for the rest of their lives. + + Then Geppetto took the fine piece of wood, + thanked Mastro Antonio, and limped away toward home. +} +\endrotboxpages + +And the normal behaviur of \LaTeX is back! +Exiting isn't it? So don't forget to tell your friends about this new +package! +\end{document} + +%%% Local Variables: +%%% mode: latex +%%% TeX-master: t +%%% End: diff --git a/Master/texmf-dist/doc/latex/rotpages/Examples/rotpages-fancy-ex.pdf b/Master/texmf-dist/doc/latex/rotpages/Examples/rotpages-fancy-ex.pdf new file mode 100644 index 00000000000..3770ebc6b53 Binary files /dev/null and b/Master/texmf-dist/doc/latex/rotpages/Examples/rotpages-fancy-ex.pdf differ diff --git a/Master/texmf-dist/doc/latex/rotpages/Examples/rotpages-fancy-ex.tex b/Master/texmf-dist/doc/latex/rotpages/Examples/rotpages-fancy-ex.tex new file mode 100644 index 00000000000..7676e4cdec1 --- /dev/null +++ b/Master/texmf-dist/doc/latex/rotpages/Examples/rotpages-fancy-ex.tex @@ -0,0 +1,340 @@ +\documentclass[12pt,twoside]{article} +\usepackage[a4paper,headheight=4ex]{geometry} +\usepackage{times} +\usepackage{rotpages} +\usepackage{fancyhdr} + +\title{\texttt{rotpages.sty} --- Multiple page rotation in \LaTeX\\ + Example file} +\author{Sergio Callegari} +\date{January 1st, 2003} + +\fancyhead[LE]{\emph{rotpages.sty}} +\fancyhead[RO]{Multiple page rotation in \LaTeX} +\fancyfoot{} +\fancyfoot[L]{{\footnotesize Example file for a fancy document.}} +\fancyfoot[R]{\thepage} + + +\begin{document} +\sloppy +\pagestyle{fancy} +\maketitle +\thispagestyle{fancy} + +\newcounter{rotpg} +\setlength{\rotboxheight}{\vsize-9ex-1pt} +\setlength{\rotboxwidth}{\hsize-4ex-1pt} + +\renewcommand{\rotboxAtRotationHook}[1]{% + \addtocounter{rotpg}{1}% + {\fboxsep 2ex% + \fbox{\parbox{\linewidth}{% + \scalebox{-1}{\footnotesize\textsc{Rotated page \therotpg}}\\ + #1}}}} +\renewcommand{\rotboxAtShippingHook}[1]{% + \parbox{\linewidth}{% + \rule{\linewidth}{0.5pt}\\[-1ex] + \hspace*{0pt}\hfill CAPOVOLGERE IL TESTO PER LEGGERE CORRETTAMENTE QUESTA + PAGINA\hfill\hspace*{0pt}\\ + #1\\ + \hspace*{0pt}\hfill CAPOVOLGERE IL TESTO PER LEGGERE CORRETTAMENTE QUESTA + PAGINA\hfill\hspace*{0pt}\\[-2ex]% + \rule{\linewidth}{0.5pt} + }} + +This is the first page of the document. In this document we take +advantage only of the more complex features of the \texttt{rotpages.sty} +package, i.e.\@ we only use the \emph{hook} commands to do some fancy +framing of the pages. + + +The first pages are typeset normally. To fill them a little, we include +the first part of \emph{Pinocchio} by Carlo Collodi. + +\bigskip +{\slshape% + \textbf{CHAPTER 1} + + \emph{How it happened that Mastro Cherry, carpenter, + found a piece of wood that wept and laughed like a child} + \medskip + + Centuries ago there lived --- + + "A king!" my little readers will say immediately. + + No, children, you are mistaken. Once upon a time + there was a piece of wood. It was not an expensive piece + of wood. Far from it. Just a common block of firewood, + one of those thick, solid logs that are put on the fire in + winter to make cold rooms cozy and warm. + + I do not know how this really happened, yet the fact + remains that one fine day this piece of wood found itself + in the shop of an old carpenter. His real name was + Mastro Antonio, but everyone called him Mastro Cherry, + for the tip of his nose was so round and red and shiny + that it looked like a ripe cherry. + + As soon as he saw that piece of wood, Mastro Cherry + was filled with joy. Rubbing his hands together happily, + he mumbled half to himself: + + "This has come in the nick of time. I shall use it to + make the leg of a table." + + He grasped the hatchet quickly to peel off the bark and + shape the wood. But as he was about to give it the first + blow, he stood still with arm uplifted, for he had heard a + wee, little voice say in a beseeching tone: "Please be careful! + Do not hit me so hard!" + + What a look of surprise shone on Mastro Cherry's + face! His funny face became still funnier. + + He turned frightened eyes about the room to find out + where that wee, little voice had come from and he saw + no one! He looked under the bench--no one! He peeped + inside the closet--no one! He searched among the shavings-- + no one! He opened the door to look up and down + the street--and still no one! + + "Oh, I see!" he then said, laughing and scratching his Wig. + "It can easily be seen that I only thought I heard the tiny + voice say the words! Well, well--to work once more." + + He struck a most solemn blow upon the piece of wood. + + "Oh, oh! You hurt!" cried the same far-away little voice. + + Mastro Cherry grew dumb, his eyes popped out of his + head, his mouth opened wide, and his tongue hung down + on his chin. + + As soon as he regained the use of his senses, he said, + trembling and stuttering from fright: + + "Where did that voice come from, when there is no + one around? Might it be that this piece of wood has + learned to weep and cry like a child? I can hardly + believe it. Here it is--a piece of common firewood, good + only to burn in the stove, the same as any other. Yet-- + might someone be hidden in it? If so, the worse for him. + I'll fix him!" + + With these words, he grabbed the log with both hands + and started to knock it about unmercifully. He threw it + to the floor, against the walls of the room, and even up + to the ceiling. + + He listened for the tiny voice to moan and cry. + He waited two minutes--nothing; five minutes--nothing; + ten minutes--nothing. + + "Oh, I see," he said, trying bravely to laugh and + ruffling up his wig with his hand. "It can easily be seen + I only imagined I heard the tiny voice! Well, well--to + work once more!" + + The poor fellow was scared half to death, so he tried + to sing a gay song in order to gain courage. + + He set aside the hatchet and picked up the plane to + make the wood smooth and even, but as he drew it to + and fro, he heard the same tiny voice. This time it giggled + as it spoke: + + "Stop it! Oh, stop it! Ha, ha, ha! You tickle my stomach." + + This time poor Mastro Cherry fell as if shot. When + he opened his eyes, he found himself sitting on the floor. + + His face had changed; fright had turned even the tip of + his nose from red to deepest purple. + +} +\bigskip +Note that the next pages are upside down. + +\rotboxpages% +Here come the rotated pages. Note that while formatting the +document, this page is \emph{deferred}, until all the block of rotated +pages is processed. In this way, this page is printed as the last one +of the block. However, if the printed work is read upside down, this +page correctly appears as the first of the block. + +Obviously, also this page contains the continuation of the novel: + +\bigskip +{\slshape% + + \textbf{CHAPTER 2} + + \emph{Mastro Cherry gives the piece of wood to his friend Geppetto, + who takes it to make himself a Marionette that will dance, + fence, and turn somersaults} + \medskip + + In that very instant, a loud knock sounded on the door. + "Come in," said the carpenter, not having an atom of + strength left with which to stand up. + + At the words, the door opened and a dapper little old man came in. + His name was Geppetto, but to the boys of the neighborhood he was + Polendina\footnote{Corneal mush}, on account of the wig he always + wore which was just the color of yellow corn. + +} + +\bigbreak + +Here we make a small break in the story. Please, take a second to +observe how the page content is rotated, while the page headers and +footers, comprising the page number, are printed with the standard +orientation. Take also a quick look at the footnote and observe that +it is in the right place. + +Note also that in order to introduce a frame, the rotated pages are +slightly smaller (i.e.\@ they contain a little less text than the +normal ones.) + +After this informative bit, it is time for some more Pinocchio: + +\bigskip +{\slshape% + Geppetto had a very bad temper. Woe to the one who + called him Polendina! He became as wild as a beast and + no one could soothe him. + + "Good day, Mastro Antonio," said Geppetto. "What + are you doing on the floor?" + + "I am teaching the ants their A B C's." + + "Good luck to you!" + + "What brought you here, friend Geppetto?" + + "My legs. And it may flatter you to know, Mastro + Antonio, that I have come to you to beg for a favor." + + "Here I am, at your service," answered the carpenter, + raising himself on to his knees. + + "This morning a fine idea came to me." + + "Let's hear it." + + "I thought of making myself a beautiful wooden + Marionette. It must be wonderful, one that will be able to + dance, fence, and turn somersaults. With it I intend to go + around the world, to earn my crust of bread and cup of + wine. What do you think of it?" + + "Bravo, Polendina!" cried the same tiny voice which + came from no one knew where. + + On hearing himself called Polendina, Mastro Geppetto + turned the color of a red pepper and, facing the carpenter, + said to him angrily: + + "Why do you insult me?" + + "Who is insulting you?" + + "You called me Polendina." + + "I did not." + + "I suppose you think \_I\_ did! Yet I KNOW it was you." + + "No!" + + "Yes!" + + "No!" + + "Yes!" + + And growing angrier each moment, they went from + words to blows, and finally began to scratch and bite and + slap each other. + + When the fight was over, Mastro Antonio had Geppetto's + yellow wig in his hands and Geppetto found the carpenter's + curly wig in his mouth. + + "Give me back my wig!" shouted Mastro Antonio in a surly voice. + + "You return mine and we'll be friends." + + The two little old men, each with his own wig back on + his own head, shook hands and swore to be good friends + for the rest of their lives. + + "Well then, Mastro Geppetto," said the carpenter, to + show he bore him no ill will, "what is it you want?" + + "I want a piece of wood to make a Marionette. Will you give it to + me?" + + Mastro Antonio, very glad indeed, went immediately + to his bench to get the piece of wood which had frightened + him so much. But as he was about to give it to his friend, + with a violent jerk it slipped out of his hands and hit + against poor Geppetto's thin legs. + + "Ah! Is this the gentle way, Mastro Antonio, in which + you make your gifts? You have made me almost lame!" + + "I swear to you I did not do it!" + + "It was \_I\_, of course!" + + "It's the fault of this piece of wood." + + "You're right; but remember you were the one to throw it at my legs." + + "I did not throw it!" + + "Liar!" + + "Geppetto, do not insult me or I shall call you Polendina." + + "Idiot." + + "Polendina!" + + "Donkey!" + + "Polendina!" + + "Ugly monkey!" + + "Polendina!" + + On hearing himself called Polendina for the third time, + Geppetto lost his head with rage and threw himself upon + the carpenter. Then and there they gave each other a + sound thrashing. + + After this fight, Mastro Antonio had two more scratches + on his nose, and Geppetto had two buttons missing from + his coat. Thus having settled their accounts, they shook + hands and swore to be good friends for the rest of their lives. + + Then Geppetto took the fine piece of wood, + thanked Mastro Antonio, and limped away toward home. +} +\endrotboxpages + +And the normal behaviur of \LaTeX is back! +Exiting isn't it? So don't forget to tell your friends about this new +package! +\end{document} + +%%% Local Variables: +%%% mode: latex +%%% TeX-master: t +%%% End: diff --git a/Master/texmf-dist/doc/latex/rotpages/Examples/rotpages-singlecolumn-ex.pdf b/Master/texmf-dist/doc/latex/rotpages/Examples/rotpages-singlecolumn-ex.pdf new file mode 100644 index 00000000000..605c848c194 Binary files /dev/null and b/Master/texmf-dist/doc/latex/rotpages/Examples/rotpages-singlecolumn-ex.pdf differ diff --git a/Master/texmf-dist/doc/latex/rotpages/Examples/rotpages-singlecolumn-ex.tex b/Master/texmf-dist/doc/latex/rotpages/Examples/rotpages-singlecolumn-ex.tex new file mode 100644 index 00000000000..6a12db87ffb --- /dev/null +++ b/Master/texmf-dist/doc/latex/rotpages/Examples/rotpages-singlecolumn-ex.tex @@ -0,0 +1,319 @@ +\documentclass[12pt,twoside]{article} +\usepackage[a4paper,headheight=4ex]{geometry} +\usepackage{times} +\usepackage{rotpages} +\usepackage{fancyhdr} + +\title{\texttt{rotpages.sty} --- Multiple page rotation in \LaTeX\\ + Example file} +\author{Sergio Callegari} +\date{January 1st, 2003} + +\fancyhead[LE]{\emph{rotpages.sty}} +\fancyhead[RO]{Multiple page rotation in \LaTeX} +\fancyfoot{} +\fancyfoot[L]{{\footnotesize Example file for a single column document.}} +\fancyfoot[R]{\thepage} + + +\begin{document} +\sloppy +\pagestyle{fancy} +\maketitle +\thispagestyle{fancy} + +This is the first page of the document. In this document we take +advantage only of the simplest features of the \texttt{rotpages.sty} +package, i.e.\@ we only use the basic \verb|\rotboxpages| and +\verb|\endrotboxpages| commands. + + +The first pages are typeset normally. To fill them a little, we include +the first part of \emph{Pinocchio} by Carlo Collodi. + +\bigskip +{\slshape% + \textbf{CHAPTER 1} + + \emph{How it happened that Mastro Cherry, carpenter, + found a piece of wood that wept and laughed like a child} + \medskip + + Centuries ago there lived --- + + "A king!" my little readers will say immediately. + + No, children, you are mistaken. Once upon a time + there was a piece of wood. It was not an expensive piece + of wood. Far from it. Just a common block of firewood, + one of those thick, solid logs that are put on the fire in + winter to make cold rooms cozy and warm. + + I do not know how this really happened, yet the fact + remains that one fine day this piece of wood found itself + in the shop of an old carpenter. His real name was + Mastro Antonio, but everyone called him Mastro Cherry, + for the tip of his nose was so round and red and shiny + that it looked like a ripe cherry. + + As soon as he saw that piece of wood, Mastro Cherry + was filled with joy. Rubbing his hands together happily, + he mumbled half to himself: + + "This has come in the nick of time. I shall use it to + make the leg of a table." + + He grasped the hatchet quickly to peel off the bark and + shape the wood. But as he was about to give it the first + blow, he stood still with arm uplifted, for he had heard a + wee, little voice say in a beseeching tone: "Please be careful! + Do not hit me so hard!" + + What a look of surprise shone on Mastro Cherry's + face! His funny face became still funnier. + + He turned frightened eyes about the room to find out + where that wee, little voice had come from and he saw + no one! He looked under the bench--no one! He peeped + inside the closet--no one! He searched among the shavings-- + no one! He opened the door to look up and down + the street--and still no one! + + "Oh, I see!" he then said, laughing and scratching his Wig. + "It can easily be seen that I only thought I heard the tiny + voice say the words! Well, well--to work once more." + + He struck a most solemn blow upon the piece of wood. + + "Oh, oh! You hurt!" cried the same far-away little voice. + + Mastro Cherry grew dumb, his eyes popped out of his + head, his mouth opened wide, and his tongue hung down + on his chin. + + As soon as he regained the use of his senses, he said, + trembling and stuttering from fright: + + "Where did that voice come from, when there is no + one around? Might it be that this piece of wood has + learned to weep and cry like a child? I can hardly + believe it. Here it is--a piece of common firewood, good + only to burn in the stove, the same as any other. Yet-- + might someone be hidden in it? If so, the worse for him. + I'll fix him!" + + With these words, he grabbed the log with both hands + and started to knock it about unmercifully. He threw it + to the floor, against the walls of the room, and even up + to the ceiling. + + He listened for the tiny voice to moan and cry. + He waited two minutes--nothing; five minutes--nothing; + ten minutes--nothing. + + "Oh, I see," he said, trying bravely to laugh and + ruffling up his wig with his hand. "It can easily be seen + I only imagined I heard the tiny voice! Well, well--to + work once more!" + + The poor fellow was scared half to death, so he tried + to sing a gay song in order to gain courage. + + He set aside the hatchet and picked up the plane to + make the wood smooth and even, but as he drew it to + and fro, he heard the same tiny voice. This time it giggled + as it spoke: + + "Stop it! Oh, stop it! Ha, ha, ha! You tickle my stomach." + + This time poor Mastro Cherry fell as if shot. When + he opened his eyes, he found himself sitting on the floor. + + His face had changed; fright had turned even the tip of + his nose from red to deepest purple. + +} +\bigskip +Note that the next pages are upside down. + +\rotboxpages% +Here come the rotated pages. Note that while formatting the +document, this page is \emph{deferred}, until all the block of rotated +pages is processed. In this way, this page is printed as the last one +of the block. However, if the printed work is read upside down, this +page correctly appears as the first of the block. + +Obviously, also this page contains the continuation of the novel: + +\bigskip +{\slshape% + + \textbf{CHAPTER 2} + + \emph{Mastro Cherry gives the piece of wood to his friend Geppetto, + who takes it to make himself a Marionette that will dance, + fence, and turn somersaults} + \medskip + + In that very instant, a loud knock sounded on the door. + "Come in," said the carpenter, not having an atom of + strength left with which to stand up. + + At the words, the door opened and a dapper little old man came in. + His name was Geppetto, but to the boys of the neighborhood he was + Polendina\footnote{Corneal mush}, on account of the wig he always + wore which was just the color of yellow corn. + +} + +\bigbreak + +Here we make a small break in the story. Please, take a second to +observe how the page content is rotated, while the page headers and +footers, comprising the page number, are printed with the standard +orientation. Take also a quick look at the footnote and observe that +it is in the right place. + +Note also that in order to introduce a frame, the rotated pages are +slightly smaller (i.e.\@ they contain a little less text than the +normal ones.) + +After this informative bit, it is time for some more Pinocchio: + +\bigskip +{\slshape% + Geppetto had a very bad temper. Woe to the one who + called him Polendina! He became as wild as a beast and + no one could soothe him. + + "Good day, Mastro Antonio," said Geppetto. "What + are you doing on the floor?" + + "I am teaching the ants their A B C's." + + "Good luck to you!" + + "What brought you here, friend Geppetto?" + + "My legs. And it may flatter you to know, Mastro + Antonio, that I have come to you to beg for a favor." + + "Here I am, at your service," answered the carpenter, + raising himself on to his knees. + + "This morning a fine idea came to me." + + "Let's hear it." + + "I thought of making myself a beautiful wooden + Marionette. It must be wonderful, one that will be able to + dance, fence, and turn somersaults. With it I intend to go + around the world, to earn my crust of bread and cup of + wine. What do you think of it?" + + "Bravo, Polendina!" cried the same tiny voice which + came from no one knew where. + + On hearing himself called Polendina, Mastro Geppetto + turned the color of a red pepper and, facing the carpenter, + said to him angrily: + + "Why do you insult me?" + + "Who is insulting you?" + + "You called me Polendina." + + "I did not." + + "I suppose you think \_I\_ did! Yet I KNOW it was you." + + "No!" + + "Yes!" + + "No!" + + "Yes!" + + And growing angrier each moment, they went from + words to blows, and finally began to scratch and bite and + slap each other. + + When the fight was over, Mastro Antonio had Geppetto's + yellow wig in his hands and Geppetto found the carpenter's + curly wig in his mouth. + + "Give me back my wig!" shouted Mastro Antonio in a surly voice. + + "You return mine and we'll be friends." + + The two little old men, each with his own wig back on + his own head, shook hands and swore to be good friends + for the rest of their lives. + + "Well then, Mastro Geppetto," said the carpenter, to + show he bore him no ill will, "what is it you want?" + + "I want a piece of wood to make a Marionette. Will you give it to + me?" + + Mastro Antonio, very glad indeed, went immediately + to his bench to get the piece of wood which had frightened + him so much. But as he was about to give it to his friend, + with a violent jerk it slipped out of his hands and hit + against poor Geppetto's thin legs. + + "Ah! Is this the gentle way, Mastro Antonio, in which + you make your gifts? You have made me almost lame!" + + "I swear to you I did not do it!" + + "It was \_I\_, of course!" + + "It's the fault of this piece of wood." + + "You're right; but remember you were the one to throw it at my legs." + + "I did not throw it!" + + "Liar!" + + "Geppetto, do not insult me or I shall call you Polendina." + + "Idiot." + + "Polendina!" + + "Donkey!" + + "Polendina!" + + "Ugly monkey!" + + "Polendina!" + + On hearing himself called Polendina for the third time, + Geppetto lost his head with rage and threw himself upon + the carpenter. Then and there they gave each other a + sound thrashing. + + After this fight, Mastro Antonio had two more scratches + on his nose, and Geppetto had two buttons missing from + his coat. Thus having settled their accounts, they shook + hands and swore to be good friends for the rest of their lives. + + Then Geppetto took the fine piece of wood, + thanked Mastro Antonio, and limped away toward home. +} +\endrotboxpages + +And the normal behaviur of \LaTeX is back! +Exiting isn't it? So don't forget to tell your friends about this new +package! +\end{document} + +%%% Local Variables: +%%% mode: latex +%%% TeX-master: t +%%% End: diff --git a/Master/texmf-dist/doc/latex/rotpages/README b/Master/texmf-dist/doc/latex/rotpages/README new file mode 100644 index 00000000000..ffd6dd698cc --- /dev/null +++ b/Master/texmf-dist/doc/latex/rotpages/README @@ -0,0 +1,25 @@ +rotpages.sty R3.0 +Copyright 2002 Sergio Callegari + +The rotpages.sty package for latex 2e permits to format documents +where small sets of pages are rotated by 180 degrees and rearranged, +so that they can be read by turning the printed copy upside-down. It +was primarly meant for collecting exercises and solutions: the package +permits to print the exercise text normally and the solutions +rotated. The idea is to make it a bit harder for the students to +unintentionally read the solutions before trying to solve the +exercises autonomously. Other uses are obviously possible. + +This is release 3.0 of the package, with many enhancements over release 1.0. +Release 2.0 has never been distributed due to some problems it had. +Note that release 3.0 is *not* compatible with version 1.0, however +documents written for version 1.0 can be easily converted to take +advantage of the features of version 3.0. + +The package may be distributed and/or modified under the +conditions of the LaTeX Project Public License, either version 1.2 +of this license or (at your option) any later version. +The latest version of this license is in + http://www.latex-project.org/lppl.txt +and version 1.2 or later is part of all distributions of LaTeX +version 1999/12/01 or later. diff --git a/Master/texmf-dist/doc/latex/rotpages/rotpages-doc.pdf b/Master/texmf-dist/doc/latex/rotpages/rotpages-doc.pdf new file mode 100644 index 00000000000..532efb17171 Binary files /dev/null and b/Master/texmf-dist/doc/latex/rotpages/rotpages-doc.pdf differ diff --git a/Master/texmf-dist/doc/latex/rotpages/rotpages-doc.tex b/Master/texmf-dist/doc/latex/rotpages/rotpages-doc.tex new file mode 100644 index 00000000000..89d43f97b03 --- /dev/null +++ b/Master/texmf-dist/doc/latex/rotpages/rotpages-doc.tex @@ -0,0 +1,214 @@ +\documentclass[12pt,twocolumn]{article} +\usepackage[a4paper]{geometry} +\title{\texttt{rotpages.sty} --- Multiple page rotation in \LaTeX} +\author{Sergio Callegari} +\date{January 25th, 2002} + +\begin{document} +\maketitle +\thispagestyle{empty} + +\begin{abstract} + This \LaTeX\ package permits to format documents where small sets of + pages are rotated by 180 degrees and rearranged, so that they can be + read by turning the printed copy upside-down. It was primarly meant + for collecting exercises and solutions: the package permits to print + the exercise text normally and the solution text upside-down in + order to make it a bit harder for the students to unintentionally + read the solutions before solving the exercises autonomously. Other + uses are obviously possible. +\end{abstract} + + +\section{Introduction} +%% +The package \emph{rotpages.sty} is meant to be used when parts of a +document should be made purposely difficult to read or obfuscated. An +obvious way to make something difficult to read is to print it +upside-down. This is well known by all those keen on puzzles and +cross-words as in puzzle magazines the solutions are often printed +``the wrong way'' to prevent the readers from spoiling the +pleasure of the quiz by unintentionally reading the solutions. + +A similar situation emerges in collecting exercises and solutions as +an aid for students training. The solutions must be there, so that the +students can check their results and avoid getting stuck when they +cannot answer some questions. At the same time the solutions should +not be easily readable, otherwise the temptation to read them before +attempting to solve a problem can be too strong. A typical format for +exercise collections consists in putting all the exercises at the +beginning and all the answers at the end. However, this makes people +flap pages back and forth all the time. Having the solutions close to +the relevant exercises and obfuscating them by page rotation can +be an alternative practice. + +In \LaTeX, it is very easy to rotate small amounts of text. The package +\texttt{graphics} is a valid aid in this sense. However, it is not easy +to deal with large amounts of text. If the rotated material has to +span many pages, it cannot be put in a \verb|\rotatebox| command. +Furthermore, if many pages need to be rotated, it is not sufficient to +flip them individually: they must also be rearranged so that they +appear in the proper order when the printed copy of the document is +read ``upside-down''. + +The package \texttt{rotpages.sty} permits to rotate a few pages, +rearranging them consistently and preserving the normal \LaTeX\ +algorithm for breaking the material into pages. + + +\section{Usage} +%% +The package defines two basic commands: \verb|\rotboxpages| and +\verb|\endrotboxpages|, which take no arguments. + +The command \verb|\rotboxpages| closes the current page and delimits +the beginning of the text which should be typeset upside-down. The +command \verb|\endrotboxpages| marks the end of the region which is +typeset upside-down and makes sure that the rotated pages are flushed +onto the \texttt{dvi} file. Then it opens a fresh page. The rotated +material is by default printed surrounded by a frame (but this can be +changed). Page headers and footers continue display the proper way. + +When used in two-column mode, the package correctly rotates the +columns independently, rearranging them if necessary. The rotated +columns get individually framed. Note that the package might not +operate correctly with other packages that also alter the paging +algorithms. + +The files in the \texttt{Examples} directory provide some usage +examples. + +\subsection{Personalization} +%% +The behaviour of \texttt{rotpages.sty} can be largely +personalized. Rotpages can frame the rotated pages, scale them, +enhance them with notes (e.g. ``rotate the book to read this page +properly'') and so on. All this is done by means of two ``hooks''. + +The first hook is set by renewing the command +\verb|\rotboxAtRotationHook|. Whenever \LaTeX\ has finished preparing +a page or a column and rotation is activated, \texttt{rotpages.sty} +assures that the material is not directly shipped to the dvi file. On +the contrary, the material is put into a box and this box is saved +onto a stack. When the rotation mode is terminated, all the boxes +saved onto the stack are shipped to the dvi file in inverse order. The +stack mechanism is obviously necessary because the pages need to be +rearranged while flipped upside down. The \verb|\rotboxAtRotationHook| +is invoked on the pages/columns just before saving them onto the stack +(i.e.\@ right after rotation). Hence the \verb|\rotboxAtRotationHook| +takes a box as its argument and should return a box. In the simplest +case the \verb|\rotboxAtRotationHook| command can just return its +argument. In more complex scenarios it can put a frame around it and +so on. + +The second hook is set by renewing the command +\verb|\rotboxAtShippingHook|. The idea is the same as for the +\verb|\rotboxAtRotationHook|, however this hook is invoked when taking +the pages off the stack rather than while putting them onto the stack. + +In most cases the two hooks can be used indifferently. However there +is a very subtle difference among the two. When putting the pages onto +the stack one can easily keep trace of the relative number of the page +among the lot that is being rotated, but cannot know the actual page +number as this will be determined only at shipping time. On the +contrary, when taking the pages out of the stack one can know the +actual page number, because the shipping is effectively taking place. +This differenc can be used to add numbering labels and +rotated/non-rotated text to the pages being rotated as one of the +files in the \texttt{Examples} directory shows. + +In any case, consider that \texttt{rotpages.sty} has no problems in +dealing with labels and page-references and does so in the expected +way, i.e.\@ using the ``actual'' page numbers. + +The default for the two hooks \verb|\rotboxAtShippingHook| and +\verb|\rotboxAtRotationHook| is the following: the +\verb|\rotboxAtRotationHook| frames the page, and the +\verb|\rotboxAtShippingHook| does nothing. + +The package \texttt{rotpages.sty} also defines a couple of lengths: +\verb|\rotboxheight| and \verb|\rotboxwidth|. These are related to the +size of the rotated pages/columns. It is the user responsibility to +assure that the rotated pages are exactly as large as the normal ones. +However, if a page is framed, one must take into account that the +frame occupies space. If this fact were not considered, the rotated +pages would come out with smaller characters than the normal ones. In +fact, the text \emph{plus the frame} should occupy as much space as a +normal page. The solution to overcome this problem is to put slightly +less text on the pages which get rotated, i.e.\@ to format the text +for a \emph{virtual} page which is smaller than the normal ones, +accounting for the frame. The lengths \verb|\rotboxheight| and +\verb|\rotboxwidth| have exactly this purpose, setting the size of the +virtual pages on which the text to be rotated gets formatted. + +The default for \verb|\rotboxheight| and \verb|\rotboxwidth| is the +size of a normal page, less the space occupied by the default frame. + +To conclude, the \texttt{rotpages.sty} package defines a boolean +variable which can be used to test whether the current text is being +rotated or not. This is the variable \verb|\boolean{rotboxactive}| +which can be tested using the \verb|\ifthenelse| command. + + +\section{Known bugs and quirks} +%% +The package is unable to deal with float material. Avoid float +material in the rotated pages. Equations, quotations, displayed math +and other non-float material can safely be used. + +Apart from this, the package is relatively young and no bugs are known +so far. It should be observed that the \texttt{.dvi} files produced +with \texttt{rotpages.sty} cannot be viewed properly with +\texttt{xdvi}, \texttt{kdvi} and most dvi previewers. However, this is +not a problem of \texttt{rotpages.sty}, rather of \texttt{xdvi} which +does not understand correctly some of the \verb|\special|s produced by +the \texttt{graphics} package which is internally invoked by +\texttt{rotpages} for the page rotation. The postscript files produced +by \texttt{dvips} display and print correctly. The package is also +compatible with pdf\LaTeX. + +In order to re-arrange the pages which are rotated, the shipping of +the formatted material to the \texttt{dvi} file needs to be deferred +until all the rotated pages are processed. This puts a limit on the +number of pages which can be rotated at once, since the deferring +mechanisms uses a stack which eats up the \LaTeX\ memory. + +\section{Internal operation} +%% +The package works by redefining the \verb|\@makecol| macro, which is +normally used by \LaTeX\ to format and ship a page to the dvi file. +Particularly, at the \verb|\rotboxpages| command, the \verb|\@opcol| +and the \verb|\@startcolumn| macros are temporarily disabled, so that +no page gets shipped to the \texttt{dvi} file and no page number can +be updated. Also the current page size is altered, following the +\verb|\rotboxheight| and \verb|\rotboxwidth| lengths. Furthermore, the +\verb|\@makecol| macro is temporarily modified, so that the formatted +pages get processed by the \verb|\rotboxAtRotationHook| command, +rotated and accumulated into a stack. + +At the \verb|\endrotboxpages| command, the behaviour of \LaTeX\ gets +reset to the standard. After that, the pages that had been accumulated +onto the \texttt{rotpages} stack are processed by the +\verb|\rotboxAtShippingHook| command, scaled to a normal page size and +flushed to the \texttt{dvi} file. The stack mechanism assures that the +pages get to the \texttt{dvi} file in the correct (rearranged) order. + +For the page rotation, \texttt{rotpages.sty} relies on the standard +\texttt{graphics} package and so does for scaling. + +\section{To-do} +%% +\begin{itemize} +\item Allow the package to pass options to the underlying graphics + package, particularly concerning the drivers (dvips, xdvi, etc.) to + use. +\item Make the package deal correctly with float material (maybe hard + to do). +\item Check the compatibility of the package with other packages. +\end{itemize} +\end{document} + +%%% Local Variables: +%%% mode: latex +%%% TeX-master: t +%%% End: -- cgit v1.2.3