Skip to content

Commit 75fa0fd

Browse files
committed
using the :kbd: role in the documentation (for Tab and other keys)
1 parent 54cd6fe commit 75fa0fd

File tree

28 files changed

+74
-72
lines changed

28 files changed

+74
-72
lines changed

src/doc/en/developer/coding_basics.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ In particular,
4444

4545
- Use 4 spaces for indentation levels. Do not use tabs as they can
4646
result in indentation confusion. Most editors have a feature that
47-
will insert 4 spaces when the tab key is hit. Also, many editors
47+
will insert 4 spaces when the :kbd:`Tab` key is hit. Also, many editors
4848
will automatically search/replace leading tabs with 4 spaces.
4949

5050
- Whitespace before and after assignment and binary operator of the

src/doc/en/faq/faq-usage.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -229,9 +229,9 @@ Can I do X in Sage?
229229
"""""""""""""""""""
230230

231231
You are encouraged to use Sage's tab autocompletion. Just type a few
232-
characters, hit the tab key, and see if the command you want appears
232+
characters, hit the :kbd:`Tab` key, and see if the command you want appears
233233
in the list of tab autocompletion. If you have a command called
234-
``mycmd``, then type ``mycmd.`` and hit the tab key to get a list of
234+
``mycmd``, then type ``mycmd.`` and hit the :kbd:`Tab` key to get a list of
235235
functionalities that are supported by that command. To read the
236236
documentation of ``mycmd``, type ``mycmd?`` and press the enter key to
237237
read the documentation for that command. Similarly, type ``mycmd??``

src/doc/en/prep/Intro-Tutorial.rst

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -365,7 +365,7 @@ Here's an example.
365365

366366
- Still, it seems reasonable that the command might start with ``pl``.
367367

368-
- Then one can type ``pl`` in an input cell, and then press the tab key
368+
- Then one can type ``pl`` in an input cell, and then press the :kdb:`Tab` key
369369
to see all the commands that start with the letters ``pl``.
370370

371371
Try tabbing after the ``pl`` in the following cell to see all the
@@ -379,7 +379,7 @@ commands that start with the letters ``pl``. You should see that
379379
sage: pl
380380

381381
To pick one, just click on it; to stop viewing them, press the
382-
Escape/esc key.
382+
:kbd:`Escape` key.
383383

384384
You can also use this to see what you can do to an expression or
385385
mathematical object.
@@ -399,15 +399,15 @@ defined.
399399

400400
sage: f(x)=x^2
401401

402-
Now put your cursor after the period and press your tab key.
402+
Now put your cursor after the period and press your :kbd:`Tab` key.
403403

404404
.. skip
405405
406406
::
407407

408408
sage: f.
409409

410-
Again, Escape should remove the list.
410+
Again, :kbd:`Escape` should remove the list.
411411

412412
One of the things in that list above was ``integrate``. Let's try it.
413413

@@ -437,7 +437,7 @@ that can illustrate how to use the function.
437437
- Press tab *or* evaluate to see the documentation.
438438

439439
To see how this help works, move your cursor after the question mark
440-
below and press tab.
440+
below and press :kbd:`Tab`.
441441

442442
.. skip
443443
@@ -450,7 +450,7 @@ not just ``f.integrate()``. (After all, the latter could be ambiguous
450450
if several variables had already been defined).
451451

452452
To stop viewing the documentation after pressing tab, you can press the
453-
Escape key, just like with the completion of options.
453+
:kbd:`Escape` key, just like with the completion of options.
454454

455455
If you would like the documentation to be visible longer\-term, you can
456456
*evaluate* a command with the question mark (like below) to access the

src/doc/en/thematic_tutorials/group_theory.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -318,7 +318,7 @@ since `\sigma` is an odd permutation.
318318
Many more available functions that can be applied to a permutation can
319319
be found via "tab-completion." With ``sigma`` defined as an element
320320
of a permutation group, in a Sage cell, type ``sigma.`` (Note the
321-
"``.``") and then press the tab key. You will get a list of available
321+
"``.``") and then press the :kbd:`Tab` key. You will get a list of available
322322
functions (you may need to scroll down to see the whole list).
323323
Experiment and explore! It is what Sage is all about. You really
324324
cannot break anything.
@@ -359,7 +359,7 @@ and then a variety of functions become available.
359359

360360
After trying the examples below, experiment with tab-completion.
361361
Having defined ``H``, type ``H.`` (note the "``.``") and then press
362-
the tab key. You will get a list of available functions (you may need
362+
the :kbd:`Tab` key. You will get a list of available functions (you may need
363363
to scroll down to see the whole list). As before,
364364
*experiment and explore*---it is really hard to break anything.
365365

src/doc/en/tutorial/latex.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ Customizing LaTeX Generation
151151
There are several ways to customize the actual LaTeX code generated by
152152
the ``latex()`` command. In the notebook and at the Sage command-line
153153
there is a pre-defined object named ``latex`` which has several methods,
154-
which you can list by typing ``latex.``, followed by the tab key
154+
which you can list by typing ``latex.``, followed by the :kbd:`Tab` key
155155
(note the period).
156156

157157
A good example is the ``latex.matrix_delimiters`` method. It can be

src/doc/en/tutorial/tour_help.rst

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -94,12 +94,11 @@ question mark:
9494
[6 3 5 1 7 2 8 9 4]
9595
[4 9 1 8 5 6 7 2 3]
9696

97-
Sage also provides 'Tab completion': type the first few letters of
98-
a function and then hit the tab key. For example, if you type ``ta``
99-
followed by ``TAB``, Sage will print
100-
``tachyon, tan, tanh,
101-
taylor``. This provides a good way to find
102-
the names of functions and other structures in Sage.
97+
Sage also provides 'Tab completion': type the first few letters of a
98+
function and then hit the :kbd:`Tab` key. For example, if you type
99+
``ta`` followed by :kbd:`Tab`, Sage will print ``tachyon, tan, tanh,
100+
taylor``. This provides a good way to find the names of functions and
101+
other structures in Sage.
103102

104103

105104
.. _section-functions:

src/doc/ja/tutorial/latex.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ LaTeXコード生成のカスタマイズ
124124
.. There are several ways to customize the actual LaTeX code generated by
125125
.. the ``latex()`` command. In the notebook and at the Sage command-line
126126
.. there is a pre-defined object named ``latex`` which has several methods,
127-
.. which you can list by typing ``latex.``, followed by the tab key
127+
.. which you can list by typing ``latex.``, followed by the :kbd:`Tab` key
128128
.. (note the period).
129129
130130
ここでは ``latex.matrix_delimiters`` メソッドに注目してみよう.

src/sage/algebras/catalog.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
easy way to discover and quickly create the algebras that are available
77
(as listed here).
88
9-
Let ``<tab>`` indicate pressing the tab key. So begin by typing
9+
Let ``<tab>`` indicate pressing the :kbd:`Tab` key. So begin by typing
1010
``algebras.<tab>`` to the see the currently implemented named algebras.
1111
1212
- :class:`algebras.AlternatingCentralExtensionQuantumOnsager

src/sage/combinat/path_tableaux/catalog.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
object is an easy way to discover and quickly create the path tableaux that
77
are available (as listed here).
88
9-
Let ``<tab>`` indicate pressing the tab key. So begin by typing
9+
Let ``<tab>`` indicate pressing the :kbd:`Tab` key. So begin by typing
1010
``path_tableaux.<tab>`` to the see the currently implemented path tableaux.
1111
1212
- :class:`~sage.combinat.path_tableaux.path_tableau.CylindricalDiagram`

src/sage/combinat/words/word.py

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -283,7 +283,7 @@ class FiniteWord_list(WordDatatype_list, FiniteWord_class):
283283
r"""
284284
Finite word represented by a Python list.
285285
286-
For any word `w`, type ``w.`` and hit TAB key to see the list of
286+
For any word `w`, type ``w.`` and hit :kbd:`Tab` key to see the list of
287287
functions defined on `w`.
288288
289289
EXAMPLES::
@@ -304,7 +304,7 @@ class FiniteWord_str(WordDatatype_str, FiniteWord_class):
304304
r"""
305305
Finite word represented by a Python str.
306306
307-
For such word `w`, type ``w.`` and hit TAB key to see the list of
307+
For such word `w`, type ``w.`` and hit :kbd:`Tab` key to see the list of
308308
functions defined on `w`.
309309
310310
EXAMPLES::
@@ -325,7 +325,7 @@ class FiniteWord_tuple(WordDatatype_tuple, FiniteWord_class):
325325
r"""
326326
Finite word represented by a Python tuple.
327327
328-
For such word `w`, type ``w.`` and hit TAB key to see the list of
328+
For such word `w`, type ``w.`` and hit :kbd:`Tab` key to see the list of
329329
functions defined on `w`.
330330
331331
EXAMPLES::
@@ -346,7 +346,7 @@ class FiniteWord_iter_with_caching(WordDatatype_iter_with_caching, FiniteWord_cl
346346
r"""
347347
Finite word represented by an iterator (with caching).
348348
349-
For such word `w`, type ``w.`` and hit TAB key to see the list of
349+
For such word `w`, type ``w.`` and hit :kbd:`Tab` key to see the list of
350350
functions defined on `w`.
351351
352352
EXAMPLES::
@@ -372,7 +372,7 @@ class FiniteWord_iter(WordDatatype_iter, FiniteWord_class):
372372
r"""
373373
Finite word represented by an iterator.
374374
375-
For such word `w`, type ``w.`` and hit TAB key to see the list of
375+
For such word `w`, type ``w.`` and hit :kbd:`Tab` key to see the list of
376376
functions defined on `w`.
377377
378378
EXAMPLES::
@@ -400,7 +400,7 @@ class FiniteWord_callable_with_caching(WordDatatype_callable_with_caching, Finit
400400
r"""
401401
Finite word represented by a callable (with caching).
402402
403-
For such word `w`, type ``w.`` and hit TAB key to see the list of
403+
For such word `w`, type ``w.`` and hit :kbd:`Tab` key to see the list of
404404
functions defined on `w`.
405405
406406
EXAMPLES::
@@ -451,7 +451,7 @@ class FiniteWord_callable(WordDatatype_callable, FiniteWord_class):
451451
r"""
452452
Finite word represented by a callable.
453453
454-
For such word `w`, type ``w.`` and hit TAB key to see the list of
454+
For such word `w`, type ``w.`` and hit :kbd:`Tab` key to see the list of
455455
functions defined on `w`.
456456
457457
EXAMPLES::
@@ -482,7 +482,7 @@ class InfiniteWord_iter_with_caching(WordDatatype_iter_with_caching, InfiniteWor
482482
r"""
483483
Infinite word represented by an iterable (with caching).
484484
485-
For such word `w`, type ``w.`` and hit TAB key to see the list of
485+
For such word `w`, type ``w.`` and hit :kbd:`Tab` key to see the list of
486486
functions defined on `w`.
487487
488488
Infinite words behave like a Python list : they can be sliced using
@@ -520,7 +520,7 @@ class InfiniteWord_iter(WordDatatype_iter, InfiniteWord_class):
520520
r"""
521521
Infinite word represented by an iterable.
522522
523-
For such word `w`, type ``w.`` and hit TAB key to see the list of
523+
For such word `w`, type ``w.`` and hit :kbd:`Tab` key to see the list of
524524
functions defined on `w`.
525525
526526
Infinite words behave like a Python list : they can be sliced using
@@ -558,7 +558,7 @@ class InfiniteWord_callable_with_caching(WordDatatype_callable_with_caching, Inf
558558
r"""
559559
Infinite word represented by a callable (with caching).
560560
561-
For such word `w`, type ``w.`` and hit TAB key to see the list of
561+
For such word `w`, type ``w.`` and hit :kbd:`Tab` key to see the list of
562562
functions defined on `w`.
563563
564564
Infinite words behave like a Python list : they can be sliced using
@@ -588,7 +588,7 @@ class InfiniteWord_callable(WordDatatype_callable, InfiniteWord_class):
588588
r"""
589589
Infinite word represented by a callable.
590590
591-
For such word `w`, type ``w.`` and hit TAB key to see the list of
591+
For such word `w`, type ``w.`` and hit :kbd:`Tab` key to see the list of
592592
functions defined on `w`.
593593
594594
Infinite words behave like a Python list : they can be sliced using
@@ -622,7 +622,7 @@ class Word_iter_with_caching(WordDatatype_iter_with_caching, Word_class):
622622
Word of unknown length (finite or infinite) represented by an
623623
iterable (with caching).
624624
625-
For such word `w`, type ``w.`` and hit TAB key to see the list of
625+
For such word `w`, type ``w.`` and hit :kbd:`Tab` key to see the list of
626626
functions defined on `w`.
627627
628628
Words behave like a Python list : they can be sliced using
@@ -658,7 +658,7 @@ class Word_iter(WordDatatype_iter, Word_class):
658658
Word of unknown length (finite or infinite) represented by an
659659
iterable.
660660
661-
For such word `w`, type ``w.`` and hit TAB key to see the list of
661+
For such word `w`, type ``w.`` and hit :kbd:`Tab` key to see the list of
662662
functions defined on `w`.
663663
664664
Words behave like a Python list : they can be sliced using
@@ -694,7 +694,7 @@ class FiniteWord_morphic(WordDatatype_morphic, FiniteWord_class):
694694
r"""
695695
Finite morphic word.
696696
697-
For such word `w`, type ``w.`` and hit TAB key to see the list of
697+
For such word `w`, type ``w.`` and hit :kbd:`Tab` key to see the list of
698698
functions defined on `w`.
699699
700700
EXAMPLES::
@@ -721,7 +721,7 @@ class InfiniteWord_morphic(WordDatatype_morphic, InfiniteWord_class):
721721
r"""
722722
Morphic word of infinite length.
723723
724-
For such word `w`, type ``w.`` and hit TAB key to see the list of
724+
For such word `w`, type ``w.`` and hit :kbd:`Tab` key to see the list of
725725
functions defined on `w`.
726726
727727
Infinite words behave like a Python list : they can be sliced using

0 commit comments

Comments
 (0)