Skip to content

Commit a6c1e4c

Browse files
author
Release Manager
committed
Trac #34629: Use the kbd role in the doc
in particular to represent the Tab key as can be seen already near the end of https://doc.sagemath.org/html/en/installation/launching.html URL: https://trac.sagemath.org/34629 Reported by: chapoton Ticket author(s): Frédéric Chapoton, ​John Palmieri Reviewer(s): Kwankyu Lee
2 parents 986fc05 + a0e1d3b commit a6c1e4c

40 files changed

+107
-102
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: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -229,13 +229,13 @@ 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
236-
documentation of ``mycmd``, type ``mycmd?`` and press the enter key to
236+
documentation of ``mycmd``, type ``mycmd?`` and press the :kbd:`Enter` key to
237237
read the documentation for that command. Similarly, type ``mycmd??``
238-
and hit the enter key to get the source code of that command. You are
238+
and hit the :kbd:`Enter` key to get the source code of that command. You are
239239
also encouraged to search through the source code and documentation of
240240
the Sage library. To search through the source code of the Sage
241241
library, use the command ``search_src("<search-keyword>")`` where you

src/doc/en/prep/Advanced-2DPlotting.rst

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,10 @@ following sections:
3939

4040
- :ref:`Saving`
4141

42-
This tutorial assumes that one is familiar with the basics of Sage, such
43-
as evaluating a cell by clicking the "evaluate" link, or by pressing
44-
Shift\-Enter (hold down Shift while pressing the Enter key).
42+
This tutorial assumes that one is familiar with the basics of Sage,
43+
such as evaluating a cell by clicking the "evaluate" link, or by
44+
pressing :kbd:`Shift` + :kbd:`Enter` (hold down :kbd:`Shift` while
45+
pressing the :kbd:`Enter` key).
4546

4647
.. fixme - if log plots are in by the time this makes it in, put them in!!!
4748

src/doc/en/prep/Calculus.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,10 @@ the United States; the final section is a checkpoint of sorts.
2929
The tutorial assumes that one is familiar with the basics of Sage, such
3030
as outlined in the previous tutorials.
3131

32-
For a refresher, make sure the syntax below for defining a function and
33-
getting a value makes sense; then evaluate the cell by clicking the
34-
"evaluate" link, or by pressing Shift\-Enter (hold down Shift while
35-
pressing the Enter key).
32+
For a refresher, make sure the syntax below for defining a function
33+
and getting a value makes sense; then evaluate the cell by clicking
34+
the "evaluate" link, or by pressing :kbd:`Shift` + :kbd:`Enter` (hold
35+
down :kbd:`Shift` while pressing the :kbd:`Enter` key).
3636

3737
::
3838

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

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -75,8 +75,9 @@ To do math in a Jupyter cell, one must do two things.
7575
.. image:: media/RunCellIcon.png
7676
:align: center
7777

78-
Or one can use the keyboard shortcut of holding down the Shift key
79-
while you press the Enter key. We call this "Shift\-Enter".
78+
Or one can use the keyboard shortcut of holding down the :kbd:`Shift` key
79+
while you press the :kbd:`Enter` key.
80+
We call this :kbd:`Shift` + :kbd:`Enter`.
8081

8182
Sage prints out its response just below the cell (that's the ``4``
8283
below, so Sage confirms that :math:`2+2=4`). Note also that Sage has
@@ -365,7 +366,7 @@ Here's an example.
365366

366367
- Still, it seems reasonable that the command might start with ``pl``.
367368

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

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

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

384385
You can also use this to see what you can do to an expression or
385386
mathematical object.
@@ -399,15 +400,15 @@ defined.
399400

400401
sage: f(x)=x^2
401402

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

404405
.. skip
405406
406407
::
407408

408409
sage: f.
409410

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

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

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

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

442443
.. skip
443444
@@ -449,8 +450,8 @@ The examples illustrate that the syntax requires ``f.integrate(x)`` and
449450
not just ``f.integrate()``. (After all, the latter could be ambiguous
450451
if several variables had already been defined).
451452

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

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

src/doc/en/prep/Symbolics-and-Basic-Plotting.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,8 @@ and evaluation in Sage. We provide a (very) brief refresher.
2929
value makes sense.
3030

3131
#. Then evaluate the cell by clicking the "evaluate" link, or by
32-
pressing Shift\-Enter (hold down Shift while pressing the Enter key).
32+
pressing :kbd:`Shift` + :kbd:`Enter` (hold down :kbd:`Shift`
33+
while pressing the :kbd:`Enter` key).
3334

3435
::
3536

src/doc/en/thematic_tutorials/group_theory.rst

Lines changed: 3 additions & 3 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,13 +359,13 @@ 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

366366
Here is another couple of ways to experiment and explore. Find a
367367
function that looks interesting, say ``is_abelian()``. Type
368-
``H.is_abelian?`` (note the question mark) followed by the enter key.
368+
``H.is_abelian?`` (note the question mark) followed by the :kbd:`Enter` key.
369369
This will display a portion of the source code for the
370370
``is_abelian()`` function, describing the inputs and output, possibly
371371
illustrated with example uses.

src/doc/en/tutorial/interactive_shell.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -549,7 +549,7 @@ You can also use the following more concise notation:
549549
sage: V = QQ^3
550550

551551
Then it is easy to list all member functions for :math:`V` using tab
552-
completion. Just type ``V.``, then type the ``[tab key]`` key on your
552+
completion. Just type ``V.``, then type the :kbd:`Tab` key on your
553553
keyboard:
554554

555555
.. skip
@@ -567,7 +567,7 @@ keyboard:
567567
...
568568
V.zero_vector
569569

570-
If you type the first few letters of a function, then ``[tab key]``,
570+
If you type the first few letters of a function, then the :kbd:`Tab` key,
571571
you get only functions that begin as indicated.
572572

573573
.. skip

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:

0 commit comments

Comments
 (0)