Re: Restating theorems?
- From: "Ulrich Diez" <eu_angelion@xxxxxxxxxxxxxx>
- Date: Tue, 11 Jul 2006 14:55:05 +0200
Louis Theran wrote:
....
Here's the code from the other post. I just tried to compile it as is.....
Cutting and pasting from ``show original'' in Google Groups instead of
the HTML window seems to have mysteriously fixed the problem. There is
a problem with hyperref generating warnings, but I will try and figure
that out myself. (The warnings don't seem to be a problem.)
Hello!
I tested my example again and found out:
When using hyperref
- and eTeX, these warnings do not occur
- and pdfeTeX, these warnings do occur.
I don't think I find the time to track it down right now.
Ulrich
\documentclass{article}
\usepackage{amsmath}
\usepackage{hyperref}
\makeatletter
\newcommand*\newtheoremWithMacro[1]{%
\@ifnextchar[%
{\newtheoremwithmacrooptbrace{#1}}%
{\newtheoremwithmacrobraceopt{#1}}%
}%
\newcommand*\newtheoremwithmacrobraceopt[2]{%
\@ifnextchar[%
{\newtheoremwithmacrolastopt{#1}{#2}}%
{\newtheoremwithmacronolastopt{#1}{#2}}%
}%
\@ifdefinable\newtheoremwithmacrooptbrace{%
\gdef\newtheoremwithmacrooptbrace#1[#2]#3{%
\newtheorem{#1}[#2]{#3}\@newtheoremWithMacro{#1}%
}%
}%
\@ifdefinable\newtheoremwithmacrolastopt{%
\gdef\newtheoremwithmacrolastopt#1#2[#3]{%
\newtheorem{#1}{#2}[#3]\@newtheoremWithMacro{#1}%
}%
}%
\@ifdefinable\newtheoremwithmacronolastopt{%
\gdef\newtheoremwithmacronolastopt#1#2{%
\newtheorem{#1}{#2}\@newtheoremWithMacro{#1}%
}%
}%
\newcommand\@newtheoremWithMacro[1]{%
\expandafter\@ifdefinable\csname #1theorem\endcsname{%
\expandafter\global
\expandafter\let
\csname #1theorem\expandafter\endcsname
\csname #1\endcsname
}%
\@ifundefined{end#1theorem}{%
\expandafter\global
\expandafter\let
\csname end#1theorem\expandafter\endcsname
\csname end#1\endcsname
}%
{%
\edef\reserved@a{%
\expandafter\expandafter
\expandafter\@gobble
\expandafter\string
\csname end#1theorem\endcsname
}%
\@notdefinable
}%
\expandafter\@ifdefinable\csname @#1\endcsname{%
\expandafter\gdef\csname @#1\endcsname[##1]{%
\def\@tempa{##1}%
\collect@body\toks@{#1theorem}%
}%
}%
\expandafter\gdef\csname #1\endcsname{%
\@ifnextchar[%
{\@tempswatrue\csname @#1\endcsname}%
{\@tempswafalse\csname @#1\endcsname[]}%
}%
\expandafter\gdef\csname end#1\endcsname{%
\toks@\expandafter{\expandafter\begin\the\toks@\end{#1theorem}}%
\the\toks@
\ifx\@tempa\@empty\@tempswafalse\fi
\if@tempswa
{%
\expandafter\edef
\csname the#1\endcsname{%
\csname the#1\endcsname
}%
\expandafter\@ifdefinable\@tempa{%
\expandafter\expandafter
\expandafter \gdef
\expandafter\@tempa
\expandafter{%
\expandafter\bgroup
\expandafter\def
\csname the#1%
\expandafter\expandafter
\expandafter\endcsname
\expandafter\expandafter
\expandafter{%
\csname the#1%
\expandafter\endcsname
\expandafter}%
\expandafter\let
\expandafter\label
\expandafter\@gobble
\the\toks@
\addtocounter{#1}{-1}%
\egroup
}%
}%
}%
\fi
}%
}%
\makeatother
\newtheoremWithMacro{Mytheorem}{My Theorem}[section]
\begin{document}
\section{test}
\begin{Mytheorem}[\firsttheorem][Not Galois]%
This is my first theorem.
\label{firsttheoremsfirstocurrence}%
\end{Mytheorem}
\firsttheorem
\begin{Mytheorem}[][Not Galois]
This is my second theorem.
\end{Mytheorem}
\begin{Mytheorem}
This is my third theorem.
\end{Mytheorem}
\firsttheorem
\newpage
\firsttheorem
This is page-reference to the page where my first theorem
occurred the first time: \pageref{firsttheoremsfirstocurrence}%
This is section-reference to the page where my first theorem
occurred the first time: \ref{firsttheoremsfirstocurrence}%
\end{document}
-------------------------------------------------------------------------------
This is e-TeX, Version 3.141592-2.2 (MiKTeX 2.4) (preloaded format=latex 2005.2.7) 11 JUL 2006
14:47
entering extended mode
**testd.tex
(testd.tex
LaTeX2e <2003/12/01>
Babel <v3.8a> and hyphenation patterns for english, french, german, ngerman, du
mylang, nohyphenation, loaded.
(C:\texmf\tex\latex\base\article.cls
Document Class: article 2004/02/16 v1.4f Standard LaTeX document class
(C:\texmf\tex\latex\base\size10.clo
File: size10.clo 2004/02/16 v1.4f Standard LaTeX file (size option)
)
\c@part=\count79
\c@section=\count80
\c@subsection=\count81
\c@subsubsection=\count82
\c@paragraph=\count83
\c@subparagraph=\count84
\c@figure=\count85
\c@table=\count86
\abovecaptionskip=\skip41
\belowcaptionskip=\skip42
\bibindent=\dimen102
) (C:\texmf\tex\latex\amsmath\amsmath.sty
Package: amsmath 2000/07/18 v2.13 AMS math features
\@mathmargin=\skip43
For additional information on amsmath, use the `?' option.
(C:\texmf\tex\latex\amsmath\amstext.sty
Package: amstext 2000/06/29 v2.01
(C:\texmf\tex\latex\amsmath\amsgen.sty
File: amsgen.sty 1999/11/30 v2.0
\@emptytoks=\toks14
\ex@=\dimen103
)) (C:\texmf\tex\latex\amsmath\amsbsy.sty
Package: amsbsy 1999/11/29 v1.2d
\pmbraise@=\dimen104
)
(C:\texmf\tex\latex\amsmath\amsopn.sty
Package: amsopn 1999/12/14 v2.01 operator names
)
\inf@bad=\count87
LaTeX Info: Redefining \frac on input line 211.
\uproot@=\count88
\leftroot@=\count89
LaTeX Info: Redefining \overline on input line 307.
\classnum@=\count90
\DOTSCASE@=\count91
LaTeX Info: Redefining \ldots on input line 379.
LaTeX Info: Redefining \dots on input line 382.
LaTeX Info: Redefining \cdots on input line 467.
\Mathstrutbox@=\box26
\strutbox@=\box27
\big@size=\dimen105
LaTeX Font Info: Redeclaring font encoding OML on input line 567.
LaTeX Font Info: Redeclaring font encoding OMS on input line 568.
\macc@depth=\count92
\c@MaxMatrixCols=\count93
\dotsspace@=\muskip10
\c@parentequation=\count94
\dspbrk@lvl=\count95
\tag@help=\toks15
\row@=\count96
\column@=\count97
\maxfields@=\count98
\andhelp@=\toks16
\eqnshift@=\dimen106
\alignsep@=\dimen107
\tagshift@=\dimen108
\tagwidth@=\dimen109
\totwidth@=\dimen110
\lineht@=\dimen111
\@envbody=\toks17
\multlinegap=\skip44
\multlinetaggap=\skip45
\mathdisplay@stack=\toks18
LaTeX Info: Redefining \[ on input line 2666.
LaTeX Info: Redefining \] on input line 2667.
)
(C:\texmf\tex\latex\hyperref\hyperref.sty
Package: hyperref 2003/11/30 v6.74m Hypertext links for LaTeX
(C:\texmf\tex\latex\graphics\keyval.sty
Package: keyval 1999/03/16 v1.13 key=value parser (DPC)
\KV@toks@=\toks19
)
\@linkdim=\dimen112
\Hy@linkcounter=\count99
\Hy@pagecounter=\count100
(C:\texmf\tex\latex\hyperref\pd1enc.def
File: pd1enc.def 2003/11/30 v6.74m Hyperref: PDFDocEncoding definition (HO)
)
(C:\texmf\tex\latex\00miktex\hyperref.cfg
File: hyperref.cfg 2003/03/08 v1.0 MiKTeX 'hyperref' configuration
)
Package hyperref Info: Hyper figures OFF on input line 1880.
Package hyperref Info: Link nesting OFF on input line 1885.
Package hyperref Info: Hyper index ON on input line 1888.
Package hyperref Info: Plain pages ON on input line 1893.
Package hyperref Info: Backreferencing OFF on input line 1900.
Implicit mode ON; LaTeX internals redefined
Package hyperref Info: Bookmarks ON on input line 2004.
(C:\texmf\tex\latex\ltxmisc\url.sty
\Urlmuskip=\muskip11
Package: url 2004/03/15 ver 3.1 Verb mode for urls, etc.
)
LaTeX Info: Redefining \url on input line 2143.
\Fld@menulength=\count101
\Field@Width=\dimen113
\Fld@charsize=\dimen114
\Choice@toks=\toks20
\Field@toks=\toks21
Package hyperref Info: Hyper figures OFF on input line 2618.
Package hyperref Info: Link nesting OFF on input line 2623.
Package hyperref Info: Hyper index ON on input line 2626.
Package hyperref Info: backreferencing OFF on input line 2633.
Package hyperref Info: Link coloring OFF on input line 2638.
\c@Item=\count102
\c@Hfootnote=\count103
)
*hyperref using default driver hypertex*
(C:\texmf\tex\latex\hyperref\hypertex.def
File: hypertex.def 2003/11/30 v6.74m Hyperref driver for HyperTeX specials
)
\c@Mytheorem=\count104
(testd.aux)
LaTeX Font Info: Checking defaults for OML/cmm/m/it on input line 105.
LaTeX Font Info: ... okay on input line 105.
LaTeX Font Info: Checking defaults for T1/cmr/m/n on input line 105.
LaTeX Font Info: ... okay on input line 105.
LaTeX Font Info: Checking defaults for OT1/cmr/m/n on input line 105.
LaTeX Font Info: ... okay on input line 105.
LaTeX Font Info: Checking defaults for OMS/cmsy/m/n on input line 105.
LaTeX Font Info: ... okay on input line 105.
LaTeX Font Info: Checking defaults for OMX/cmex/m/n on input line 105.
LaTeX Font Info: ... okay on input line 105.
LaTeX Font Info: Checking defaults for U/cmr/m/n on input line 105.
LaTeX Font Info: ... okay on input line 105.
LaTeX Font Info: Checking defaults for PD1/pdf/m/n on input line 105.
LaTeX Font Info: ... okay on input line 105.
Package hyperref Info: Link coloring OFF on input line 105.
(C:\texmf\tex\latex\hyperref\nameref.sty
Package: nameref 2003/12/03 v2.21 Cross-referencing by name of section
\c@section@level=\count105
)
LaTeX Info: Redefining \ref on input line 105.
LaTeX Info: Redefining \pageref on input line 105.
[1
] [2] (testd.aux) )
Here is how much of TeX's memory you used:
2429 strings out of 95898
30659 string characters out of 1195289
76910 words of memory out of 1080175
5464 multiletter control sequences out of 60000
4899 words of font info for 18 fonts, out of 500000 for 1000
14 hyphenation exceptions out of 607
27i,4n,25p,222b,123s stack positions out of 1500i,500n,5000p,200000b,32768s
Output written on testd.dvi (2 pages, 1652 bytes).
-------------------------------------------------------------------------------
This is pdfeTeX, Version 3.141592-1.20b-2.2 (MiKTeX 2.4) (preloaded format=latex 2005.2.7) 11 JUL
2006 14:45
entering extended mode
**testd.tex
(testd.tex
LaTeX2e <2003/12/01>
Babel <v3.8a> and hyphenation patterns for english, french, german, ngerman, du
mylang, nohyphenation, loaded.
(C:\texmf\tex\latex\base\article.cls
Document Class: article 2004/02/16 v1.4f Standard LaTeX document class
(C:\texmf\tex\latex\base\size10.clo
File: size10.clo 2004/02/16 v1.4f Standard LaTeX file (size option)
)
\c@part=\count79
\c@section=\count80
\c@subsection=\count81
\c@subsubsection=\count82
\c@paragraph=\count83
\c@subparagraph=\count84
\c@figure=\count85
\c@table=\count86
\abovecaptionskip=\skip41
\belowcaptionskip=\skip42
\bibindent=\dimen102
) (C:\texmf\tex\latex\amsmath\amsmath.sty
Package: amsmath 2000/07/18 v2.13 AMS math features
\@mathmargin=\skip43
For additional information on amsmath, use the `?' option.
(C:\texmf\tex\latex\amsmath\amstext.sty
Package: amstext 2000/06/29 v2.01
(C:\texmf\tex\latex\amsmath\amsgen.sty
File: amsgen.sty 1999/11/30 v2.0
\@emptytoks=\toks14
\ex@=\dimen103
)) (C:\texmf\tex\latex\amsmath\amsbsy.sty
Package: amsbsy 1999/11/29 v1.2d
\pmbraise@=\dimen104
)
(C:\texmf\tex\latex\amsmath\amsopn.sty
Package: amsopn 1999/12/14 v2.01 operator names
)
\inf@bad=\count87
LaTeX Info: Redefining \frac on input line 211.
\uproot@=\count88
\leftroot@=\count89
LaTeX Info: Redefining \overline on input line 307.
\classnum@=\count90
\DOTSCASE@=\count91
LaTeX Info: Redefining \ldots on input line 379.
LaTeX Info: Redefining \dots on input line 382.
LaTeX Info: Redefining \cdots on input line 467.
\Mathstrutbox@=\box26
\strutbox@=\box27
\big@size=\dimen105
LaTeX Font Info: Redeclaring font encoding OML on input line 567.
LaTeX Font Info: Redeclaring font encoding OMS on input line 568.
\macc@depth=\count92
\c@MaxMatrixCols=\count93
\dotsspace@=\muskip10
\c@parentequation=\count94
\dspbrk@lvl=\count95
\tag@help=\toks15
\row@=\count96
\column@=\count97
\maxfields@=\count98
\andhelp@=\toks16
\eqnshift@=\dimen106
\alignsep@=\dimen107
\tagshift@=\dimen108
\tagwidth@=\dimen109
\totwidth@=\dimen110
\lineht@=\dimen111
\@envbody=\toks17
\multlinegap=\skip44
\multlinetaggap=\skip45
\mathdisplay@stack=\toks18
LaTeX Info: Redefining \[ on input line 2666.
LaTeX Info: Redefining \] on input line 2667.
)
(C:\texmf\tex\latex\hyperref\hyperref.sty
Package: hyperref 2003/11/30 v6.74m Hypertext links for LaTeX
(C:\texmf\tex\latex\graphics\keyval.sty
Package: keyval 1999/03/16 v1.13 key=value parser (DPC)
\KV@toks@=\toks19
)
\@linkdim=\dimen112
\Hy@linkcounter=\count99
\Hy@pagecounter=\count100
(C:\texmf\tex\latex\hyperref\pd1enc.def
File: pd1enc.def 2003/11/30 v6.74m Hyperref: PDFDocEncoding definition (HO)
)
(C:\texmf\tex\latex\00miktex\hyperref.cfg
File: hyperref.cfg 2003/03/08 v1.0 MiKTeX 'hyperref' configuration
)
Package hyperref Info: Hyper figures OFF on input line 1880.
Package hyperref Info: Link nesting OFF on input line 1885.
Package hyperref Info: Hyper index ON on input line 1888.
Package hyperref Info: Plain pages ON on input line 1893.
Package hyperref Info: Backreferencing OFF on input line 1900.
Implicit mode ON; LaTeX internals redefined
Package hyperref Info: Bookmarks ON on input line 2004.
(C:\texmf\tex\latex\ltxmisc\url.sty
\Urlmuskip=\muskip11
Package: url 2004/03/15 ver 3.1 Verb mode for urls, etc.
)
LaTeX Info: Redefining \url on input line 2143.
\Fld@menulength=\count101
\Field@Width=\dimen113
\Fld@charsize=\dimen114
\Choice@toks=\toks20
\Field@toks=\toks21
Package hyperref Info: Hyper figures OFF on input line 2618.
Package hyperref Info: Link nesting OFF on input line 2623.
Package hyperref Info: Hyper index ON on input line 2626.
Package hyperref Info: backreferencing OFF on input line 2633.
Package hyperref Info: Link coloring OFF on input line 2638.
\c@Item=\count102
\c@Hfootnote=\count103
)
*hyperref using default driver hpdftex*
(C:\texmf\tex\latex\hyperref\hpdftex.def
File: hpdftex.def 2003/11/30 v6.74m Hyperref driver for pdfTeX
(C:\texmf\tex\latex\psnfss\pifont.sty
Package: pifont 2004/09/15 PSNFSS-v9.2 Pi font support (SPQR)
LaTeX Font Info: Try loading font information for U+pzd on input line 63.
(C:\texmf\tex\latex\psnfss\upzd.fd
File: upzd.fd 2001/06/04 font definitions for U/pzd.
)
LaTeX Font Info: Try loading font information for U+psy on input line 64.
(C:\texmf\tex\latex\psnfss\upsy.fd
File: upsy.fd 2001/06/04 font definitions for U/psy.
))
\Fld@listcount=\count104
\@outlinefile=\write3
)
\c@Mytheorem=\count105
(testd.aux)
LaTeX Font Info: Checking defaults for OML/cmm/m/it on input line 105.
LaTeX Font Info: ... okay on input line 105.
LaTeX Font Info: Checking defaults for T1/cmr/m/n on input line 105.
LaTeX Font Info: ... okay on input line 105.
LaTeX Font Info: Checking defaults for OT1/cmr/m/n on input line 105.
LaTeX Font Info: ... okay on input line 105.
LaTeX Font Info: Checking defaults for OMS/cmsy/m/n on input line 105.
LaTeX Font Info: ... okay on input line 105.
LaTeX Font Info: Checking defaults for OMX/cmex/m/n on input line 105.
LaTeX Font Info: ... okay on input line 105.
LaTeX Font Info: Checking defaults for U/cmr/m/n on input line 105.
LaTeX Font Info: ... okay on input line 105.
LaTeX Font Info: Checking defaults for PD1/pdf/m/n on input line 105.
LaTeX Font Info: ... okay on input line 105.
Package hyperref Info: Link coloring OFF on input line 105.
(C:\texmf\tex\latex\hyperref\nameref.sty
Package: nameref 2003/12/03 v2.21 Cross-referencing by name of section
\c@section@level=\count106
)
LaTeX Info: Redefining \ref on input line 105.
LaTeX Info: Redefining \pageref on input line 105.
[1
{psfonts.map}
! pdfTeX warning (ext4): destination with the same identifier (name{Mytheorem.1
..2}) has been already used, duplicate ignored
<to be read again>
\endgroup \set@typeset@protect
l.126 \newpage
]
! pdfTeX warning (ext4): destination with the same identifier (name{Mytheorem.1
..4}) has been already used, duplicate ignored
<to be read again>
\penalty
l.128 \firsttheorem
[2] (testd.aux) )
Here is how much of TeX's memory you used:
2560 strings out of 95517
32151 string characters out of 1189522
82979 words of memory out of 1086243
5623 multiletter control sequences out of 60000
5589 words of font info for 20 fonts, out of 500000 for 1000
14 hyphenation exceptions out of 607
27i,4n,36p,222b,214s stack positions out of 1500i,500n,5000p,200000b,32768s
PDF statistics:
34 PDF objects out of 300000
8 named destinations out of 300000
17 words of extra memory for PDF output out of 65536
<C:\texmf\fonts\type1\bluesky\cm\cmr10.pfb
<C:\texmf\fonts\type1\bluesky\cm\cmti10.pfb><C:\texmf\fonts\type1\bluesky\cm\cmbx10.pfb><C:\texmf\fonts\type1\bluesky\cm\cmbx12.pfb>
Output written on testd.pdf (2 pages, 26950 bytes).
.
- References:
- Restating theorems?
- From: theran
- Re: Restating theorems?
- From: Ulrich Diez
- Re: Restating theorems?
- From: Ulrich M. Schwarz
- Re: Restating theorems?
- From: Ulrich Diez
- Re: Restating theorems?
- From: Louis Theran
- Re: Restating theorems?
- From: Michael
- Re: Restating theorems?
- From: Louis Theran
- Restating theorems?
- Prev by Date: Re: Yap sometimes hangs making fonts
- Next by Date: Re: ltxdoc, vertical gap between macrocode-environments
- Previous by thread: Re: Restating theorems?
- Next by thread: How to use japanese characters in LaTeX?
- Index(es):
Relevant Pages
|