A Detailed Example

Here is an example of a school test that will be used to explain the main points of how to prepare a text to be submitted to the translator.

Normal text

If the text only has letters, digits and the usual punctuation marks there is no need for any special denotations. The following question

In a school 254 pupils are going for a group study visit. The buses available for transportation have 45 seats each. How many buses will be needed? Justify your answer.

can be given in this form directly to the translator.

Spaces and newlines

Sequences of space and/or tabulation characters are replaced by a single space, the same happening with a single newline. Two or more newlines indicate the beginning of a new paragraph. In the context of mathematical expressions all these characters are usually ignored as described below.

The question above can be given as

In a school     254 pupils are going for     a group study visit.
The buses     available for transportation have
   45 seats each.
How many buses will be needed?
Justify your answer.

or with more or less blanks and newlines (but without two or more newlines in sequence) that the result will be the same.

Paragraphs

In order to separate two questions or parts of a question it is possible to use one or more blank lines, meaning a change in paragraph:

Given the numbers 15, 27, 30, 38, 46, 120, 500 write those who are:

a) Divisible by 2

b) Divisible by 10

c) Divisible by 2 and by 5

Special characters

Some characters need a special treatment. The more frequent are:

All these characters, except the last, can be obtained in the final text if preceeded by \ (for instance, to have a %, type \%); for the exception, \ itself, the command $\backslash$ is used.

Therefore if the question is

Give in extension {divisors of 15} =

the input should be

Give in extension \{divisors of 15\} =

Commands

The translator accepts commands, with or without arguments, for different purposes, among which denoting symbols or graphical signs (e.g., Greek letters, or the fraction line), changing the text style (as italics), or control the format of the output. The large majority of command names start by \ and are followed by letters, usually in lowercase. Commands may have arguments, each one written within braces, an example being \frac{12}{5}.

The translator accepts some commands of its own, not expected to be defined in LaTeX, that stand for Braille symbols that computer keyboards may fail to produce, at least under some operating systems or their configurations. For instance, to translate (note the use of comma instead of decimal dot)

Joan bought a 1,200Kg chicken and 0,750Kg of pork chops, a kilo of pork being at 2,10€ and the kilo of chicken at 4,20€.

the Euro symbol should be replaced by a command:

Joan bought a 1,200Kg chicken and 0,750Kg of pork chops, a kilo of pork being at 2,10\euro{} and the kilo of chicken at 4,20\euro.

In case your keyboard generates this symbol, the translator should also accept it: please test!

Note that the command \euro has no arguments but writing \euro{} allows for

Mathematical expressions

For translating mathematical expressions correctly to Braille one must indicate to the translator where the expression begins and ends. As mentioned above in the list of special characters, the $ can, and will be used here for that.

There are translator commands for special symbols that stand for operators not always available in computer keyboards.

A case in point is when trying to translate

What represents the numeric expression 1,200×2,10+0,750×4,20?

The input to the translator should have a mathematical environment, delimited by $, in which the command \times stands for the traditional multiplication operator

What represents the numeric expression $1,200\times 2,10+0,750\times 4,20$?

Once again it may happen this symbol can be produced directly by the keyboard and accepted as such by the translator. However this will not be the case with symbols like the one for square root and commands must be used anyway.

One could expect the following to be a valid alternative to the previous text

What represents the numeric expression 1,200$\times$ 2,10+0,750$\times$ 4,20?

but, in fact, it is not: the output from the translator will be different (note the spaces before 2,10 and 4,20) and may even have a meaning different from the intended one. The reasons for this are, on the one hand, that spaces and newlines are ignored in expressions but not out of them, and, on the other hand, that Braille rules concerning the where and how a line can be ended are different for expressions and for normal text.

In conclusion, every expression must always be completely within a single mathematical environment, even (and necessarily!) when the mathematical symbols in it may be the same as normal punctuation marks. For instance, this rule makes it possible for the translator distinguish between the hyphen and the subtraction operator, that are the same in a computer keyboard, but correspond to different Braille symbols.

Spaces in expressions

As already mentioned space and other blank characters are almost always ignored by the translator when they occur in mathematical expressions. One exception is when they appear after the name of a command and act as a separator from the next character that otherwise would be taken as part of the name. For instance, a×b can be obtained by using $a\times b$ in the input text but without a space or newline after \times, as $a\timesb$, this would be interpreted as an a followed by the command \timesb (that is not predefined).

The following situations, $12 345$ and $a b$ are examples of the use of blanks between digits or letters. For letters this is acceptable only when before the space there is a command, as described above. In all other cases this use makes the translator stop the translation with an error.

To not limit what the translator can generate, it accepts two commands that produce a space between digits with two different purposes:

For instance, to have

In Portuguese one can write one thousand and twenty four like this 1.024, or this 1 024. And it is also usual to have a space in numbers with a fraction, like 2 3/4

the input to the translator should be

In Portuguese one can write one thousand and twenty four like this $1\sepmil024$, or this $1\sepmil024$. And it is also usual to have a space in numbers with a fraction, like $2\sepnum\frac{3}{4}$.

Note also that these commands for numbers must appear in an expression to avoid translation errors and because some commands, like \frac (for fraction), are only allowed in mathematical environments.

Profiting from this example, it should be added that the translator only generates the Braille notation for numerical fractions when the command \frac is used.

Style

While texts not in Braille may have a few different styles, like italics or boldface, in Braille it is only possible to change from the normal style to another one, and this not in expressions. Therefore the translator converts all style changes in the input to changes from the current Braille style to the other and ignores anything related to styles occurring in mathematical environments.

To have

A table has columns for Power, Base, and Exponent.

it is advisable to input

A table has columns for {\em Power}, {\em Base}, and {\em Exponent}.

or, using more modern LaTeX notation,

A table has columns for \textemph{Power}, \textemph{Base}, and \textemph{Exponent}.

The complete example

With what was presented above and a few other remarks that will appear below, it is now possible to understand how to get a Braille version of a test (actually used in a school) by using the translator. The original text is given and when some new special notation is needed, the translator input and an explanation will be inserted.

1. Joan bought a 1,200Kg chicken and 0,750Kg of pork chops, a kilo of pork being at 2,10€ and the kilo of chicken at 4,20€.

1.1 What represents the numeric expression 1,200×2,10+0,750×4,20?

1.2. How much did she pay?

1. Joan bought a 1,200Kg chicken and 0,750Kg of pork chops, a
   kilo of pork being at 2,10\euro{} and a kilo of chicken at
   4,20\euro.

1.1. What represents the numeric expression $1,200\times 2,10+0,750\times 4,20$?

1.2. How much did she pay?

As an alternative, if a keyboard that generates the Euro and the multiplication symbols is available, the input could be as follows (check the differences to the original text):

  1. Joan bought a 1,200Kg chicken and 0,750Kg of pork chops, a
  kilo of pork being at 2,10€ and a kilo of chicken at
  4,20€.

  1.1. What represents the numeric expression $1,200×2,10+0,750×4,20$?

  1.2. How much did she pay?

The translator was developed for Portuguese and deals with commas in numbers as a separator of the integer and fractional parts. The command \sepmil must be used in separating groups of 3 digits in large numbers and is translated as such to Braille; the use of dots for that would yield a wrong translation (as they would taken as punctuation marks) and so the translator will stop in error.

2. A lorry, that when empty weighs 2150Kg, was loaded with 59 boxes of 45Kg each. Will this lorry be allowed to cross a bridge that can only be used by vehicles weighing less than 5 metric tons?

3. A table has columns for Power, Base, Exponent, Reading and Expression. Fill the table cells that have ellipses (...).

The first line has power 73, base ..., exponent ..., reading ..., and expression 7×7×7 = 49×7 = 343

The second line has ellipses in the power, base, exponent and expression cells, and in that for reading Seven tenths squared.

  3. A table has columns for  {\em Power}, {\em Base}, {\em Exponent},
  {\em Reading} and {\em Expression}. Fill the table cells that have
  ellipses (...).

  The first line has power $7^3$, base ..., exponent ..., reading ...,
  and expression $7\times 7\times 7 = 49\times 7 = 343$

  The second line has ellipses in the power, base, exponent and
  expression cells, and in that for reading {\em Seven tenths squared}.

4. Oranges are in sale! In the Orchard Fruiterer 5kg are at 2,30€, in Lusitania 4Kg at 1,92€, and in Nova 3Kg at 1,41€. In which of these fruiterers the price of a kilo is cheapest?

  4. Oranges are in sale! At the Orchard Fruiterer 5kg are at 2,30\euro,
  at Lusitania 4Kg at 1,92\euro, and at Nova 3Kg at 1,41\euro. In which
  of these fruiterers the price of a kilo is cheapest?

5. In a school 254 pupils are going for a group study visit. The buses available for transportation have 45 seats each. How many buses will be needed? Justify your answer.

6. Give in extension {divisors of 15} =

  6. Give in extension \{divisors of 15\} =

As seen above, braces must be preceded by \.

7. Given the numbers 15, 27, 30, 38, 46, 120, 500, write those that are:

Divisible by 2

Divisible by 10

Divisible by 2 and by 5

8. Complete:

360:... = 36

... : 1000 = 6,5

7,03:... = 70,3

0.47:... = 47

  8. Complete:

  $360:... = 36$

  $... : 1000 = 6,5$

  $7,03:... = 70,3$

  $0.47:... = 47$

These expressions must be in mathematical environments, or the division operator : would be incorrectly translated as a punctuation mark, whose representation in Braille is different.

By the way, this symbol cannot be used in sets given intentionally with the meaning of such that because for this meaning the Braille representation is different from both the division operator and the punctuation mark. But the translator accepts the command \talque (tal que in Portuguese means such that). More details on the page on denotations for sets.

9. Mr. Albert shared out 52€ among his 4 grandsons. The eldest already had, in his wallet, 3€.

9.1. What represents the expression 3+52:4?

9.2. Find the amount the eldest has now.

10. Compute the values of the following expressions:

10.1. 6-6:(23-3×7)

10.2. (0,4×5+6)×2-32

  9. Mr. Albert shared out 52\euro{} among his 4 grandsons. The eldest
  already had, in his wallet, 3\euro.

  9.1. What represents the expression $3+52:4$?

  9.2. Find the amount the eldest has now.

  10. Compute the values of the following expressions:

  10.1. $6-6:(23-3\times 7)$

  10.2. $(0,4\times 5+6)\times 2-3^2$

The complete example may be copied from here and submitted to the translator.