KTUGFaq

KTUG FAQ

ChngpagePackage (rev. 1.3)

·Î±×ÀÎ:
ºñ¹Ð¹øÈ£:
°¡ÀÔ
Be careful how you get yourself involved with persons or situations that can't bear inspection.
FrontPage › ChngpagePackage

¸ñÂ÷

1 \changetext ¸í·É
2 \changepage ¸í·É
3 ¿¹Á¦
4 adjustwidth ȯ°æ
5 \checkoddpage ¸í·É

1 \changetext ¸í·É

\changetext ¸í·ÉÀº ÅؽºÆ® ¿µ¿ªÀÇ Æø°ú À§Ä¡¸¦ º¯°æÇÏ´Â ¿ªÇÒÀ» ÇÑ´Ù. ÀÌ ¸í·ÉÀº ´Ù¼¸ °³ÀÇ ÀÎÀÚ¸¦ °¡Áö´Âµ¥ ¸ðµç ÀÎÀÚ´Â ±æÀÌ°ªÀ» ÁöÁ¤Çϰųª ºñ¿öµÎ¾î¾ß ÇÑ´Ù. °¢°¢ÀÇ ÀÎÀÚ°¡ ÀǹÌÇÏ´Â °ÍÀº ´ÙÀ½°ú °°´Ù.
\changetext{textheight}{textwidth}{evensidemargin}{oddsidemargin}{columnsep}
ÁÖ¾îÁø ±æÀÌ°ªÀº ÇØ´çÇÏ´Â ÇöÀç ±æÀÌ°ª¿¡ ´õÇØÁø´Ù. ÀÌ ¸í·ÉÀÌ ÁÖ¾îÁø ÀÌÈķδ ÅؽºÆ® ¿µ¿ªÀÇ ·¹À̾ƿôÀÌ ¹Ù²î°í »õ·Î¿î \change... ¸í·ÉÀÌ ³ª¿Ã ¶§±îÁö À¯È¿ÇÏ´Ù.

2 \changepage ¸í·É

changepage ¸í·ÉÀº ÂÊ ·¹À̾ƿôÀ» ¹Ù²Ù´Â µ¥ »ç¿ëÇÑ´Ù. ÀÌ ¸í·ÉÀº ¾ÆÈ© °³ÀÇ ÀÎÀÚ¸¦ °¡Áö´Âµ¥ °¢°¢ ±æÀÌ°ªÀ» Áְųª ºñ¿öµÐ´Ù. óÀ½ÀÇ ´Ù¼¸ °³ÀÇ ÀÎÀÚ´Â \changetext ¸í·ÉÀÇ ÀÎÀÚ¿Í ±× Àǹ̰¡ °°´Ù. ³ª¸ÓÁö ³× °³ÀÇ ÀÎÀÚ´Â ´ÙÀ½°ú °°´Ù.
\changepage{5 args}{topmargin}{headheight}{headsep}{footskip}
ÀÌ ±æÀÌ°ªµéÀº ÇØ´çÇÏ´Â °ª¿¡ ´õÇØÁø´Ù. µû¶ó¼­ ÆäÀÌÁö »óÀÇ ÅؽºÆ® ¿µ¿ªÀÇ ¼¼·Î À§Ä¡¸¦ º¯°æÇÒ ¼ö ÀÖ´Ù. ÇöÀç ÆäÀÌÁöºÎÅÍ È¿°ú°¡ ¹ß»ýÇÏ°í »õ·Î¿î \change... ¸í·ÉÀÌ ³ª¿Ã ¶§±îÁö À¯È¿ÇÏ´Ù.
/!\ NOTE: ÀÌ ¸í·ÉÀº ÆäÀÌÁö ÀüüÀÇ ¸ðµç ¹®´Ü¿¡ ¿µÇâÀ» ³¢Ä£´Ù. ¸î ¹®´Ü¸¸ ·¹À̾ƿôÀ» ¹Ù²Ù·Á ÇÑ´Ù¸é Â÷¶ó¸® hanging ÆÐÅ°Áö³ª PlainTeXÀÇ \parshape ¸í·ÉÀ» °í·ÁÇغ¸´Â °ÍÀÌ ÁÁÀ» °ÍÀÌ´Ù.

