From df20fbbca499b9a86f65b16d7719929940f8c296 Mon Sep 17 00:00:00 2001
From: Axel Kohlmeyer <akohlmey@gmail.com>
Date: Thu, 9 Aug 2018 16:50:09 +0200
Subject: [PATCH] fix a bunch of broken linke or make links unique across files

---
 doc/src/Commands_bond.txt     | 2 +-
 doc/src/Howto_tip4p.txt       | 4 ++--
 doc/src/Intro_features.txt    | 4 ++--
 doc/src/Manual.txt            | 6 ++++--
 doc/src/Packages_details.txt  | 8 ++++----
 doc/src/Packages_standard.txt | 4 ++--
 doc/src/Python_install.txt    | 2 +-
 doc/src/Python_shlib.txt      | 3 ++-
 doc/src/fix_manifoldforce.txt | 2 +-
 doc/src/fix_property_atom.txt | 3 ++-
 doc/src/fix_wall_reflect.txt  | 4 ++--
 11 files changed, 23 insertions(+), 19 deletions(-)

diff --git a/doc/src/Commands_bond.txt b/doc/src/Commands_bond.txt
index 314260cb14..48069d3120 100644
--- a/doc/src/Commands_bond.txt
+++ b/doc/src/Commands_bond.txt
@@ -9,7 +9,7 @@ Documentation"_ld - "LAMMPS Commands"_lc :c
 "Fix styles"_Commands_fix.html,
 "Compute styles"_Commands_compute.html,
 "Pair styles"_Commands_pair.html,
-"Bond styles"_Commands_bond.html,
+"Bond styles"_Commands_bond.html#bond,
 "Angle styles"_Commands_bond.html#angle,
 "Dihedral styles"_Commands_bond.html#dihedral,
 "Improper styles"_Commands_bond.html#improper,
diff --git a/doc/src/Howto_tip4p.txt b/doc/src/Howto_tip4p.txt
index f9e548e268..9f7f141314 100644
--- a/doc/src/Howto_tip4p.txt
+++ b/doc/src/Howto_tip4p.txt
@@ -31,7 +31,7 @@ using the "fix shake"_fix_shake.html command.
 
 These are the additional parameters (in real units) to set for O and H
 atoms and the water molecule to run a rigid TIP4P model with a cutoff
-"(Jorgensen)"_#Jorgensen1.  Note that the OM distance is specified in
+"(Jorgensen)"_#Jorgensen5.  Note that the OM distance is specified in
 the "pair_style"_pair_style.html command, not as part of the pair
 coefficients.
 
@@ -107,6 +107,6 @@ models"_http://en.wikipedia.org/wiki/Water_model.
 
 :line
 
-:link(Jorgensen1)
+:link(Jorgensen5)
 [(Jorgensen)] Jorgensen, Chandrasekhar, Madura, Impey, Klein, J Chem
 Phys, 79, 926 (1983).
diff --git a/doc/src/Intro_features.txt b/doc/src/Intro_features.txt
index 2bb7e25683..07c549c156 100644
--- a/doc/src/Intro_features.txt
+++ b/doc/src/Intro_features.txt
@@ -20,7 +20,7 @@ classes of functionality:
 "Integrators"_#integrate
 "Diagnostics"_#diag
 "Output"_#output
-"Multi-replica models"_#replica
+"Multi-replica models"_#replica1
 "Pre- and post-processing"_#prepost
 "Specialized features (beyond MD itself)"_#special :ul
 
@@ -154,7 +154,7 @@ Output :h4,link(output)
   time averaging of system-wide quantities
   atom snapshots in native, XYZ, XTC, DCD, CFG formats :ul
 
-Multi-replica models :h4,link(replica)
+Multi-replica models :h4,link(replica1)
 
 "nudged elastic band"_neb.html
 "parallel replica dynamics"_prd.html
diff --git a/doc/src/Manual.txt b/doc/src/Manual.txt
index a5e8b63640..5a70be5c50 100644
--- a/doc/src/Manual.txt
+++ b/doc/src/Manual.txt
@@ -8,6 +8,8 @@
 
 <BODY>
 
