Skip to content
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

More stylistic updates to the manual for consistency #21463

Merged
merged 1 commit into from
Apr 21, 2017

Conversation

ararslan
Copy link
Member

In the same vein as #21456, my goal is to make the stylistic conventions in the manual consistent, e.g. by migrating to where and struct syntax, using the standard 4 spaces for indentation, etc.

CI skipped, remove from commit message when merging.

@ararslan ararslan added the docs This change adds or pertains to documentation label Apr 20, 2017
@@ -716,7 +716,7 @@ Julia sparse matrices have the type `SparseMatrixCSC{Tv,Ti}`, where `Tv` is the
values, and `Ti` is the integer type for storing column pointers and row indices.:

```julia
type SparseMatrixCSC{Tv,Ti<:Integer} <: AbstractSparseMatrix{Tv,Ti}
mutable struct SparseMatrixCSC{Tv,Ti<:Integer} <: AbstractSparseMatrix{Tv,Ti}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this one's actually not mutable any more

@ararslan ararslan force-pushed the aa/more-manual-consistency branch 2 times, most recently from 8fbbec9 to 53a935b Compare April 20, 2017 22:46
@@ -29,7 +29,7 @@ you can redefine types and constants. You can't import the type names into `Mai
to be able to redefine them there, but you can use the module name to resolve the scope. In other
words, while developing you might use a workflow something like this:

```
```julia
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is this necessary? Isn't this the default?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nope. The default is no syntax coloring. Adding julia highlights Julia keywords, etc.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is that true in Documenter?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes. If you look at this rendered in the docs as they stand (see https://docs.julialang.org/en/latest/manual/faq.html), the block has no color.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't we change the default for Documenter code blocks to Julia code instead of putting julia on blocks everywhere?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hm, didn't know you could do that. Then yeah, that's something to consider. In the meantime is this alright?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

guess that would be equivalent to treating docstrings as a julia specific markdown extension, which i guess we already do with even numbers of backticks using math mode. worth an issue at documenter for discussion maybe.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's a good idea. Regarding this PR, is there anything that should be changed, added, removed, etc, or is it okay as-is?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm, but no rush unless your next one will conflict. others may notice something I didn't​

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This PR is the last for the manual. Might go through the devdocs or something next, but nothing will conflict. I don't mean to rush, I just want to try to direct discussion back to the matter at hand. 😉

@@ -389,17 +389,17 @@ Note the somewhat surprising fact that `T` doesn't appear in the declaration of
that we'll return to in a moment. With this approach, one can write functions such as:

```jldoctest containers2
julia> function myfunc{T<:Integer, A<:AbstractArray}(c::MyContainer{T,A})
julia> function myfunc(c::MyContainer{T,A}) where {T<:Integer, A<:AbstractArray}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not do MyContainer{<:Integer, <:AbstractArray}?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good idea, I'll go with that. Thanks!

@ararslan ararslan force-pushed the aa/more-manual-consistency branch from 53a935b to 64fa673 Compare April 21, 2017 18:17
@ararslan ararslan merged commit 5444473 into master Apr 21, 2017
@ararslan ararslan deleted the aa/more-manual-consistency branch April 21, 2017 21:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs This change adds or pertains to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants