We have predefined a set of LaTeX commands that simplify the definition of OCL (Object Constraint Language) expressions in LaTeX documents. By we I mean the SOM research group and, specially, my colleague Robert Clarisó
If you are interested, you can download:
- The LaTeX commands
- An example latex file to show how to use them.
- The generated pdf file to see the final results
ICREA Research Professor at Internet Interdisciplinary Institute (UOC). Leader of the SOM Research Lab focusing on the broad area of systems and software engineering. Home page.
Hi Jordi.
Useful macros! Thanks for sharing!
Have you considered using a monospaced font in order to improve the legibility of the OCL formulas?
Yes, I used to be a bit fussy (aka: pijotero o tiquismiquis in Spanish) when talking about typesetting in Tex/LaTeX!
}:)
Regards,
Pedro J. Molina
For those who want to try the monospaced font, just replace
\newcommand{\OCLtext}{} with \newcommand{\OCLtext}{\tt} in the OCLDefs file.
We use the monospaced font for the code excerpts in the paper, that’s why we don’t use it when writing OCL.
I know this is a very old post, but since I ran into it via google searching for “latex ocl”, I should mention that the listings CTAN package also supports OCL and also supports syntax highlighting:
http://ctan.org/pkg/listings