+<H1></H1>
+
 <!-- END_HTML_ONLY -->
 
 "LAMMPS WWW Site"_lws - "LAMMPS Documentation"_ld - "LAMMPS Commands"_lc :c
@@ -18,8 +20,6 @@
 
 :line
 
-<H1></H1>
-
 LAMMPS Documentation :c,h1
 2 Aug 2018 version :c,h2
 
@@ -71,6 +71,7 @@ every LAMMPS command.
    :name: userdoc
    :includehidden:
 
+   Manual_version
    Intro
    Section_start
    Commands
@@ -82,6 +83,7 @@ every LAMMPS command.
    Modify
    Python
    Errors
+   Build_manual
 
 .. toctree::
    :caption: Index
diff --git a/doc/src/Packages_details.txt b/doc/src/Packages_details.txt
index eb92fe4dc4..8b28002c2e 100644
--- a/doc/src/Packages_details.txt
+++ b/doc/src/Packages_details.txt
@@ -49,7 +49,7 @@ as contained in the file name.
 "PYTHON"_#PYTHON,
 "QEQ"_#QEQ,
 "REAX"_#REAX,
-"REPLICA"_#REPLICA,
+"REPLICA"_#REPLICA2,
 "RIGID"_#RIGID,
 "SHOCK"_#SHOCK,
 "SNAP"_#SNAP,
@@ -392,7 +392,7 @@ src/GPU: filenames -> commands
 src/GPU/README
 lib/gpu/README
 "Speed packages"_Speed_packages.html
-"Speed gpu"_Speed_gpu.html.html
+"Speed gpu"_Speed_gpu.html
 "Section 2.6 -sf gpu"_Section_start.html#start_6
 "Section 2.6 -pk gpu"_Section_start.html#start_6
 "package gpu"_package.html
@@ -1225,7 +1225,7 @@ examples/reax :ul
 
 :line
 
-REPLICA package :link(REPLICA),h4
+REPLICA package :link(REPLICA2),h4
 
 [Contents:]
 
@@ -1373,7 +1373,7 @@ make machine :pre
 [Supporting info:]
 
 src/SPIN: filenames -> commands
-"Howto spin"_Howto_spin.html
+"Howto spins"_Howto_spins.html
 "pair_style spin/dmi"_pair_spin_dmi.html
 "pair_style spin/exchange"_pair_spin_exchange.html
 "pair_style spin/magelec"_pair_spin_magelec.html
diff --git a/doc/src/Packages_standard.txt b/doc/src/Packages_standard.txt
index 7e64345602..56ec693185 100644
--- a/doc/src/Packages_standard.txt
+++ b/doc/src/Packages_standard.txt
@@ -57,9 +57,9 @@ Package, Description, Doc page, Example, Library
 "PYTHON"_Packages_details.html#PYTHON, embed Python code in an input script, "python"_python.html, python, sys
 "QEQ"_Packages_details.html#QEQ, QEq charge equilibration, "fix qeq"_fix_qeq.html, qeq, -
 "REAX"_Packages_details.html#REAX, ReaxFF potential (Fortran), "pair_style reax"_pair_reax.html, reax, int
-"REPLICA"_Packages_details.html#REPLICA, multi-replica methods, "Howto replica"_Howto_replica.html, tad, -
+"REPLICA"_Packages_details.html#REPLICA2, multi-replica methods, "Howto replica"_Howto_replica.html, tad, -
 "RIGID"_Packages_details.html#RIGID, rigid bodies and constraints, "fix rigid"_fix_rigid.html, rigid, -
 "SHOCK"_Packages_details.html#SHOCK, shock loading methods, "fix msst"_fix_msst.html, -, -
 "SNAP"_Packages_details.html#SNAP, quantum-fitted potential, "pair_style snap"_pair_snap.html, snap, -
-"SPIN"_#SPIN, magnetic atomic spin dynamics, "Howto spin"_Howto_spin.html, SPIN, -"SRD"_Packages_details.html#SRD, stochastic rotation dynamics, "fix srd"_fix_srd.html, srd, -
+"SPIN"_#SPIN, magnetic atomic spin dynamics, "Howto spins"_Howto_spins.html, SPIN, -"SRD"_Packages_details.html#SRD, stochastic rotation dynamics, "fix srd"_fix_srd.html, srd, -
 "VORONOI"_Packages_details.html#VORONOI, Voronoi tesselation, "compute voronoi/atom"_compute_voronoi_atom.html, -, ext :tb(ea=c,ca1=l)
