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

Options to show/hide particular sections/environment types #27

Closed
mxdubois opened this issue Aug 6, 2014 · 7 comments
Closed

Options to show/hide particular sections/environment types #27

mxdubois opened this issue Aug 6, 2014 · 7 comments

Comments

@mxdubois
Copy link
Contributor

mxdubois commented Aug 6, 2014

What would be the most intuitive/flexible way to specify when a section/environment type should be shown or hidden?

The first thing that comes to my mind is adding a class directly to the environment. So if you wanted the type to show, it would be <section class="section"> and if you didn't want it to show, it would be <section class="section hide-type">. I like this because

  • it works with CSS the way CSS is designed to work
  • it gives you guys a lot of flexibility for showing or hiding types in different cases that might be hard to predict or account for from CSS
  • it keeps the css simple

But I want to hear from you guys about what will be intuitive for you.

@davidfarmer
Copy link
Contributor

I like the idea of adding a class to indicate that the type should be
hidden.

On Wed, 6 Aug 2014, Michael DuBois wrote:

What would be the most intuitive/flexible way to specify when a section/environment type should be shown or hidden?

The first thing that comes to my mind is adding a class directly to the environment. So if you wanted the type to show,
it would be

and if you didn't want it to show, it would be
.
I like this because

  • it works with CSS the way CSS is designed to work
  • it gives you guys a lot of flexibility for showing or hiding types in different cases that might be hard to predict
    or account for from CSS
  • it keeps the css simple

But I want to hear from you guys about what will be intuitive for you.


Reply to this email directly or view it onGitHub.[211500__eyJzY29wZSI6Ik5ld3NpZXM6QmVhY29uIiwiZXhwaXJlcyI6MTcyMjk4Nzg4NiwiZGF0YSI6eyJpZCI6MzkwMjc2NjV9fQ==--f381c0
38cf3823fad5e6996105406d3abb36cd37.gif]

@mxdubois
Copy link
Contributor Author

mxdubois commented Aug 7, 2014

K, shall I add a class for all three (i.e. hide-type, hide-codenumber, hide-title)?

And do you prefer that the class is added to the section/environment or to the heading itself?

@davidfarmer
Copy link
Contributor

Some people may want to suppress the word "Subsection" but not the word "Theorem"
(this is a plausible scenario). So probably we should do it per heading.

hide-title seems unlikely to be used, because the title is optional so why would you put one in and then hide it? The others are reasonable. And I won't object if you include hide-title for completeness.

But why have a specifically named hide-X instead of a class="hide" which lets you hide anything?

@mxdubois
Copy link
Contributor Author

mxdubois commented Aug 7, 2014

hide-title seems unlikely to be used, because the title is optional so why would you put one in and then hide it?

I've wondered the same thing about the section types to be honest. What was the reason for always including them in the HTML again? Screen readers? SEO?

Here are a couple of reasons a class like hide might not be a good idea:

  • it might not always work since some elements might have a display property set at a higher level of specificity.
    • For instance .chapter > .heading > .title { display: block } would override .hide { display:none }
  • a class like hide is kind of like the <b> tag. It's too general and too easy -- which is a dangerous combination. Things like that become the goto solution when there is a more semantic/purposeful/correct way to do the same thing. I'd hate to see it crop up all over the HTML markup.
  • restricting it to classes like hide-type makes the CSS a gatekeeper for what is allowed to be hidden and what is not (which is maybe a style concern?)... this may be a good thing or a bad thing.

I'll leave it to your judgement though.

@davidfarmer
Copy link
Contributor

I agree that .hide is not useful because it would get overwritten.

You want the word "Section" in the HTML for screen readers. And some people (like me,
in the context of a paper) want that word to appear visibly.

@rbeezer
Copy link

rbeezer commented Aug 7, 2014

FWIW, I have been showing/hiding these according to how LaTeX does it. (I think.) I'm fine with a .hide-X suite and I can toss them in as desired.

@mxdubois
Copy link
Contributor Author

This is in develop now. You will now have to add .hide-type, .hide-codenumber, or .hide-title to the .heading element, as desired.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants