diff --git a/doc/guide/appendices/cli-v1vsv2.xml b/doc/guide/appendices/cli-v1vsv2.xml index 1429e529f..99d2e1b27 100644 --- a/doc/guide/appendices/cli-v1vsv2.xml +++ b/doc/guide/appendices/cli-v1vsv2.xml @@ -26,7 +26,7 @@

- Example of version 1 project manifest + Example of version 1 project manifest - Example of version 2 project manifest + Example of version 2 project manifest - Simplified project manifest in version 2 format + Simplified project manifest in version 2 format Configuration is achieved via a hidden file at the top of your home directory, namely .aspell.conf. A Mac will try to keep you away from hidden files, which are the ones whose name begins with a period. Let SublimeText give you an assist here. In we show a first run at a useful configuration file. You definitely want to add the SGML filter, since this is what tells Aspell that you are working on XML filesSGML is the precursor of XML., so that all element names, attributes, etc. will not be checked. The remainder is a suggested list of elements to skip. Suggestions for additions are welcome here.

- Aspell Configuration File + Aspell Configuration File diff --git a/doc/guide/author/processing.xml b/doc/guide/author/processing.xml index c46aa4112..ade0f5635 100644 --- a/doc/guide/author/processing.xml +++ b/doc/guide/author/processing.xml @@ -377,7 +377,7 @@

- Example of a very simple project manifest. + Example of a very simple project manifest. - Example of version 2 executables file + Example of version 2 executables file \\s. Use \amp to mark the alignm ]]> - Possible structures for using mathcmp within a test. The de-expression would be replaced by any valid construction as described for the setup. + Possible structures for using <tag>mathcmp</tag> within a <tag>test</tag>. The <tag>de-expression</tag> would be replaced by any valid construction as described for the <tag>setup</tag>.

Compound logical structures are created using the logic element in the place of a comparison. To specify which operation is being used, the op attribute is set to one of op="and", op="or", or op="not". The operations are considered n-ary, meaning that the contents should be one or more comparison elements, which might include additional logic. The op="and" will evaluate as true when all of the children comparisons evaluate as true. The op="or" will evaluate as true when at least one of the children comparisons evaluates as true. The op="not" is technically implemented as the negation of op="and", and so will evaluate as true when at least one of the children comparisons evaluates as false. In the absence of any logic, there is always an implicit op="and" so that any sequence of comparisons within a single test, all comparisons are required to evaluate as true.

@@ -3442,7 +3442,7 @@ displayed line, and there are no \\s. Use \amp to mark the alignm

A console is a transcript of an interactive session in a terminal or console at a command-line. It is a sequence of the following elements, in this order, possibly repeated many times as a group: input, and output. The output is optional. The content of these two elements is treated as verbatim text (see ), subject to all the exceptions for exceptional characters (see ). A prompt attribute on the input can be supplied to provide a system prompt distinct from the actual commands. The default prompt is a dollar sign followed by a space. If it is more convenient prompt may be supplied on the console, to be used in each enclosed input. If you do not want any prompts at all, just use an empty value for prompt.

-

A program or console may be wrapped in a listing, see . This will behave similar to a figure, with the caption displayed below, and a number assigned. So, in particular, if your program or console is important enough to cross-reference, it is an enclosing listing that serves as the target.

+

A program or console may be wrapped in a listing, see . This will behave similar to a figure, with the title displayed above, and a number assigned. So, in particular, if your program or console is important enough to cross-reference, it is an enclosing listing that serves as the target.

The language attribute may be used to get some degree of language-specific syntax highlighting and/or interactive behavior. We will eventually provide a table of attribute values here. They are always lowercase, and a good first guess is likely to succeed.

@@ -3921,7 +3921,7 @@ displayed line, and there are no \\s. Use \amp to mark the alignm
Program Listings -

A listing is really a specialized type of figure, whose purpose is to hold computer code. Just like a figure, it has a caption and title which behave identically. However, the enclosed planar content is limited to a program or console (see ).

+

A listing is really a specialized type of figure, whose purpose is to hold computer code. It has an optional title which is rendered above the listing. However, the enclosed planar content is limited to a program or console (see ).

diff --git a/doc/guide/basics/basics-part.xml b/doc/guide/basics/basics-part.xml index 0408332b5..f03e3a98c 100644 --- a/doc/guide/basics/basics-part.xml +++ b/doc/guide/basics/basics-part.xml @@ -80,7 +80,7 @@

- Some basic content of a paragraph + Some basic content of a paragraph p code for code forp @@ -114,7 +114,7 @@

- The general outline of a section as a model division + The general outline of a section as a model division section code for code forsection @@ -138,7 +138,7 @@

- A section with subsections. + A <tag>section</tag> with <tag>subsection</tag>s. section code for code forsection subsection code for @@ -240,7 +240,7 @@

- Displayed equations + Displayed equations code fordisplayed equation equationdisplayed code for code forme @@ -262,7 +262,7 @@

- Aligned equations + Aligned equations code foraligned equations equationaligned code for code formd @@ -325,7 +325,7 @@

- An ordered list + An ordered list listordered code for ordered list code for code forordered list @@ -356,7 +356,7 @@

- An unordered list + An unordered list listunordered code for unordered list code for code forunordered list @@ -409,7 +409,7 @@

- A theorem + A theorem theorem code for code fortheorem-like elements (algorithm, claim, corollary, fact, identity, lemma, proposition, theorem) theorem-like elements (algorithm, claim, corollary, fact, identity, lemma, proposition, theorem) code for @@ -457,7 +457,7 @@

- A definition with notation + A definition with notation definition code for code fordefinition notation (to be included in a notation list) code for @@ -519,7 +519,7 @@ - A simple example + A simple example example-like elements (example, problem, question)unstructured code for exampleunstructured code for code forexampleunstructured @@ -544,7 +544,7 @@

- A structured example + A structured example examplestructured code for code forexamplestructured code forexample-like elements (example, problem, question) @@ -585,7 +585,7 @@

- An axiom + An axiom axiom code for code foraxiom-like elements (assumption, axiom, conjecture, heuristic, hypothesis, principle) axiom-like elements (assumption, axiom, conjecture, heuristic, hypothesis, principle) code for @@ -626,7 +626,7 @@

- A remark + A remark remark code for code forremark-like elements (convention, insight, note, observation, remark, warning) remark-like elements (convention, insight, note, observation, remark, warning) code for @@ -661,7 +661,7 @@

- A project + A project project code for code forproject-like elements (activity, exploration, investigation, project) @@ -708,7 +708,7 @@

- An exercise + An exercise exercise code for inline exercise code for code forexerciseinline @@ -751,7 +751,7 @@ such an exercise.

- An exercise with tasks + An exercise with tasks exercisewith task code for code for - Using an exercisegroup. + Using an <tag>exercisegroup</tag>. exercisegroup code for code forexercisegroup @@ -882,7 +882,7 @@

- Structure of reading-questions. + Structure of <tag>reading-questions</tag>. reading-questions code for code forreading-questions @@ -944,7 +944,7 @@

- Structure of worksheet. + Structure of <tag>worksheet</tag>. worksheet code for code forworksheet @@ -980,7 +980,7 @@

- A porism generated using algorithm and rename + A porism generated using <tag>algorithm</tag> and <tag>rename</tag> @@ -1061,7 +1061,7 @@ so that's a good option when vector graphic formats like SVG and PDF are not available or appropriate.

- Code to include an image without a number or caption + Code to include an image without a number or caption image code for code forimage descriptionof image @@ -1108,7 +1108,7 @@ the figure but is displayed below the figure's content.

- Code to include a figure + Code to include a figure figure code for code forfigure captionof figure @@ -1156,7 +1156,7 @@

- Code to place things side by side + Code to place things side by side sidebyside code for code forsidebyside figureinside sidebyside @@ -1176,7 +1176,7 @@ - A few more bells and whistles for sidebyside + A few more bells and whistles for <tag>sidebyside</tag> sidebyside code for code forsidebyside figurecontaining sidebyside @@ -1199,7 +1199,7 @@

- Use of sbsgroup + Use of <tag>sbsgroup</tag> sbsgroup code for code forsbsgroup @@ -1271,7 +1271,7 @@ - How to use latex-image to invoke TikZ + How to use <tag>latex-image</tag> to invoke TikZ latex-image code for code forlatex-image TikZinside latex-image @@ -1344,7 +1344,7 @@ Similar to , provides a table tag and a tabular tag. The tabular tag is used for producing the array of data, while the table tag provides the number and title.

- Code to produce a table + Code to produce a table table code for code fortable titleof table @@ -1415,7 +1415,7 @@

- SageMath cell + SageMath cell sage code for code forsage @@ -1448,7 +1448,7 @@

- sageplot to produce a graphic + <tag>sageplot</tag> to produce a graphic sageplot code for code forsageplot @@ -1585,7 +1585,7 @@

- A sample aside + A sample <tag>aside</tag> aside code for code foraside @@ -1677,7 +1677,7 @@

- A sample blockquote + A sample <tag>blockquote</tag> blockquote code for code forblockquote diff --git a/doc/guide/introduction/start-here.xml b/doc/guide/introduction/start-here.xml index 171e99602..b6226735b 100644 --- a/doc/guide/introduction/start-here.xml +++ b/doc/guide/introduction/start-here.xml @@ -95,7 +95,7 @@

The hierarchical nature of XML is perfect to capture the hierarchical nature of a scholarly document. Consider the start of a document shown in .

- Source of a simple book project. + Source of a simple <pretext /> book project. . - An interactive Python program, using Runestone + An interactive Python program, using <pubtitle>Runestone</pubtitle> print("Hello, World!") @@ -9151,7 +9151,7 @@ along with MathBook XML. If not, see . - An interactive Python program without codelens. + An interactive Python program without codelens. print("Hello, World!") @@ -9168,7 +9168,7 @@ along with MathBook XML. If not, see . - A Python program, stepable with CodeLens + A Python program, stepable with CodeLens print('Hello, World!') @@ -10104,10 +10104,10 @@ along with MathBook XML. If not, see .

Note that the above examples all have slightly different widths (theser are very evident in print with the frames). As 2-D atomic objects, to place them in the narrative requires the layout features of a sidebyside element. Then width and/or margin attributes will influence the width of the panel.

-

A program may also be nested inside a listing, which behaves similar to a figure. You can provide a caption, and the listing will be numbered along with tables and figures. This then makes it possible to cross-reference the listing, such as . It also removes the requirement of wrapping the program in a sidebyside. For technical reasons, the three examples above will not split across a page break in PDF output, but the placement inside a listing will allow splits, as you should see in at least one example following.

+

A program may also be nested inside a listing, which behaves similar to a figure. You can provide a title, and the listing will be numbered along with tables and figures. This then makes it possible to cross-reference the listing, such as . It also removes the requirement of wrapping the program in a sidebyside. For technical reasons, the three examples above will not split across a page break in PDF output, but the placement inside a listing will allow splits, as you should see in at least one example following.

- C Version of Hello, World! + C Version of <q>Hello, World!</q> /* Hello World program */ @@ -10125,7 +10125,7 @@ along with MathBook XML. If not, see .

A program may include line numbers.

- A static Java program with line numbers + A static Java program with line numbers import javax.swing.JFrame; //Importing class JFrame @@ -10147,7 +10147,7 @@ along with MathBook XML. If not, see .

A program may also include highlighted lines.

- A static Java program with line numbers + A static Java program with line numbers import javax.swing.JFrame; //Importing class JFrame @@ -10209,7 +10209,7 @@ along with MathBook XML. If not, see .

A specialized version of a program listing is an interactive command/response session at a command-line, where differing fonts are used to differentiate the system prompt, the user's commands, and the system's reaction. A console session may be used by itself inside a sidebyside, or it can be wrapped in a listing to get a number and a caption. As elsewhere, you will need to escape ampersands and angle brackets (such as if you have a command using redirection), using &amp;, &lt;, and &gt; in your source.

- Console Session: int and float + Console Session: <c>int</c> and <c>float</c> gcc -Wall -o intAndFloat intAndFloat.c ./intAndFloat @@ -10234,7 +10234,7 @@ along with MathBook XML. If not, see .

If your console input exceeds more than one line, you can author it across several lines and your choice of line breaks will be reflected in the rendering. You can decide to indent lines after the first one for clarity, if desired. You can also decide if your audience needs line-continuation characters or not.

- Console Session: int and float (multi-line input) + Console Session: <c>int</c> and <c>float</c> (multi-line input) gcc -Wall @@ -10253,7 +10253,7 @@ along with MathBook XML. If not, see .

The next listing is just absurdity, to check various characters from that are otherwise employed by the code supporting consoles, and some Latin-1 characters. We test each in a prompt, input, and output. We use (* and *) as sequences used to escape embedded commands, so we test those also.

- Console Session: problematic characters + Console Session: problematic <latex /> characters A backslash \ here A backslash \ here @@ -10284,7 +10284,7 @@ along with MathBook XML. If not, see .

We conclude this section with a longer example of a program listing, an assembly language program from Bob Plantz, included to test a listing breaking across pages in PDF output.

- A longer program listing + A longer program listing @ structPass2.s @@ -11992,7 +11992,7 @@ along with MathBook XML. If not, see . A listing and a list - A statistical computation + A statistical computation n_loops <- 10 @@ -12403,7 +12403,7 @@ along with MathBook XML. If not, see .
  • inside a sidebyside, with size and layout configured, and inside a figure
  • inside a sidebyside, with size and layout configured, with each inside a listing, earning different numbers
  • -
  • inside a figure inside a sidebyside inside a listing, with size and layout configured, with a number and caption, but now sub-numbered ((a), (b), (c),).
  • +
  • inside a figure inside a sidebyside inside a listing, with size and layout configured, with a number and title, but now sub-numbered ((a), (b), (c),).
  • Examples of each, and more.

    Programs can be realized in many forms, and can come from a variety of sources. See for tests of some of that variety. Here we are testing placement within surroundings and testing the schema for location. But we do have two videos in each test, one provided as a local file and one embedded from a service.

    @@ -12490,10 +12490,10 @@ along with MathBook XML. If not, see . -

    Two listing, with caption, and no layout control.

    +

    Two listing, with title, and no layout control.

    - Hello, World! in C + Hello, World! in C /* Hello World program */ @@ -12509,7 +12509,7 @@ along with MathBook XML. If not, see . - A console session on a Raspberry Pi + A console session on a Raspberry Pi gcc -Wall -o intAndFloat intAndFloat.c ./intAndFloat @@ -12523,7 +12523,7 @@ along with MathBook XML. If not, see .

    Same two listing, but now with layout control on the program and console.

    - Hello, World! in C + Hello, World! in C /* Hello World program */ @@ -12539,7 +12539,7 @@ along with MathBook XML. If not, see . - A console session on a Raspberry Pi + A console session on a Raspberry Pi gcc -Wall -o intAndFloat intAndFloat.c ./intAndFloat @@ -12631,7 +12631,7 @@ along with MathBook XML. If not, see . - Hello! + Hello! /* Hello World program */ @@ -12646,7 +12646,7 @@ along with MathBook XML. If not, see . - Raspberry Pi + Raspberry Pi gcc -Wall -o intAndFloat intAndFloat.c ./intAndFloat @@ -12658,14 +12658,14 @@ along with MathBook XML. If not, see . -

    And again, the two-panel sidebyside of listing, but now inside a figure that has a number and a caption. And then the listing are sub-numbered as (a) and (b).

    +

    And again, the two-panel sidebyside of listing, but now inside a figure that has a number and a title. And then the listing are sub-numbered as (a) and (b).

    Two Code Listings - Hello! + Hello! /* Hello World program */ @@ -12680,7 +12680,7 @@ along with MathBook XML. If not, see . - Raspberry Pi + Raspberry Pi gcc -Wall -o intAndFloat intAndFloat.c ./intAndFloat diff --git a/examples/sample-book/rune.xml b/examples/sample-book/rune.xml index 9348ec2b4..a8e9441a9 100644 --- a/examples/sample-book/rune.xml +++ b/examples/sample-book/rune.xml @@ -38,7 +38,7 @@ along with MathBook XML. If not, see .

    Programs in supported languages are made interactive in HTML, on request.

    - An interactive Python program, using Runestone + An interactive Python program, using <pubtitle>Runestone</pubtitle> print("Hello, World!") @@ -50,7 +50,7 @@ along with MathBook XML. If not, see .

    - An interactive Python program, using Runestone + An interactive Python program, using <pubtitle>Runestone</pubtitle> print("Hello, World!") @@ -61,7 +61,7 @@ along with MathBook XML. If not, see .

    A C program will only be interactive if hosted on a Runestone server.

    - An C program, interactive on a Runestone server + An C program, interactive on a <pubtitle>Runestone</pubtitle> server #include <stdio.h> @@ -78,7 +78,7 @@ along with MathBook XML. If not, see . Informal Java <q>Hello, World</q> - A Java program, interactive on a Runestone server + A Java program, interactive on a <pubtitle>Runestone</pubtitle> server "hi" in Java @@ -101,7 +101,7 @@ along with MathBook XML. If not, see .

    Javascript programs are made interactive in HTML, on request.

    - An interactive JavaScript program, using Runestone + An interactive JavaScript program, using <pubtitle>Runestone</pubtitle> document.write('Hello, world!'); @@ -112,7 +112,7 @@ along with MathBook XML. If not, see .

    A program is not interactive, by default, no matter where it is hosted.

    - A static Java program + A static Java program import javax.swing.JFrame; //Importing class JFrame @@ -134,7 +134,7 @@ along with MathBook XML. If not, see .

    An Octave program will only be interactive if hosted on a Runestone server. Octave is meant to be a drop-in replacement for Matlab.

    - A simple Octave program + A simple Octave program x = 2 + 2 @@ -146,7 +146,7 @@ along with MathBook XML. If not, see .

    A language not supported by Runestone Services will be rendered static.

    - A Pascal program that cannot be interactive on Runestone + A Pascal program that cannot be interactive on Runestone program HelloWorld; @@ -162,7 +162,7 @@ along with MathBook XML. If not, see .

    If you examine the source, you will also notice the program lacks a language attribute. It is relying on the docinfo/programs/@language value that is in bookinfo.xml. If present, that attribute will be used for any programs or Runestone interactives that lack a language.

    - A Python program that defines some statistics + A Python program that defines some statistics loan_amount = [1250.0, 500.0, 1450.0, 200.0, 700.0, 100.0, 250.0, 225.0, 1200.0, 150.0, 600.0, 300.0, 700.0, 125.0, 650.0, 175.0, 1800.0, 1525.0, 575.0, 700.0, 1450.0, 400.0, 200.0, 1000.0, 350.0] @@ -180,7 +180,7 @@ along with MathBook XML. If not, see . Informal Java <q>Hello, World</q>, with flags - A Java program, interactive on a Runestone server, with compiler and linker flags + A Java program, interactive on a <pubtitle>Runestone</pubtitle> server, with compiler and linker flags "hi" in Java @@ -288,7 +288,7 @@ along with MathBook XML. If not, see .

    CodeLens is an interactive tool for following program execution, much like a debugger, without the ability to influence flow control or variable values. For use without a server, traces must be computed beforehand. First, we have some trivial programs, to provide minimal testing.

    - A Python program, stepable with CodeLens + A Python program, stepable with CodeLens print('Hello, World!') @@ -297,7 +297,7 @@ along with MathBook XML. If not, see . - An C program, stepable with CodeLens + An C program, stepable with CodeLens #include <stdio.h> @@ -311,7 +311,7 @@ along with MathBook XML. If not, see . - A Java program, stepable with CodeLens + A Java program, stepable with CodeLens public class HelloWorld { @@ -326,7 +326,7 @@ along with MathBook XML. If not, see .

    Now some moderately more complicated programs to find teh prime numbers less than 20. We do not vouch for the quality of these, or even their correctness!

    - Sieve of Eratosthenes, Java + <url href="https://www.tutorialspoint.com/python-program-for-sieve-of-eratosthenes" visual="www.tutorialspoint.com/python-program-for-sieve-of-eratosthenes">Sieve of Eratosthenes</url>, Java . - Sieve of Eratosthenes, C++ + <url href="https://www.tutorialspoint.com/cplusplus-program-to-implement-sieve-of-eratosthenes-to-generate-prime-numbers-between-given-range" visual="www.tutorialspoint.com/cplusplus-program-to-implement-sieve-of-eratosthenes-to-generate-prime-numbers-between-given-range">Sieve of Eratosthenes</url>, C++ @@ -380,7 +380,7 @@ along with MathBook XML. If not, see . - Sieve of Eratosthenes, Java + <url href="https://www.tutorialspoint.com/Sieve-of-Eratosthenes-in-java" visual="www.tutorialspoint.com/Sieve-of-Eratosthenes-in-java">Sieve of Eratosthenes</url>, Java