On Mar 17, 9:59 am, Martin Albrecht <m...@informatik.uni-bremen.de> wrote: > On Tuesday 17 March 2009, Carl Witty wrote: > > > On Tue, Mar 17, 2009 at 9:35 AM, John H Palmieri <jhpalmier...@gmail.com> > wrote: > > > Do we have any conventions or standards for the use of LaTeX in > > > docstrings? Consider this: > > > > r""" > > > This computes the integral homology `H_d(X, ZZ)` of `X` in > > > dimension `d`. > > > """ > > > > versus > > > > r""" > > > This computes the integral homology `H_d(X, \mathbb{Z})` of `X` in > > > dimension `d`. > > > """ > > > > (or with \mathbf{Z} instead of \mathbb{Z}). The first of these looks > > > better with interactive help ('sage: homology?'), and the second looks > > > better in the reference manual. So which should we use? Should we > > > have a style guide which settles such issues? > > > My vote would be for `H_d(X, \ZZ)` (for easier typing), combined with > > some sort of LaTeX-to-plain-text processing to change \ZZ to Z or ZZ > > (I'm not sure which). (We have some LaTeX-to-plain-text already, > > although it could definitely be improved.)
I think that from the command line, backslashes are dropped already, so \ZZ turns into ZZ. > > Can't we just define a global macro like before? > > e.g. \newcommands{\ZZ}{\mathbb{ZZ}} For this case, probably yes (although I'm not sure how to do it), but the general question remains: when writing docstrings, how do we manage the balance between correct LaTeX for the reference manual with more readable pseudo-LaTeX for interactive help? John --~--~---------~--~----~------------~-------~--~----~ To post to this group, send email to sage-devel@googlegroups.com To unsubscribe from this group, send email to sage-devel-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-devel URLs: http://www.sagemath.org -~----------~----~----~----~------~----~------~--~---