Am 14.07.2011 14:26, schrieb Marcus Kriele:

I am proposing something like this:

Style Sol
LabelString "Sol [label of Prob]"
LabelFont
Color Blue
EndFont
End

You are right, a counter is senseless, since it is the number of the prob. I changed the label now to "# [number of Prob]" since it is actually the number of the Prob not its label.
I also improved the description how to use problem, prob, solution and sol in 
the template files.

This label is ugly but gives the user a hint what to do. I chose the color blue 
to indicate that
this label is different from the actual output.

This is not necessary. Before LyX was able to display the number also within LyX, we used a normal "#" to indicate that in the output will be a number. Colored labels indicate that they are only hints what to do and don't appear in the output. But in this case you get a number in the output.

Ideally, one would replace "[label of Prob]" by the
actual counter of the problem but I could not do this.

This is not possible. Implementing such a feature in LyX would require a lot of work (the prob is in a subdocument of a master file and the sol too, moreover th3ey are in different chapter with different styles, that's why also LaTeX needs several runs to get the number). So I don't think that it is worth it.

In addition, if the solutions are
written in the same order as the problems then in LyX it appears that each 
solution references the
correct problem. However, the output gives question marks as the references are 
not given
explicitly.

I don't get them with the template files. How can I get them?
I have attached an example.

This is because you didn't use the argument. The Sol style required an optional argument (the argument is not optional as the nae says, but in case of Sol mandatory). But I described that in the template files.

regards Uwe

Reply via email to