29881 |
like most Calc commands, but rather in regular editing buffers that |
like most Calc commands, but rather in regular editing buffers that |
29882 |
are visiting your own files. |
are visiting your own files. |
29883 |
|
|
29884 |
|
Calc will try to guess an appropriate language based on the major mode |
29885 |
|
of the editing buffer. (@xref{Language Modes}.) If the current buffer is |
29886 |
|
in @code{latex-mode}, for example, Calc will set its language to La@TeX{}. |
29887 |
|
Similarly, Calc will use @TeX{} language for @code{tex-mode}, |
29888 |
|
@code{plain-tex-mode} and @code{context-mode}, C language for |
29889 |
|
@code{c-mode} and @code{c++-mode}, FORTRAN language for |
29890 |
|
@code{fortran-mode} and @code{f90-mode}, Pascal for @code{pascal-mode}, |
29891 |
|
and eqn for @code{nroff-mode}. These can be overridden with Calc's mode |
29892 |
|
changing commands (@pxref{Mode Settings in Embedded Mode}). If no |
29893 |
|
suitable language is available, Calc will continue with its current language. |
29894 |
|
|
29895 |
Calc normally scans backward and forward in the buffer for the |
Calc normally scans backward and forward in the buffer for the |
29896 |
nearest opening and closing @dfn{formula delimiters}. The simplest |
nearest opening and closing @dfn{formula delimiters}. The simplest |
29897 |
delimiters are blank lines. Other delimiters that Embedded mode |
delimiters are blank lines. Other delimiters that Embedded mode |
29933 |
|
|
29934 |
When you enable Embedded mode for a formula, Calc reads the text |
When you enable Embedded mode for a formula, Calc reads the text |
29935 |
between the delimiters and tries to interpret it as a Calc formula. |
between the delimiters and tries to interpret it as a Calc formula. |
29936 |
It's best if the current Calc language mode is correct for the |
Calc can generally identify @TeX{} formulas and |
|
formula, but Calc can generally identify @TeX{} formulas and |
|
29937 |
Big-style formulas even if the language mode is wrong. If Calc |
Big-style formulas even if the language mode is wrong. If Calc |
29938 |
can't make sense of the formula, it beeps and refuses to enter |
can't make sense of the formula, it beeps and refuses to enter |
29939 |
Embedded mode. But if the current language is wrong, Calc can |
Embedded mode. But if the current language is wrong, Calc can |
30044 |
it is parsed according to the current language mode. |
it is parsed according to the current language mode. |
30045 |
|
|
30046 |
Note that Calc does not change the current language mode according |
Note that Calc does not change the current language mode according |
30047 |
to what it finds. Even though it can read a La@TeX{} formula when |
the formula it reads in. Even though it can read a La@TeX{} formula when |
30048 |
not in La@TeX{} mode, it will immediately rewrite this formula using |
not in La@TeX{} mode, it will immediately rewrite this formula using |
30049 |
whatever language mode is in effect. You must then type @kbd{d L} |
whatever language mode is in effect. |
|
to switch Calc permanently into La@TeX{} mode if that is what you |
|
|
desire. |
|
30050 |
|
|
30051 |
@tex |
@tex |
30052 |
\bigskip |
\bigskip |
30449 |
@section Mode Settings in Embedded Mode |
@section Mode Settings in Embedded Mode |
30450 |
|
|
30451 |
@noindent |
@noindent |
30452 |
|
The mode settings can be changed while Calc is in embedded mode, but |
30453 |
|
will revert to their original values when embedded mode is ended |
30454 |
|
(except for the modes changed while the mode-setting mode was |
30455 |
|
@code{Save}). |
30456 |
|
|
30457 |
Embedded mode has a rather complicated mechanism for handling mode |
Embedded mode has a rather complicated mechanism for handling mode |
30458 |
settings in Embedded formulas. It is possible to put annotations |
settings in Embedded formulas. It is possible to put annotations |
30459 |
in the file that specify mode settings either global to the entire |
in the file that specify mode settings either global to the entire |