% >> Arquivo cwebmac-br.tex.
% >> 
% >> Use no lugar de cwebmac.tex quando estiver escrevendo em português.
% >> No início do seu arquivo .w, diga
% >>       \input ../../acentos
% >>       \input cwebmac-br.tex
% >> O arquivo cwebmac-br.tex é usado pelo TeX para processar a saída 
% >> de cweave. (Mas não inclua cwebmac-br -- nem cwebmac -- se estiver 
% >> usando a versão latex do CWEB.)
% >>
% >> Preparado por Paulo Feofiloff em janeiro de 2001 a partir da 
% >> versão 3.63 do cwebmac.


%\font\tentex=cmtex10 % TeX extended character set (used in strings)
\font\tentex=cmtt10


\def\.#1{\leavevmode\hbox{\tentex % typewriter type for strings
  \let\\=\BS % backslash in a string
  \let\{=\LB % left brace in a string
  \let\}=\RB % right brace in a string
% \let\~=\TL % tilde in a string  >> Eu (PF) tirei isso
  \let\ =\SP % space in a string
  \let\_=\UL % underline in a string
  \let\&=\AM % ampersand in a string
% \let\^=\CF % circumflex in a string  >> Eu (PF) tirei isso
  #1\kern.05em}}


\def\A{\note{Veja também a seção}} % xref for doubly defined section name
\def\As{\note{Veja também as seções}} % xref for multiply defined section name


\def\ET{ e~} % conjunction between two section numbers
\def\ETs{, e~} % conjunction between the last two of several section numbers


\def\Q{\note{Este código é citado na seção}} % xref for mention of a section
\def\Qs{\note{Este código é citado nas seções}} % xref for mentions of a section

\def\U{\note{Este código é usado na seção}} % xref for use of a section
\def\Us{\note{Este código é usado nas seções}} % xref for uses of a section


\def\ch{\note{As seguintes seções foram alteradas pelo ``change file'':}
  \let\*=\relax}


\def\fin{\par\vfill\eject % this is done when we are ending the index
  \ifpagesaved\null\vfill\eject\fi % output a null index column
  \if L\lr\else\null\vfill\eject\fi % finish the current page
  \parfillskip 0pt plus 1fil
  \def\grouptitle{NOMES DAS SEÇÕES}
  \ifacro \def\outsecname{Nomes das seções} \let\Xpdf\X \fi
  \ifpdftex \makebookmarks \pdfdest name {NOS} fitb
    \pdfoutline goto name {NOS} count -\secno {\outsecname}
    \def\X##1:##2\X{\Xpdf##1:##2\X
      \firstsecno##1.\toks0{##2}\pdfoutline goto num \the\toksA {\the\toks0}}
  \else\ifpdf
    \special{pdf: outline -1 << /Title (\outsecname)
      /Dest [ @thispage /FitH @ypos ] >>}
    \def\X##1:##2\X{\Xpdf##1:##2\X
      \firstsecno##1.\toks0{##2} \special{pdf: outline 0 << /Title
        (\the\toks0) /A << /S /GoTo /D (\romannumeral\the\toksA) >> >>}}
  \fi\fi
  \let\topsecno=\nullsec
  \message{Section names:}
  \output={\normaloutput\page\lheader\rheader}
  \setpage
  \def\note##1##2.{\quad{\eightrm##1~\ifacro{\pdfnote##2.}\else{##2}\fi.}}
  \def\Q{\note{Citado na seção}} % crossref for mention of a section
  \def\Qs{\note{Citado nas seções}} % crossref for mentions of a section
  \def\U{\note{Usado na seção}} % crossref for use of a section
  \def\Us{\note{Usado nas seções}} % crossref for uses of a section
  \def\I{\par\hangindent 2em}\let\*=*
  \readsections}


\def\con{\par\vfill\eject % finish the section names
% \ifodd\pageno\else\titletrue\null\vfill\eject\fi % for duplex printers
  \rightskip 0pt \hyphenpenalty 50 \tolerance 200
  \setpage \output={\normaloutput\page\lheader\rheader}
  \titletrue % prepare to output the table of contents
  \pageno=\contentspagenumber
  \def\grouptitle{SUMÁRIO}
  \message{Table of contents:}
  \topofcontents \startpdf
  \line{\hfil Seção\hbox to3em{\hss Pág.}}
  \let\ZZ=\contentsline
  \readcontents\relax % read the contents info
  \botofcontents \end} % print the contents page(s) and terminate


\def\today{\number\day\ de \ifcase\month\or
  janeiro\or fevereiro\or mar\c{c}o\or abril\or maio\or junho\or
  julho\or agosto\or setembro\or outubro\or novembro\or dezembro\fi
  \space de \number\year}


\def\datethis{\def\startsection{\leftline{\sc\today\ às \hours}\bigskip
  \let\startsection=\stsec\stsec}}
  % say `\datethis' in limbo, to get your listing timestamped before section 1
\def\datecontentspage{%
  \def\topofcontents{\leftline{\sc\today\ às \hours}\bigskip
   \centerline{\titlefont\title}\vfill}} % timestamps the contents page




