uman >> uman > Preferences

Preferences

Setting of uman() configuration preferences

Description

In some extend, the behavior of uman can be changed through the Toolboxes/uman's section of the Scilab Preferences interactive interface.

User's uman() preferences are recorded in the file SCIHOME/uman_preferences.xml. This file is automatically created while running uman 3.0 or later for the first time.

Contents

Available parameters

Maximal lines width

Decimal integer in [50, 110]. Values out of this interval are ignored. Default value = 90.

When the console is wide, this parameter allows to restrict the display of help contents on shorter lines, in order to remain easily readable. If the console is narrower than the Maximal lines width, its actual width is considered.

Allow wide tables

When this option is checked, the display of wide tables can be done beyond the Maximal lines width, but still always within the console's width. Most often this does not downgrade the lines readability, since lines of text are anyway shorter in each cell of a multicolumn table.

Example with lines()(1)==109 and umanMaxLinesWidth==90 :

... without Allowing wide tables:

-->//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Console's edge >>>>|
--> uman EXTRACTBITS e
...
Examples
--------
 In the following table, we present the results obtained for the number 215
 according to several combinations of the parameters.

  ---------------------------------------------------------------------------------------
  | Input         | Bits to Extract| Number of Bits or| Treat Bit Field| Output         |
  |               |                | Index of Bit     | as an Integer  |                |
  | 11010111 (215)| Upper Half     | Ignored          | no             | 01100000 (208) |
  | 11010111 (215)| Upper Half     | Ignored          | yes            | 00001101 (13)  |
  | 11010111 (215)| Lower Half     | Ignored          | no             | 00000111 (7)   |
  | 11010111 (215)| Lower Half     | Ignored          | yes            | 00000111 (7)   |
  | 11010111 (215)| Range starting | 6                | no             | 11010100 (212) |
  |               | with MSB       |                  |                |                |
  | 11010111 (215)| Range starting | 6                | yes            | 00110101 (53)  |
  |               | with MSB       |                  |                |                |
  | 11010111 (215)| Range starting | 6                | no             | 00010111 (23)  |
  |               | with LSB       |                  |                |                |
  | 11010111 (215)| Range starting | 6                | yes            | 00010111 (23)  |
  |               | with LSB       |                  |                |                |
  | 11010111 (215)| Range of bits  | [ 2, 5 ]         | no             | 00010100 (20)  |
  | 11010111 (215)| Range of bits  | [ 2, 5 ]         | yes            | 00000101 (5)   |
  | 11010111 (-41)| Upper half     | Ignored          | no             | 11010000 (-48) |
  | 11010111 (-48)| Upper half     | Ignored          | yes            | 11111101 (-3)  |
  ---------------------------------------------------------------------------------------
 In the following diagram, two decimal digit numbers are coded on an only byte. The
 diagram decode the input to obtain two separate digits.
...

... "Allow wide tables" being checked:

--> uman EXTRACTBITS e
...
Examples
--------
 In the following table, we present the results obtained for the number 215
 according to several combinations of the parameters.

  -----------------------------------------------------------------------------------------------------------
  | Input         | Bits to Extract        | Number of Bits or Index| Treat Bit Field as an| Output         |
  |               |                        | of Bit                 | Integer              |                |
  | 11010111 (215)| Upper Half             | Ignored                | no                   | 01100000 (208) |
  | 11010111 (215)| Upper Half             | Ignored                | yes                  | 00001101 (13)  |
  | 11010111 (215)| Lower Half             | Ignored                | no                   | 00000111 (7)   |
  | 11010111 (215)| Lower Half             | Ignored                | yes                  | 00000111 (7)   |
  | 11010111 (215)| Range starting with MSB| 6                      | no                   | 11010100 (212) |
  | 11010111 (215)| Range starting with MSB| 6                      | yes                  | 00110101 (53)  |
  | 11010111 (215)| Range starting with LSB| 6                      | no                   | 00010111 (23)  |
  | 11010111 (215)| Range starting with LSB| 6                      | yes                  | 00010111 (23)  |
  | 11010111 (215)| Range of bits          | [ 2, 5 ]               | no                   | 00010100 (20)  |
  | 11010111 (215)| Range of bits          | [ 2, 5 ]               | yes                  | 00000101 (5)   |
  | 11010111 (-41)| Upper half             | Ignored                | no                   | 11010000 (-48) |
  | 11010111 (-48)| Upper half             | Ignored                | yes                  | 11111101 (-3)  |
  -----------------------------------------------------------------------------------------------------------
 In the following diagram, two decimal digit numbers are coded on an only byte. The
 diagram decode the input to obtain two separate digits.
...

Default calling options

The Path in the help, the Syntaxes, and the See also sections are always displayed by default.

This parameter allows to specify the calling options used as default ones, in place of the factory default values. To do so, just enter one or several character codes representing the chosen default options, as described in the main uman page: "p" for Parameters, "d" for the Descriptions, "e" for Examples, "h" for History, "l##" for a language, etc. Remarks:

  • When a default language "l##" is specified, it is safer to write it as the last option.
  • "w", "b" and "@" options are always ignored as default ones: The default uman mode is always the console mode.
  • "r" as default is ignored.
  • "j" can be set as default to feed opened diaries with every uman call.
  • "x" as default is possible. It could help new scilabers coming from Octave or Matlab. However, one must keep in mind that there is no explicit option able to cancel this default at calling time.
  • "s" as default is overriden by p | d | e | h | a | u at calling time.
  • "u" as default is overriden by p | d | e | h | a | s at calling time.

