On Fri, Jan 21, 2011 at 12:36:21AM +0100, Enrico Forestieri wrote:

> There is a number of preview snippets failing in the math manual, but
> it seems that hyperref is the culprit here. For example, see:
> https://bugs.launchpad.net/ubuntu/+source/auctex/+bug/524961
> https://bugs.launchpad.net/ubuntu/+source/auctex/+bug/592509
> http://bugs.gentoo.org/show_bug.cgi?id=267930

I verified that hyperref is indeed responsible for the failures.
The attached patch removes all traces of hyperref in the math
manual. After applying it, all preview snippets are generated.

-- 
Enrico
Index: lib/doc/Math.lyx
===================================================================
--- lib/doc/Math.lyx	(revisione 37284)
+++ lib/doc/Math.lyx	(copia locale)
@@ -37,18 +37,6 @@
 \DeclareInputText{176}{\ifmmode^\circ\else\textdegree\fi}
 \DeclareInputText{183}{\ifmmode\cdot\else\textperiodcentered\fi}
 
-% increase link area for cross-references and autoname them,
-\AtBeginDocument{\renewcommand{\ref}[1]{\mbox{\autoref{#1}}}}
-\newlength{\abc}
-\settowidth{\abc}{\space}
-\AtBeginDocument{%
-\addto\extrasenglish{
- \renewcommand{\equationautorefname}{\hspace{-\abc}}
- \renewcommand{\sectionautorefname}{sec.\negthinspace}
- \renewcommand{\subsectionautorefname}{sec.\negthinspace}
- \renewcommand{\subsubsectionautorefname}{sec.\negthinspace}}
-}
-
 % don't load packages twice
 % see first footnote in sec. 9.3
 \@ifundefined{textcolor}{\usepackage{color}}{}
@@ -58,8 +46,6 @@
 \pagenumbering{roman}
 \let\myTOC\tableofcontents
 \renewcommand{\tableofcontents}{%
- \vspace{1cm}
- \pdfbookmark[1]{\contentsname}{}
  \myTOC
  \cleardoublepage
  \pagenumbering{arabic}}
@@ -168,7 +154,7 @@
 \index_command default
 \paperfontsize 12
 \spacing single
-\use_hyperref true
+\use_hyperref false
 \pdf_title "LyX's Math Manual"
 \pdf_author "LyX Team, Uwe Stöhr"
 \pdf_subject "LyX-documentation about math"
@@ -233,16 +219,7 @@ status collapsed
 If you have comments or error corrections, please send them to the LyX Documenta
 tion mailing list: 
 \family typewriter
-
-\begin_inset CommandInset href
-LatexCommand href
-name "[email protected]"
-target "[email protected]?subject=LyX's Math manual"
-type "mailto:"
-
-\end_inset
-
-
[email protected]
 \end_layout
 
 \end_inset
@@ -453,19 +430,8 @@ AmS
 
 \end_inset
 
--math commands is in the file 
-\family sans
-
-\begin_inset CommandInset href
-LatexCommand href
-name "amsguide.ps"
-target "ftp://ctan.tug.org/tex-archive/macros/amstex/doc/amsguide.ps";
-
-\end_inset
-
-
-\family default
-, which is part of every LaTeX standard installation.
+-math commands is in the file amsguide.ps, which is part of every LaTeX standard
+ installation.
 \end_layout
 
 \end_inset
@@ -8017,14 +7983,7 @@ The first formula row is the same as the
 status collapsed
 
 \begin_layout Plain Layout
-\begin_inset CommandInset href
-LatexCommand href
-name "LyX-bug #1505"
-target "http://www.lyx.org/trac/ticket/1505";
-
-\end_inset
-
-
+LyX-bug #1505
 \end_layout
 
 \end_inset
@@ -9503,19 +9462,6 @@ Accents can be inserted via the math too
 
 \begin_layout Subsection
 Accents for one Character
-\begin_inset ERT
-status collapsed
-
-\begin_layout Plain Layout
-
-
-\backslash
-texorpdfstring{
-\end_layout
-
-\end_inset
-
-
 \begin_inset Foot
 status collapsed
 
@@ -9533,17 +9479,6 @@ reference "sub:Accents-in-Text"
 \end_inset
 
 
-\begin_inset ERT
-status collapsed
-
-\begin_layout Plain Layout
-
-}{}
-\end_layout
-
-\end_inset
-
-
 \begin_inset Note Note
 status collapsed
 
@@ -11956,19 +11891,6 @@ smallest space between value and unit
 
 \begin_layout Subsection
 Variable Space
-\begin_inset ERT
-status collapsed
-
-\begin_layout Plain Layout
-
-
-\backslash
-texorpdfstring{
-\end_layout
-
-\end_inset
-
-
 \begin_inset Foot
 status collapsed
 
@@ -11986,17 +11908,6 @@ reference "sub:Line-Separation"
 \end_inset
 
 
-\begin_inset ERT
-status collapsed
-
-\begin_layout Plain Layout
-
-}{}
-\end_layout
-
-\end_inset
-
-
 \begin_inset Note Note
 status collapsed
 
@@ -14659,14 +14570,7 @@ times the frame separation and the frame
 status collapsed
 
 \begin_layout Plain Layout
-\begin_inset CommandInset href
-LatexCommand href
-name "LyX-bug #4483"
-target "http://www.lyx.org/trac/ticket/4483";
-
-\end_inset
-
-
+LyX-bug #4483
 \end_layout
 
 \end_inset
@@ -18776,14 +18680,7 @@ textrm
 status collapsed
 
 \begin_layout Plain Layout
-\begin_inset CommandInset href
-LatexCommand href
-name "LyX-bug #4629"
-target "http://www.lyx.org/trac/ticket/4629";
-
-\end_inset
-
-
+LyX-bug #4629
 \end_layout
 
 \end_inset
@@ -19058,14 +18955,7 @@ Due to a bug in LyX only complete formul
 status collapsed
 
 \begin_layout Plain Layout
-\begin_inset CommandInset href
-LatexCommand href
-name "LyX-bug #5269"
-target "http://www.lyx.org/trac/ticket/5269";
-
-\end_inset
-
-
+LyX-bug #5269
 \end_layout
 
 \end_inset
@@ -21138,19 +21028,6 @@ theta
 
 \begin_layout Section
 Symbols
-\begin_inset ERT
-status collapsed
-
-\begin_layout Plain Layout
-
-
-\backslash
-texorpdfstring{
-\end_layout
-
-\end_inset
-
-
 \begin_inset Foot
 status collapsed
 
@@ -21168,17 +21045,6 @@ key "Symbols"
 \end_inset
 
 
-\begin_inset ERT
-status collapsed
-
-\begin_layout Plain Layout
-
-}{}
-\end_layout
-
-\end_inset
-
-
 \begin_inset Note Note
 status collapsed
 
@@ -28192,15 +28058,7 @@ In LaTeX additional line space is specif
 status collapsed
 
 \begin_layout Plain Layout
-see 
-\begin_inset CommandInset href
-LatexCommand href
-name "LyX-bug #1505"
-target "http://www.lyx.org/trac/ticket/1505";
-
-\end_inset
-
-
+see LyX-bug #1505
 \end_layout
 
 \end_inset
@@ -28750,14 +28608,7 @@ Due to a bug in LyX the cursor cannot be
 status collapsed
 
 \begin_layout Plain Layout
-\begin_inset CommandInset href
-LatexCommand href
-name "LyX-bug #1429"
-target "http://www.lyx.org/trac/ticket/1429";
-
-\end_inset
-
-
+LyX-bug #1429
 \end_layout
 
 \end_inset
@@ -31560,15 +31411,7 @@ As you see, formulas are numbered serial
 \end_inset
 
  when the style is changed, new equation counters have to be defined.
- A description about this can be found in the file 
-\begin_inset CommandInset href
-LatexCommand href
-name "Formula-numbering.lyx"
-target "run:Formula-numbering.lyx"
-
-\end_inset
-
-.
+ A description about this can be found in the file Formula-numbering.lyx.
 \end_layout
 
 \begin_layout Section
@@ -35959,35 +35802,11 @@ Heading without formula in table of cont
 \end_layout
 
 \begin_layout Subsubsection
-Heading with formula in table of contents
-\begin_inset ERT
-status collapsed
-
-\begin_layout Plain Layout
-
-
-\backslash
-texorpdfstring{
-\end_layout
-
-\end_inset
-
- 
+Heading with formula in table of contents 
 \begin_inset Formula $\sqrt{-1}=\mathrm{i}$
 \end_inset
 
 
-\begin_inset ERT
-status collapsed
-
-\begin_layout Plain Layout
-
-}{}
-\end_layout
-
-\end_inset
-
-
 \end_layout
 
 \begin_layout Standard
@@ -37844,15 +37663,7 @@ key "Mathmode"
 
 \end_inset
 
-
-\begin_inset CommandInset href
-LatexCommand href
-name "Description"
-target "ftp://ftp.dante.de/tex-archive/info/math/voss/mathmode/Mathmode.pdf";
-
-\end_inset
-
- of LaTeX's math abilities
+Description of LaTeX's math abilities
 \end_layout
 
 \begin_layout Bibliography
@@ -37863,15 +37674,7 @@ key "AMS"
 
 \end_inset
 
-
-\begin_inset CommandInset href
-LatexCommand href
-name "Description"
-target "ftp://ftp.ams.org/pub/tex/doc/amsmath/amsldoc.pdf";
-
-\end_inset
-
- of 
+Description of 
 \begin_inset ERT
 status collapsed
 
@@ -37895,15 +37698,7 @@ key "Symbols"
 
 \end_inset
 
-
-\begin_inset CommandInset href
-LatexCommand href
-name "List"
-target "ftp://ftp.dante.de/tex-archive/info/symbols/comprehensive/symbols-a4.pdf";
-
-\end_inset
-
- of all symbols available with LaTeX-packages
+List of all symbols available with LaTeX-packages
 \end_layout
 
 \begin_layout Bibliography
@@ -37914,15 +37709,7 @@ key "hyperref"
 
 \end_inset
 
-
-\begin_inset CommandInset href
-LatexCommand href
-name "Documentation"
-target "http://www.tug.org/applications/hyperref/ftp/doc/manual.pdf";
-
-\end_inset
-
- of the LaTeX-package 
+Documentation of the LaTeX-package 
 \series bold
 hyperref
 \series default
@@ -37947,15 +37734,7 @@ key "mhchem"
 
 \end_inset
 
-
-\begin_inset CommandInset href
-LatexCommand href
-name "Documentation"
-target "http://www.ctan.org/tex-archive/macros/latex/contrib/mhchem/mhchem.pdf";
-
-\end_inset
-
- of the LaTeX-package 
+Documentation of the LaTeX-package 
 \series bold
 mhchem
 \series default
@@ -37980,15 +37759,7 @@ key "Mathclap"
 
 \end_inset
 
-
-\begin_inset CommandInset href
-LatexCommand href
-name "Description"
-target "http://www.tug.org/TUGboat/Articles/tb22-4/tb72perlS.pdf";
-
-\end_inset
-
- of the command 
+Description of the command 
 \series bold
 
 \backslash
@@ -38041,15 +37812,7 @@ key "Checklist"
 
 \end_inset
 
-
-\begin_inset CommandInset href
-LatexCommand href
-name "Check list"
-target "http://physics.nist.gov/Document/checklist.pdf";
-
-\end_inset
-
- for reviewing manuscripts
+Check list for reviewing manuscripts
 \end_layout
 
 \begin_layout Standard

Reply via email to