3 Examples

For example, to change from single column pages to double column pages where the text block is both shorter and wider, then to revert back to the initial layout:
... single column normal page
\newpage % or \clearpage
\changetext{-5\baselineskip}{10em}{-5em}{-5em}{}
\twocolumn
... two column pages
\clearpage 
\changetext{5\baselineskip}{-10em}{5em}{5em}{}
\onecolumn
... normal pages

Note the adjustments to the margins which will keep the vertical centerline of the textblock at the same position on the page.

As another example, to increase the width of a single paragraph:
\changetext{0pt}{5em}{}{}{}%
Start of wider paragraph text ...
... end of paragraph.

\changetext{0pt}{-5em}{}{}{}
Start of a normal paragraph ...

Under some circumstances you can include a \change... command as part of the argument to \afterpage (from the afterpage package) and it may work. Similarly it may work in a heading style used for \thispagestyle to change a single page.

4 adjustwidth ȯ°æ

Within an adjustwidth environment the left and right margins can be adjusted. The environment takes one optional argument and two required length arguments:
\begin{adjustwidth}[]{leftmargin}{rightmargin}

A positive length value will increase the relevant margin (shortening the text lines) while a negative length value will decrease the margin (lengthening text lines). An empty length argument means no change to the margin. At the end of the environment the margins revert to their original values.

For example, to extend the text into the right margin:
\begin{adjustwidth}{}{-8em}

Any appearance of the optional argument (even just []) will cause the values of the margins to switch between odd and even pages.

If the document is being set twosided it might be advantageous to have any wider text extending into the outside margin. This could be done via the optional argument, as:
\begin{adjustwidth}[]{}{-8em}

To have the adjusted text horizontally centered with respect to any surrounding text, the margins should be adjusted equally:
\begin{adjustwidth}{-4em}{-4em}

For interest, \begin{quotation} is pretty much equivalent to \begin{adjustwidth}{2.5em}{2.5em}

The environment may also be used inside a float if the contents are a bit too wide for the text block, but can still fit within the physical page:
\begin{figure}
   \begin{adjustwidth}{-2em}{-2em}
      \includegraphics{wide}
      \caption{Wide figure}
   \end{adjustwidth}
\end{figure}

Sometimes, because of the asynchronous nature of the TeX output routine, the margin switching may be incorrect (like \marginpar sometimes) near the top of a page. This can be corrected by using the package option strict (i.e., \usepackagestrict{chngpage}), which causes adjustwidth to use the \checkoddpage command (see below).

A disadvantage of the strict option is that the package generates a new label for each adjustwidth environment, and TeX may run out of space if there are an excessive number of labels in the document.

Whether or not the strict option is used, strict adjustwidths can be turned on by putting the command \cpstricttrue before the environment, and turned of by using \cpstrictfalse.

/!\ NOTE: In a twocolumn document, the adjustwidth environment treats both columns equally. For example, if the width is meant to be wider at the outer margin, then on odd pages the extra width will be at the right of any column, and on even pages the extra will be at the left of any column. You can get interesting effects by careful hand tuning on two column pages.

5 \checkoddpage ¸í·É

The \checkoddpage command can be used anywhere in the body of a document to determine if TeX is typesetting on an odd or even numbered page. If on an odd page then \ifcpoddpage is set TRUE, otherwise (on an even page) \ifcpoddpage is set FALSE.

This works by the \checkoddpage command generating a label and then checking the \pageref for the label (actually, a special version of \pageref is required and is used internally by \checkoddpage). This mechanism requires at least two LaTeX passes to ensure that the labels have settled (on the initial pass there will be no labels in the *.aux file to be checked).

The label identifier is composed of the command \cplabelprefix and an automatically generated number. \cplabelprefix, initially defined as ^_, can be changed in the preamble if it will cause a clash with any author-defined labels. The default labels will be of the form ^_N where N is a positive integer.



^
Valid XHTML 1.0! Valid CSS! powered by MoniWiki
last modified 2009-11-16 15:26:41
Processing time 0.1973 sec