Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

MPR#7551: manual, make final ";;" potentially optional in caml_example#1194

Merged
gasche merged 3 commits intoocaml:trunkfromOctachron:tune_caml_example
Jun 7, 2017

Conversation

Octachron
Copy link
Member

MPR#7551:
This PR makes it possible to omit the final;; in a caml_example environment.
By default, this final;; is still mandatory and a new command line option-implicit-stop makes it optional globally.

This global setting can be overrided locally by adding an optional argument to the environment:

  • [toplevel] makes the final;; mandatory
  • [verbatim] makes it optional

This new optional argument must precedes the expected status argument:

\begin{caml_example*}[verbatim][error]1 + 2.\end{caml_example}

The tutorial part of the manual is configured to use the globally mandatory;; mode for the sake of consistency whereas the language extension section uses the new optional;; mode.

This commit makes it possible to omit the final ";;" in a caml_exampleenvironment.By default, this final ";;" is still mandatory. A new command lineoption "-implicit-stop" makes it optional globally.This global setting can be overrided locally by adding an optionalargument to the environment:* [toplevel] makes the ";;" mandatory* [verbatim] makes it optionalThe tutorial part of the manual is configured to use the mandatory ";;"mode globally for the sake of consistency whereas the language extensionsection uses the new optional ";;" mode.
@gasche
Copy link
Member

gasche commentedJun 7, 2017
edited
Loading

I appreciate you going the extra mile for convenience, but I don't like the idea that the same usage of the environment will have different default behaviors in different parts of the manual. We save 10 characters each time, but at the cost of auto-discoverability of behavior -- think of beginners that just jump in the.etex file and play around from what is already there. Could you disable that part and we would just use[verbatim] and[toplevel] each time? (You could fail if no such argument is provided.)

@mshinwellmshinwell changed the titleMPR#7551: manual, make final ";;" potentiallt optional in caml_exampleMPR#7551: manual, make final ";;" potentially optional in caml_exampleJun 7, 2017
@Octachron
Copy link
MemberAuthor

Disabling the difference of behaviors is quite straightforward. I am not sure how it implies a need for explicitness of the mode: we could also default to the current behavior. Nevertheless, being explicit would probably be better in a future where the two modes are rendered differently. So it might be better to make[optional|vebatim] non optional (and transform them to {optional|verbatim} to follow latex conventions).

@Octachron
Copy link
MemberAuthor

I went ahead and madetoplevel|verbatim a non-optional argument of thecaml_example environment.

@gasche
Copy link
Member

This is great, thanks! I'll wait for the CI results, but then you or I could merge.

@gaschegasche merged commitf4d9001 intoocaml:trunkJun 7, 2017
@gasche
Copy link
Member

Merged. Thanks for the reactivity. Now we can resume business onMPR#7551.

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers
No reviews
Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

2 participants
@Octachron@gasche

[8]ページ先頭

©2009-2025 Movatter.jp