\only vs onlyenv, etc. #17
Replies: 4 comments 11 replies
-
Personally, I like the environments. For some reason the vast majority of current beamer users however seem to use the macros rather than environments, so this would affect a lot of users. So the question probably is: how compatible should xbeamer be? I would prefer just the environments (with the warning for old style macros) to get a solid base for xbeamer. |
Beta Was this translation helpful? Give feedback.
-
My gut reaction is that I don’t like the longer syntax. Is the catcode thing really such a big issue if the command versions are so popular? Is it really that awkward to have all the {zzzenv} versions?
Especially when the \only is being used with a short argument, having the full blown environment syntax creates a messier source… although I recognise that source prettiness is in the eye of the beholder :)
It’s a bit annoying that LaTeX has this longstanding conflation of environment vs command syntax. But I’m not sure that ditching commands entirely as a result is the best idea. If you can hack it so that the command and environment versions look the same but have different code paths, this might be a good place to start a new precedent.
But otherwise my 2c would be to err on the side of consistency and stick with the current syntax.
|
Beta Was this translation helpful? Give feedback.
-
I’m not convinced it’s not too late to change the way environments in LaTeXe work… e.g., \begin{foo} checks if \csname foo@***@***.***\endcsname exists and if so uses that definition, otherwise falls back to \foo. That kind of checking is trivially fast and ensures compatibility since the definition of \foo itself doesn’t need to change.
With the intention that this is to streamline definitions where different code paths are needed for commands vs environments (because catcodes), or \alert{…} conceptually is the same as \begin{alert}…\end{alert} but they are not strictly the same thing, or where it’s not sensible to have both commands defined (e.g. \begin{LaTeX}\end{LaTeX} is obviously useless…). This is the wrong place to talk about it I guess, but would it make sense to think about introducing it?
Looking back into the long history of LaTeX development, I would be surprised if there is such a thing as “too late” to introduce something new :)
|
Beta Was this translation helpful? Give feedback.
-
I can't say I've ever used the environment versions of \tikzset{%
alt/.code args={<#1>#2#3}{%
\alt<#1>{\pgfkeysalso{#2}}{\pgfkeysalso{#3}}
},
} This gets used in |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
In
beamer
, we have both command and env. versions of all of the 'overlay' functions. I wonder if it might be better only to have these as environments - would simplify the naming, and whilst it's a bit longer to writethan
\only<+->{some content}
if avoids catcode, etc., issues plus the awkward naming problem. We likely could cover the existing
beamer
model by checking\@currenv
at the start of each command - so if they are used 'old style' would issue a warning.Thoughts?
Beta Was this translation helpful? Give feedback.
All reactions