Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Formatting of Strings in Latex in whitespace insensitive environment / Z-Notation Schema

I'm using latex to model a few functions using Z-Notation, however, I'm having issues showing a string for output. In this reduced example code, the text in the quotes has a different formatting from what I would expect. What can I use to keep the formatting the text inside the quotes to be the same in the code snippet?

Edit: The overDraftMessage should be messageOutput, missed changing this when creating a reduced example.

\documentclass{article}
\usepackage{oz}   % oz or z-eves or fuzz styles

\begin{document}

\begin{schema}{function}
    messageOutput!: $STRING$ \\
\where
    messageOutput! = ''Output looks strange.'' \\
\end{schema}

\end{document}

enter image description here

like image 752
joe_04_04 Avatar asked Jan 20 '26 13:01

joe_04_04


1 Answers

Solution from @lburski works, but tilde is not for this purpose. It should be used to make hard space (non-breaking space). To write space in whitespace insensitive environments, you need to escape it - write backslash before every space: ''Output\ looks\ strange''.

like image 182
Andronicus Avatar answered Jan 23 '26 19:01

Andronicus



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!