Mercurial > gnulib
comparison build-aux/texinfo.tex @ 17308:ae621669e2f9
update from texinfo
author | Karl Berry <karl@freefriends.org> |
---|---|
date | Fri, 01 Feb 2013 15:49:12 -0800 |
parents | d81be792518a |
children | 81999a590591 |
comparison
equal
deleted
inserted
replaced
17307:77ea9951f209 | 17308:ae621669e2f9 |
---|---|
1 % texinfo.tex -- TeX macros to handle Texinfo files. | 1 % texinfo.tex -- TeX macros to handle Texinfo files. |
2 % | 2 % |
3 % Load plain if necessary, i.e., if running under initex. | 3 % Load plain if necessary, i.e., if running under initex. |
4 \expandafter\ifx\csname fmtname\endcsname\relax\input plain\fi | 4 \expandafter\ifx\csname fmtname\endcsname\relax\input plain\fi |
5 % | 5 % |
6 \def\texinfoversion{2013-01-01.15} | 6 \def\texinfoversion{2013-02-01.11} |
7 % | 7 % |
8 % Copyright 1985, 1986, 1988, 1990, 1991, 1992, 1993, 1994, 1995, | 8 % Copyright 1985, 1986, 1988, 1990, 1991, 1992, 1993, 1994, 1995, |
9 % 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, | 9 % 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, |
10 % 2007, 2008, 2009, 2010, 2011, 2012, 2013 Free Software Foundation, Inc. | 10 % 2007, 2008, 2009, 2010, 2011, 2012, 2013 Free Software Foundation, Inc. |
11 % | 11 % |
2494 \catcode\dashChar=\active \catcode\underChar=\active | 2494 \catcode\dashChar=\active \catcode\underChar=\active |
2495 \ifallowcodebreaks | 2495 \ifallowcodebreaks |
2496 \let-\codedash | 2496 \let-\codedash |
2497 \let_\codeunder | 2497 \let_\codeunder |
2498 \else | 2498 \else |
2499 \let-\realdash | 2499 \let-\normaldash |
2500 \let_\realunder | 2500 \let_\realunder |
2501 \fi | 2501 \fi |
2502 \codex | 2502 \codex |
2503 } | 2503 } |
2504 } | 2504 } |
2505 | 2505 |
2506 \def\codex #1{\tclose{#1}\endgroup} | 2506 \def\codex #1{\tclose{#1}\endgroup} |
2507 | 2507 |
2508 \def\realdash{-} | 2508 \def\normaldash{-} |
2509 \def\codedash{-\discretionary{}{}{}} | 2509 \def\codedash{-\discretionary{}{}{}} |
2510 \def\codeunder{% | 2510 \def\codeunder{% |
2511 % this is all so @math{@code{var_name}+1} can work. In math mode, _ | 2511 % this is all so @math{@code{var_name}+1} can work. In math mode, _ |
2512 % is "active" (mathcode"8000) and \normalunderscore (or \char95, etc.) | 2512 % is "active" (mathcode"8000) and \normalunderscore (or \char95, etc.) |
2513 % will therefore expand the active definition of _, which is us | 2513 % will therefore expand the active definition of _, which is us |
2518 \discretionary{}{}{}}% | 2518 \discretionary{}{}{}}% |
2519 {\_}% | 2519 {\_}% |
2520 } | 2520 } |
2521 | 2521 |
2522 % An additional complication: the above will allow breaks after, e.g., | 2522 % An additional complication: the above will allow breaks after, e.g., |
2523 % each of the four underscores in __typeof__. This is undesirable in | 2523 % each of the four underscores in __typeof__. This is bad. |
2524 % some manuals, especially if they don't have long identifiers in | 2524 % @allowcodebreaks provides a document-level way to turn breaking at - |
2525 % general. @allowcodebreaks provides a way to control this. | 2525 % and _ on and off. |
2526 % | 2526 % |
2527 \newif\ifallowcodebreaks \allowcodebreakstrue | 2527 \newif\ifallowcodebreaks \allowcodebreakstrue |
2528 | 2528 |
2529 \def\keywordtrue{true} | 2529 \def\keywordtrue{true} |
2530 \def\keywordfalse{false} | 2530 \def\keywordfalse{false} |
4186 % We don't want these characters active, ... | 4186 % We don't want these characters active, ... |
4187 \catcode`\-=\other \catcode`\_=\other | 4187 \catcode`\-=\other \catcode`\_=\other |
4188 % ..., but we might end up with active ones in the argument if | 4188 % ..., but we might end up with active ones in the argument if |
4189 % we're called from @code, as @code{@value{foo-bar_}}, though. | 4189 % we're called from @code, as @code{@value{foo-bar_}}, though. |
4190 % So \let them to their normal equivalents. | 4190 % So \let them to their normal equivalents. |
4191 \let-\realdash \let_\normalunderscore | 4191 \let-\normaldash \let_\normalunderscore |
4192 } | 4192 } |
4193 } | 4193 } |
4194 | 4194 |
4195 % We have this subroutine so that we can handle at least some @value's | 4195 % We have this subroutine so that we can handle at least some @value's |
4196 % properly in indexes (we call \makevalueexpandable in \indexdummies). | 4196 % properly in indexes (we call \makevalueexpandable in \indexdummies). |
9991 % catcode other. We switch back and forth between these. | 9991 % catcode other. We switch back and forth between these. |
9992 @gdef@rawbackslash{@let\=@backslashcurfont} | 9992 @gdef@rawbackslash{@let\=@backslashcurfont} |
9993 @gdef@otherbackslash{@let\=@realbackslash} | 9993 @gdef@otherbackslash{@let\=@realbackslash} |
9994 | 9994 |
9995 % Same as @turnoffactive except outputs \ as {\tt\char`\\} instead of | 9995 % Same as @turnoffactive except outputs \ as {\tt\char`\\} instead of |
9996 % the literal character `\'. | 9996 % the literal character `\'. Also revert - to its normal character, in |
9997 % | 9997 % case the active - from code has slipped in. |
9998 @def@normalturnoffactive{% | 9998 % |
9999 @let"=@normaldoublequote | 9999 {@catcode`- = @active |
10000 @let$=@normaldollar %$ font-lock fix | 10000 @gdef@normalturnoffactive{% |
10001 @let+=@normalplus | 10001 @let-=@normaldash |
10002 @let<=@normalless | 10002 @let"=@normaldoublequote |
10003 @let>=@normalgreater | 10003 @let$=@normaldollar %$ font-lock fix |
10004 @let\=@normalbackslash | 10004 @let+=@normalplus |
10005 @let^=@normalcaret | 10005 @let<=@normalless |
10006 @let_=@normalunderscore | 10006 @let>=@normalgreater |
10007 @let|=@normalverticalbar | 10007 @let\=@normalbackslash |
10008 @let~=@normaltilde | 10008 @let^=@normalcaret |
10009 @markupsetuplqdefault | 10009 @let_=@normalunderscore |
10010 @markupsetuprqdefault | 10010 @let|=@normalverticalbar |
10011 @unsepspaces | 10011 @let~=@normaltilde |
10012 @markupsetuplqdefault | |
10013 @markupsetuprqdefault | |
10014 @unsepspaces | |
10015 } | |
10012 } | 10016 } |
10013 | 10017 |
10014 % Make _ and + \other characters, temporarily. | 10018 % Make _ and + \other characters, temporarily. |
10015 % This is canceled by @fixbackslash. | 10019 % This is canceled by @fixbackslash. |
10016 @otherifyactive | 10020 @otherifyactive |