Environment and command not identical?

25 views
Skip to first unread message

Jonas

unread,
Feb 8, 2023, 12:27:33 PM2/8/23
to SILE Users
Hello!

I am eager to learn SILE, but it seems like I have a conceptual misunderstanding already quite at the beginning: The SILE book says "there is absolutely no difference between a command and an environment". However, when I use them in the following MWE, I do get a different behavior with respect to line breaking (break after command, but not after environment).

Did I misunderstand the phrase "absolutely no difference", or is there somthing going on in my few lines that I am not aware of?

Thank you very much!
Jonas


\begin[papersize=A5]{document}

If there is really absolutely no difference

\font[size=8pt]{between a command}


\begin[size=5pt]{font}
  and an environment,
\end{font}

why does the line break after the command, but not after the environment?
\end{document}

Didier Willis

unread,
Feb 9, 2023, 3:35:43 PM2/9/23
to SILE Users
Greetings Jonas

The "absolutely no difference" is a bit misleading (currently)...

What is true is that \command[options]{xxx} and \begin[options]{command}xxx\end{command} both invoke the exact same processing code (note, however, how careful I am here, without blank lines, spaces, etc. differences _inside_ the content).

There's however, as far as I can say, some debate on how spaces and blank lines _around_ these structures have to be considered (i.e. ignored or not). Some issues have already been logged, e.g.
(and probably a few others)

So in your own example, the blank line after the command is considered to mark a paragraph, the blank line after the environment is not...
It's not really a difference between commands and environments, but in the way the (current) parser interprets the surrounding content...

It doesn't seem a consensus emerged yet, regarding the expectations...
I, too, find the current situation quite disconcerting... It's quite error-prone, at best.

Didier.

Jonas

unread,
Feb 10, 2023, 1:43:02 AM2/10/23
to SILE Users
Hello Didier,

thank you very much for the quick reply! I believe I understand the problem and I agree: the current situation is a bit confusing (at least to new users).
The main reason for using an environment (for me) would be to make the structure clearer, but keeping it in a single line does not really do that.

Jonas
Reply all
Reply to author
Forward
0 new messages