-
-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How could we improve the syntax? #22
Comments
The white arrow is just a hack to draw a 2-cell. The problem here is just that at the moment there is no way to draw parallel arrows avoiding repetition. Consider the diagram
it would be way better (=more readable) to write
is very similar to
|
This is a less hackish 2-cell, perhaps: \tikzset{2>/.style={-Implies, shorten >=2pt, shorten <=3pt, double equal sign distance}}
\begin{kodi}
\obj { A & B \\ };
\mor[below]:[bend right] A h:-> B;
\mor[above]:[bend left] A k:-> B;
\mor h \sigma:2> k;
\end{kodi}
Yup. I'm not sure about the Currently,
In fact, whitespace is relegated to the role of separator between an object reference (e.g. This means that there would be no ambiguity in expressions like \mor A -> -> -> B;
\mor A -> ->,red [->,light blue] B;
\mor A ["f"]["g", below]:[bend right, ->] ["h"]["i", above]:[bend left, ->] B;
\mor A ["h", below]:[bend right, ->]
["k", above]:[bend left, ->] B; Ignoring the fact that parsing is harder without it, does the |
Nevermind. Not using any kind of separator is ambiguous: \mor S [...][...]:[->] T;
% The first block could be both a label and an arrow:
\mor S ["f"]["g"]:[->] T;
\mor S [->] ["g"]:[->] T; I wouldn't mind a simple comma to concatenate arrows: \mor S f:-> T g:->, h:-> U i:->, j:->, k:-> V; That would entail losing the chance to use non delimited arrow option lists: \mor S f:->,red T;
would be interpreted as
\mor S ["f"]:[->] []:[red] T;
instead of
\mor S ["f"]:[->,red] T; That might be for the best, though: I think it
The initial use case would look like \mor A ["h",below]:[bend right,->],
["k", above]:[bend left,->],
["\sigma\Uparrow",black,mid]:[->,white] B; What do you think, user zero? @tetrapharmakon |
@tetrapharmakon suggests that repetitions quickly make code less readable
and suggests the haskellism
I feel a better (=clearer, less rigid) working alternative would be
and an hypothetical improvement (more TikZ-like than the haskellism) could be
Thus some questions are raised:
The text was updated successfully, but these errors were encountered: