4
$\begingroup$

I need to use symbols with suffixes in order to make my code readable in relation to the Eurocodes. To do this I use Symbolize from the Notation` package, but have noticed that the syntax colouring does not work on symbols created in this way. This makes checking the code more difficult. Is there a way of getting the syntax colouring to work or am I doing something wrong?

Here is a toy example which seems to work if you copy and paste and then change it to Standard Form (Control-Shift-N). Note the W is shown black whereas the subscript is shown in blue. All the other symbols are shown blue even after they are defined.

Symbolize[
ParsedBoxWrapper[
SubscriptBox["γ", "M0"]]];
Symbolize[
ParsedBoxWrapper[
SubscriptBox["M", 
RowBox[{"c", ".", "y", ".", "Rd"}]]]]; Symbolize[
ParsedBoxWrapper[
SubscriptBox["W", 
RowBox[{"el", ".", "y"}]]]];

Subscript[M, c.y.Rd] = 50;
Subscript[W, el.y] = 0.05;
Subscript[γ, M0] = 1.2;

σ = Subscript[M, c.y.Rd]/(Subscript[W, 
 el.y]/Subscript[γ, M0])

1199.9999999999998

Here is an image of what I mean

$\endgroup$
  • 4
    $\begingroup$ Can you please give a small toy example which someone can copy, paste and try? $\endgroup$ – halirutan Dec 14 '12 at 9:23
  • $\begingroup$ Here is a toy example. $\endgroup$ – Malcolm Dec 17 '12 at 9:10
  • $\begingroup$ Where? I cannot see that you edited your question or something like that. $\endgroup$ – halirutan Dec 17 '12 at 9:26
  • $\begingroup$ My apologies halirutan I wanted to paste in code but it closed the comment when I hit the return key. I have now done so in the question $\endgroup$ – Malcolm Dec 17 '12 at 9:28
  • $\begingroup$ To update your question is the right way! You code can not be evaluated. Please look at this answer to read how to post code here. $\endgroup$ – halirutan Dec 17 '12 at 9:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.