Syntaxes alignment

Sets the alignment mode of syntaxes displayed in console for a function. Proposed values: "" | "l" | "r" (default)

  • "" : Cancels any alignment:
    Scilab > Elementary Functions > size
    ....................................
    SYNTAXES
     sz = size(x)
     [n1, n2] = size(x)
     [n1, n2, n3, ...] = size(x)
     n = size(x, sel)
    

  • "l" : The LHS block of output arguments is Left-justified. All the "=" characters in expressions "LHS = fun(RHS)" and other "fun(RHS)" occurrences are aligned together.
    SYNTAXES
     sz                = size(x)
     [n1, n2]          = size(x)
     [n1, n2, n3, ...] = size(x)
     n                 = size(x, sel)
    

  • "r" (default): The LHS block of output arguments is Right-justified. All the "=" characters in expressions "LHS = fun(RHS)" and other "fun(RHS)" occurrences are aligned together.
    SYNTAXES
                    sz = size(x)
              [n1, n2] = size(x)
     [n1, n2, n3, ...] = size(x)
                     n = size(x, sel)
    

Hyperlinks display

Let's consider the <a href="http://scilab.org">Scilab website</a> hyperlink. The actual pointed URL can be local or remote. Then, uman() proposes 3 ways to display this in text mode:

  • content : Only Scilab website is displayed. Nothing indicates that there is an hyperlink.
  • [content] : [Scilab website] is displayed. We know that an hyperlink exists. We don't know what is its target. This is the default mode when installing uman().
  • content [url] : Scilab website [http://scilab.org] is displayed. When the content IS the URL, [url] = [http://scilab.org] is displayed only once.

Hyperlinks are never displayed
  • in tables of contents,
  • in summaries ("s" mode),
  • in the See also section, excepted for items that are external references/URL.
See also: compact list

When this option is unchecked, the See also list of items is displayed in the console in full-text mode, one row per item, with their short descriptions, as in the help browser. Example:

Option unchecked:

--> uman xmlGetValues
../..

See Also
--------
  setPreferencesValue — Set preferences value
  xmlXPath       — Make a XPath query on a XML document
  XML path language [https://www.w3.org/TR/1999/REC-xpath-19991116/]
  xmlRead        — Read a XML stream from a local or distant file
  xmlDelete      — Delete a XML document
  atomsGetConfig — Get ATOMS system parameters
  printsetupbox  — Display print dialog box.
  csvDefault     — Get or set defaults behavior for csv files.

Option checked (default setting):

See Also
--------
 setPreferencesValue | xmlXPath | XML path language [https://www.w3.org/TR/1999/REC-xpath-19991116/] |
 xmlRead | xmlDelete | atomsGetConfig | printsetupbox | csvDefault

Enable ASCII Styling

When this option is checked, parts of the original text that are in italic are displayed with "/.../", and are capitalized "TEXT IN BOLD" instead of bold.

This option is not recommended. Indeed, "/" may sometimes be confused with divisions, while changing the case of -- say -- variables names may also be confusing.
Show only unresolved bugs

This option modifies the behavior of uman .. b, when querying some information about declared bugs of the given item.

When the item is a native Scilab one, the query is sent to https://bugzilla.scilab.org. By default, all known bugs about the item are listed, including RESOLVED ones. Checking this option will query and list only still OPEN or REOPENED bug reports.

Paths of external modules out of ~/contrib

vector of texts. Each component indicates the path to a directory out of the default supported ones (SCI\contrib, SCIHOME\contrib), where uman must look for additional resources. These modules must be packaged according to minimal rules described in the page about uman Technical aspects.

Examples

Let's edit your uman preferences file (you must have used uman() at least once before):

scinotes SCIHOME/uman_preferences.xml readonly

Now open the preferences GUI at the uman section:

jdeff org.scilab.modules.preferences.XConfigManager openPreferences prefs; // once for all
prefs toolboxes/uman ;

Get the value of uman parameters from the configuration file, through a Scilab instruction:

xmlGetValues("//uman",["AlignSyntaxes"  "AllowWideTables" "AsciiStyling" ..
                      "DefaultCallOptions" "ListOnlyUnresolvedBugs" "MaxLinesWidth" ..
                      "PrintHyperlinks" "SeeAlsoOnlyKeywords"]', ..
             "SCIHOME/uman_preferences.xml")
--> xmlGetValues("//uman",["AlignSyntaxes"  "AllowWideTables" "AsciiStyling" ..
  >                       "DefaultCallOptions" "ListOnlyUnresolvedBugs" "MaxLinesWidth" ..
  >                       "PrintHyperlinks" "SeeAlsoOnlyKeywords"]', ..
  >              "SCIHOME/uman_preferences.xml")
 ans  =
!r          !
!unchecked  !
!unchecked  !
!p          !
!unchecked  !
!95.0       !
![content]  !
!checked    !

See Also

Author

Samuel GOUGEON

History

VersionDescription
3.0 2019-08-22
  • uman's Preferences interface introduced.

  • Preferences are now stored in the file SCIHOME/uman_preferences.xml. It is no longer possible to change them through the user's startup file scilab.ini

  • New uman parameters: Hyperlinks display, See also: compact list, Allow wide tables, Show only unresolved bugs

  • Creation of this page. Informations about uman configuration moved here from the main uman's page.

2.1 2016-10-30 : New configuration variable umanAlignSyntaxes.

<< disp_usage uman uman internals >>