diff --git a/doc/src/Python_install.txt b/doc/src/Python_install.txt
index 6591360ae2..85cf267de0 100644
--- a/doc/src/Python_install.txt
+++ b/doc/src/Python_install.txt
@@ -68,7 +68,7 @@ need to prefix this with "sudo".  In this mode you cannot control
 which Python is invoked by root.
 
 Note that if you want Python to be able to load different versions of
-the LAMMPS shared library (see "this section"_#py_5 below), you will
+the LAMMPS shared library (see "this section"_Python_shlib.html), you will
 need to manually copy files like liblammps_g++.so into the appropriate
 system directory.  This is not needed if you set the LD_LIBRARY_PATH
 environment variable as described above.
diff --git a/doc/src/Python_shlib.txt b/doc/src/Python_shlib.txt
index 1a921e4025..c3b81fa342 100644
--- a/doc/src/Python_shlib.txt
+++ b/doc/src/Python_shlib.txt
@@ -31,4 +31,5 @@ extra libraries must also be shared libraries.  If the LAMMPS
 shared-library build fails with an error complaining about this, see
 "Section 2.4"_Section_start.html#start_4 for more details.
 
-Also include CMake info on this
+TODO: Also include CMake info on this
+
diff --git a/doc/src/fix_manifoldforce.txt b/doc/src/fix_manifoldforce.txt
index aa32a875bf..2159d6211a 100644
--- a/doc/src/fix_manifoldforce.txt
+++ b/doc/src/fix_manifoldforce.txt
@@ -24,7 +24,7 @@ fix constrain all manifoldforce sphere 5.0
 
 [Description:]
 
-This fix subtracts each time step from the force the component along the normal of the specified "manifold"_manifolds.html.
+This fix subtracts each time step from the force the component along the normal of the specified "manifold"_Howto_manifold.html.
 This can be used in combination with "minimize"_minimize.html to remove overlap between particles while
 keeping them (roughly) constrained to the given manifold, e.g. to set up a run with "fix nve/manifold/rattle"_fix_nve_manifold_rattle.html.
 I have found that only {hftn} and {quickmin} with a very small time step perform adequately though.
diff --git a/doc/src/fix_property_atom.txt b/doc/src/fix_property_atom.txt
index 136ed6c15e..8a70cd8213 100644
--- a/doc/src/fix_property_atom.txt
+++ b/doc/src/fix_property_atom.txt
@@ -200,7 +200,8 @@ added classes.
 
 :line
 
-:link(isotopes) Example for using per-atom masses with TIP4P water to
+:link(isotopes)
+Example for using per-atom masses with TIP4P water to
 study isotope effects. When setting up simulations with the "TIP4P
 pair styles"_Howto_tip4p.html for water, you have to provide exactly
 one atom type each to identify the water oxygen and hydrogen
diff --git a/doc/src/fix_wall_reflect.txt b/doc/src/fix_wall_reflect.txt
index 78be84eb63..e35fac6eeb 100644
--- a/doc/src/fix_wall_reflect.txt
+++ b/doc/src/fix_wall_reflect.txt
@@ -51,7 +51,7 @@ corresponding component of its velocity is flipped.
 When used in conjunction with "fix nve"_fix_nve.html and "run_style
 verlet"_run_style.html, the resultant time-integration algorithm is
 equivalent to the primitive splitting algorithm (PSA) described by
-"Bond"_#Bond.  Because each reflection event divides
+"Bond"_#Bond1.  Because each reflection event divides
 the corresponding timestep asymmetrically, energy conservation is only
 satisfied to O(dt), rather than to O(dt^2) as it would be for
 velocity-Verlet integration without reflective walls.
@@ -179,5 +179,5 @@ error.
 
 :line
 
-:link(Bond)
+:link(Bond1)
 [(Bond)] Bond and Leimkuhler, SIAM J Sci Comput, 30, p 134 (2007).
-- 
GitLab