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

[rebber] Avoid spoiler in spoiler ? #280

Closed
pierre-24 opened this issue Sep 5, 2018 · 4 comments · Fixed by #380
Closed

[rebber] Avoid spoiler in spoiler ? #280

pierre-24 opened this issue Sep 5, 2018 · 4 comments · Fixed by #380
Labels
semver/major This is a breaking change status/verified This has been checked by a maintainer type/bug This is a problem

Comments

@pierre-24
Copy link
Member

pierre-24 commented Sep 5, 2018

After a few hour of trying, I give up: unless someone is a true LaTeX wizard, it is impossible to support spoiler in spoiler (it is already difficult to support spoilers in the first place). The reason is that LaTeX looks for the first \end{Spoiler} it can found and stops after that (so imbricated spoilers generate weird behaviour). So, would it be possible to simply render the text of spoiler inside spoilers ?

Eventually, we could provide an environment SpoilerInSpoiler so that

[[s]]
| Another spoiler:
| [[s]]
| | And another:
| | [[s]]
| | | And that's it

could be rendered:

\begin{Spoiler}
Another spoiler:
\begin{SpoilerInSpoiler}
And another:
\begin{SpoilerInSpoiler}
% no need of a SpoilerInSpoilerInSpoiler, otherwise we'll need to define a lots of those!
And that's it
\end{SpoilerInSpoiler} 
\end{SpoilerInSpoiler}
\end{Spoiler}

So that we could provide a visual mark that it was a spoiler in a spoiler (in a spoiler). Otherwise, I definitely have no idea on how to support that :s

Many (many!) thanks in advance :)

@pierre-24 pierre-24 changed the title [rebber] Avoid spoiler in spoiler [rebber] Avoid spoiler in spoiler ? Sep 5, 2018
@vhf
Copy link
Contributor

vhf commented Sep 5, 2018

So, would it be possible to simply render the text of spoiler inside spoilers ?

We could, I'd like to see some support for this idea before implementing it though. Spoiler have a very special purpose and we need to make sure authors wouldn't mind this.

SpoilerInSpoiler

This shouldn't be harder to implement than the other idea.

@pierre-24
Copy link
Member Author

pierre-24 commented Sep 5, 2018

Just to say, this is the piece of markdown that gives me nightmares (from there):

[[secret]]
| On avait dit quoi :D ?
| 
| [[secret]]
| | 
| | * À l'initialisation, notre raquette doit avoir une référence vers l'écran, avoir une position de base, et charger son image.
| | 
| | * Quand elle se déplace, on doit être sûre qu'elle ne sort pas de l'écran (jouez avec la méthode `get_size()` de l'image de votre raquette), et la replacer en conséquent.
| | 
| | * Pour les collisions avec la balle, soit vous avez pris de l'avance et lu le chapitre sur les `Rect`, soit vous regardez si la balle est dans la raquette (donc fournissez la position de la balle, et sa taille), méthode un peu plus longue. :)
| | 
| | * Pour ce qui est de la méthode de rendu, c'est super simple, on ne vous en dit pas plus. ;)

I can understand the idea, but in this case, it would works as well if the second spoiler is not a spoiler in the PDF. But I'll launch a forum topic ;)

EDIT: done !

@StaloneLab StaloneLab added semver/major This is a breaking change status/waiting This needs more information type/bug This is a problem labels Feb 3, 2020
@StaloneLab
Copy link
Member

Any progress on this front? Are spoilers inside spoilers still a problem? Should we flatten them as it was suggested?

@pierre-24
Copy link
Member Author

Are spoilers inside spoilers still a problem?

Yep, and it will probably always be.

Should we flatten them as it was suggested?

... Yes please ;)

@StaloneLab StaloneLab added status/verified This has been checked by a maintainer and removed status/waiting This needs more information labels Feb 3, 2020
StaloneLab added a commit to StaloneLab/zmarkdown that referenced this issue Feb 6, 2020
@StaloneLab StaloneLab added this to the next release milestone Feb 6, 2020
StaloneLab added a commit to StaloneLab/zmarkdown that referenced this issue Feb 6, 2020
@StaloneLab StaloneLab linked a pull request Feb 6, 2020 that will close this issue
StaloneLab added a commit to StaloneLab/zmarkdown that referenced this issue Feb 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
semver/major This is a breaking change status/verified This has been checked by a maintainer type/bug This is a problem
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants