Skip to content

Commit

Permalink
Trac #16256: Reorganize the documentation indexes into src/sage/combinat
Browse files Browse the repository at this point in the history
== Goal: reorganize the documentation indexes into src/sage/combinat ==

- For example, the thematic index
  `src/doc/en/reference/combinat/crystals.rst` is now in:
  `src/sage/combinat/crystals/__init__.py` and is accessible through
  `sage.combinat.crystals`?

  (potential variant: put it in all.py)

- What's left in `doc/en/reference/combinat` can potentially be
generated automatically.
  This is not yet automatized; the content of module_list.rst still
needs to be updated by hand; see the instructions on top of the file.

- All p/cython files in `src/sage/combinat/` are now included in the
reference manual

- Improved thematic indexes

- New thematic indexes: algebraic_combinatorics, catalog_partitions,
  counting, enumerated_sets

- Fixed some documentation syntax glitches here and there

- Added the catalogs of permutation groups and matrix groups to the
  reference manual so that we can link to them. Fixed the doc title of
  the former.

- Added a back link from the doc of sage.dynamics

- Added (draft of) sage.combinat.quickref

This is a follow up to #16058.

End result browsable at ​http://sage.math.washington.edu/home/nthiery/sa
ge/src/doc/output/html/en/reference/combinat/index.html

Warning: see the note below about the current doc compilation glitch.

== Discussion ==

One might argue that this reorganization of the documentation is not
consistent with what's done elsewhere in the manual. Indeed. I believe
sage.combinat is a good spot to explore better ways to organize the
documentation. Here are the advantages of this new organization:

- It's more local:

  E.g. everything the developer has to look at or modify about
  `designs`, including the index, is in src/sage/combinat/design. This
  is simpler for newcomers and means, e. g., less chances to forget to
  update the index w.r.t. the code.

- It's more consistent with the hierarchical structure of modules. In
  particular, it's agnostic of how the reference manual is split into
  documents. This was not the case before: to split
  `sage/combinat/crystals` in its own document required to move the
  thematic index about crystals from `reference/combinat/` to
  `reference/combinat/crystals`. This will ease the job of #14582.

- It's more friendly to documentation lookup using introspection

- It's more automatic; there are less chances to forget adding a file
  in the documentation which hit us often in the past.

- It enforces including all files in the documentation.

- Writing the thematic indexes as plain lists (rather than toctrees)
  is more flexible:

  - one can e.g. choose to point to the main class in a file rather
    than the full file.

  - one can focus on the user feature and not reference technical
    modules (they appear in the full module list anyway)

  - one can point to related things elsewhere in the source code

== TODO ==

- Proof reading

- Checking that the links are functional

- Handle the various TODO's left in the indexes (typically about
  choosing the right entry points for each module)

  Postponed to a later ticket, since those are further enhancements
  not directly related to this ticket. It's just that, while browsing
  through the indexes suggested them to me.

- Finish automatizing the building of module_list.rst.

  Postponed to #17421

- Sphinx issue: deciding on how to link to classes/functions

  in the index we would want to have the title of the documentation of
  the class rather than the name of the class; or maybe both.

  For now, we stick to the class name for now until we find a good way
  to do this with Sphinx.

- Sphinx issue: how to crossrefs documents in the thematic tutorial.

  For now we use a workaround.

- Sphinx issue: homogeneous styles for the index links

  The style used by Sphinx depends on the type of the link; this makes
  the indexes look non homogeneous. See what we can do here. This is
  purely about style rather than content, hence postponed to a later
  ticket.

- Sphinx issue: latex support in `:ref:`

  When the title of a module contains some latex, it gets displayed
  properly in tocrefs, but not in `:ref`'s. We had a look with
  Florent, and fixing this would require some fiddling with Sphinx's
  internals (the latex chunks are already stripped away in the
  crossref database!). Hence postponed for later as fixing this won't
  require changing the documentation sources.

URL: http://trac.sagemath.org/16256
Reported by: nthiery
Ticket author(s): Nicolas M. Thiéry, Jean-Pierre Flori
Reviewer(s): Anne Schilling, Nathann Cohen
  • Loading branch information
Release Manager authored and vbraun committed Dec 11, 2014
2 parents bd0df0e + 823c116 commit 92940fa
Show file tree
Hide file tree
Showing 70 changed files with 1,268 additions and 723 deletions.
2 changes: 1 addition & 1 deletion src/doc/common/builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -974,7 +974,7 @@ def write_auto_rest_file(self, module_name):
# Don't doctest the autogenerated file.
outfile.write(".. nodoctest\n\n")
# Now write the actual content.
outfile.write(".. _%s:\n\n"%module_name)
outfile.write(".. _%s:\n\n"%(module_name.replace(".__init__","")))
outfile.write(title + '\n')
outfile.write('='*len(title) + "\n\n")
outfile.write('.. This file has been autogenerated.\n\n')
Expand Down
3 changes: 3 additions & 0 deletions src/doc/en/reference/algebras/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@ Algebras
sage/algebras/group_algebra_new

sage/algebras/iwahori_hecke_algebra
sage/algebras/iwahori_hecke_algebra
sage/algebras/nil_coxeter_algebra
sage/algebras/affine_nil_temperley_lieb

sage/algebras/hall_algebra

Expand Down
2 changes: 2 additions & 0 deletions src/doc/en/reference/coding/index.rst
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
.. _sage.coding:

Coding Theory
=============

Expand Down
17 changes: 0 additions & 17 deletions src/doc/en/reference/combinat/algebra.rst

This file was deleted.

9 changes: 0 additions & 9 deletions src/doc/en/reference/combinat/cluster_algebras.rst

This file was deleted.

38 changes: 0 additions & 38 deletions src/doc/en/reference/combinat/crystals.rst

This file was deleted.

42 changes: 0 additions & 42 deletions src/doc/en/reference/combinat/designs.rst

This file was deleted.

15 changes: 0 additions & 15 deletions src/doc/en/reference/combinat/developer.rst

This file was deleted.

204 changes: 4 additions & 200 deletions src/doc/en/reference/combinat/index.rst
Original file line number Diff line number Diff line change
@@ -1,212 +1,16 @@
Combinatorics
=============

**Algebra**

.. toctree::
:maxdepth: 1

cluster_algebras
algebra

**Backtracking solvers**

.. toctree::
:maxdepth: 1

sage/combinat/tiling
sage/combinat/dlx
sage/combinat/matrices/dlxcpp

**Combinatorial Objects**

.. toctree::
:maxdepth: 1

sage/combinat/alternating_sign_matrix
sage/combinat/composition
sage/combinat/core
designs
sage/combinat/knutson_tao_puzzles
sage/combinat/gelfand_tsetlin_patterns
sage/combinat/necklace
sage/combinat/non_decreasing_parking_function
sage/combinat/parking_functions
sage/combinat/perfect_matching
sage/combinat/six_vertex_model
sage/combinat/tamari_lattices
sage/combinat/interval_posets
sage/combinat/yang_baxter_graph

**Compositions**

.. toctree::
:maxdepth: 1

sage/combinat/composition_signed
sage/combinat/composition

**Counting**

.. toctree::
:maxdepth: 1

sage/combinat/sloane_functions
sage/databases/oeis
sage/combinat/expnums
sage/combinat/combinat
.. automodule:: sage.combinat


**Finite State Machines**
Comprehensive Module List
-------------------------

.. toctree::
:maxdepth: 1

sage/combinat/finite_state_machine
sage/combinat/finite_state_machine_generators

**Integer Lists/Matrices/Vectors**

.. toctree::
:maxdepth: 1

sage/combinat/integer_list
sage/combinat/integer_matrices
sage/combinat/integer_vector
sage/combinat/integer_vector_weighted

**Partitions**

.. toctree::
:maxdepth: 1

partitions
sage/combinat/partition
sage/combinat/partition_tuple
sage/combinat/set_partition_ordered
sage/combinat/set_partition
sage/combinat/skew_partition
sage/combinat/vector_partition

**Permutations**

.. toctree::
:maxdepth: 1

sage/combinat/permutation
sage/combinat/affine_permutation
sage/combinat/derangements
sage/combinat/integer_vectors_mod_permgroup
sage/combinat/enumeration_mod_permgroup

**Polynomials**

.. toctree::
:maxdepth: 1

sage/combinat/hall_polynomial
sage/combinat/kazhdan_lusztig

**Posets**

.. toctree::
:maxdepth: 1

posets

**q-analogues**

.. toctree::
:maxdepth: 1

sage/combinat/q_analogues
sage/combinat/q_bernoulli

**Sequences**

.. toctree::
:maxdepth: 1

sage/combinat/binary_recurrence_sequences
sage/combinat/debruijn_sequence
sage/combinat/degree_sequences

**Symmetric Functions**

.. toctree::
:maxdepth: 1

symmetric_functions
ncsf_qsym
ncsym

**Tableaux**

.. toctree::
:maxdepth: 1

tableaux
sage/combinat/rsk

**Trees**

.. toctree::
:maxdepth: 1

sage/combinat/abstract_tree
sage/combinat/ordered_tree
sage/combinat/binary_tree

**Word**

.. toctree::
:maxdepth: 1

words
sage/combinat/subword
sage/combinat/lyndon_word
sage/combinat/dyck_word

**Unsorted**

.. toctree::
:maxdepth: 1

sage/combinat/tutorial

sage/combinat/cartesian_product
sage/combinat/combination
sage/combinat/e_one_star
sage/combinat/finite_class
sage/combinat/matrices/hadamard_matrix
sage/combinat/restricted_growth
sage/combinat/graph_path
sage/combinat/matrices/latin
sage/combinat/sidon_sets
sage/combinat/similarity_class_type
sage/combinat/subset
sage/combinat/subsets_pairwise
sage/combinat/subsets_hereditary
sage/combinat/tuple
sage/combinat/gray_codes

root_systems
crystals
rigged_configurations
species

**Developer Tools**


.. toctree::
:maxdepth: 1

sage/combinat/shuffle
sage/combinat/dict_addition
sage/combinat/misc
sage/combinat/combinatorial_map

developer
module_list

.. include:: ../footer.txt

Loading

0 comments on commit 92940fa

Please sign in to comment.