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

remove all whitespace between the children of headings #12

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

remove all whitespace between the children of headings #12

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

Comments

@mxdubois
Copy link

mxdubois commented Aug 6, 2014

I'm doing the spacing for environment and section headings in the CSS, as mentioned in BooksHTML/mathbook-assets/issues/25. Part of it was broken before, but it's fixed now, so it will be important that you remove the whitespace from between the <span> elements so that the browser doesn't interpret it as a single space.

There are a couple of different ways to do this:

<span class="type">Proof</span><span class="codenumber">1.2.3</span><span class="title">Loch Ness Monster Proof</span>
<span class="type">Proof</span
><span class="codenumber">1.2.3</span
><span class="title">Loch Ness Monster Proof</span>
<span class="type">Proof</span><!-- no whitespace
--><span class="codenumber">1.2.3</span><!-- no whitespace
--><span class="title">Loch Ness Monster Proof</span>

There also might be some XSLT specific ways to handle whitespace. This looks promising.

@rbeezer
Copy link
Collaborator

rbeezer commented Aug 8, 2014

Yep, I can control whitespace pretty well now. I'll get 'er done soon.

@rbeezer
Copy link
Collaborator

rbeezer commented Aug 9, 2014

It was easy to do this, since I mostly introduced the spaces with xsl:text
/xsl:text, ie they were intentional.

Back on develop now, and it seems the majority of the headings are not getting
the spaces they need. Is this implemented yet?

On 08/06/2014 04:35 PM, Michael DuBois wrote:

I'm doing the spacing for environment and section headings in the CSS, as
mentioned in BooksHTML/mathbook-assets#25
BooksHTML/mathbook-assets#25. Part of it was broken
before, but it's fixed now, so it will be important that you remove the
whitespace from between the || elements so that the browser doesn't
interpret it as a single space.

There are a couple of different ways to do this:

Proof1.2.3Loch Ness Monster Proof

Proof</span

1.2.3</span
Loch Ness Monster Proof

Proof1.2.3Loch Ness Monster Proof

There also might be some XSLT specific ways to handle whitespace. This looks
promising
http://stackoverflow.com/questions/1468984/xslt-remove-whitespace-from-template.


Reply to this email directly or view it on GitHub
#12.

@davidfarmer
Copy link
Contributor

Not implemented yet: it is issue #26

On Fri, 8 Aug 2014, Rob Beezer wrote:

It was easy to do this, since I mostly introduced the spaces with xsl:text
/xsl:text, ie they were intentional.

Back on develop now, and it seems the majority of the headings are not getting
the spaces they need. Is this implemented yet?

On 08/06/2014 04:35 PM, Michael DuBois wrote:

I'm doing the spacing for environment and section headings in the CSS, as
mentioned in BooksHTML/mathbook-assets#25
BooksHTML/mathbook-assets#25. Part of it was broken
before, but it's fixed now, so it will be important that you remove the
whitespace from between the || elements so that the browser doesn't
interpret it as a single space.

There are a couple of different ways to do this:

Proof1.2.3Loch Ness Monster Proof

Proof</span

1.2.3</span
Loch Ness Monster Proof

Proof1.2.3Loch Ness Monster Proof

There also might be some XSLT specific ways to handle whitespace. This looks
promising
http://stackoverflow.com/questions/1468984/xslt-remove-whitespace-from-template.


Reply to this email directly or view it on GitHub
#12.


Reply to this email directly or view it onGitHub.[211500__eyJzY29wZSI6Ik5ld3NpZXM6QmVhY29uIiwiZXhwaXJlcyI6MTcyMzE4MDQ5OSwiZGF0YSI6eyJpZCI6MzkwMjcwODl9fQ==--7cc560
1aa78074cf569f119d32ec48d479dffd84.gif]

@mxdubois
Copy link
Author

mxdubois commented Aug 9, 2014

Actually, this issue was about section/environment headings, not the
headings in the ToC. So it's related to
BooksHTML/mathbook-assets#25.

I'm pretty sure the CSS on develop (and math-fest) is adding the spaces
correctly. I filed this issue here because some environment headings were
getting an extra space from the HTML between the last <span> token and
the heading's final period. The "Example" environments at this link
demonstrate that behavior:

http://mathbook.pugetsound.edu/temp/mathfest/section-sets-and-equivalence-relations.html

When I manually remove all the linebreaks between the <span>s, the
opening <h5> tag, and the closing </h5> tag, the problem is fixed.

On Sat, Aug 9, 2014 at 4:14 AM, davidfarmer notifications@github.com
wrote:

Not implemented yet: it is issue #26

On Fri, 8 Aug 2014, Rob Beezer wrote:

It was easy to do this, since I mostly introduced the spaces with
xsl:text
/xsl:text, ie they were intentional.

Back on develop now, and it seems the majority of the headings are not
getting
the spaces they need. Is this implemented yet?

On 08/06/2014 04:35 PM, Michael DuBois wrote:

I'm doing the spacing for environment and section headings in the CSS,
as
mentioned in BooksHTML/mathbook-assets#25
BooksHTML/mathbook-assets#25. Part of it was
broken
before, but it's fixed now, so it will be important that you remove the
whitespace from between the || elements so that the browser
doesn't
interpret it as a single space.

There are a couple of different ways to do this:

Proof1.2.3Loch Ness Monster
Proof

Proof</span

1.2.3</span
Loch Ness Monster Proof

Proof1.2.3Loch Ness Monster Proof

There also might be some XSLT specific ways to handle whitespace. This
looks
promising
<
http://stackoverflow.com/questions/1468984/xslt-remove-whitespace-from-template
.


Reply to this email directly or view it on GitHub
#12.


Reply to this email directly or view it
onGitHub.[211500__eyJzY29wZSI6Ik5ld3NpZXM6QmVhY29uIiwiZXhwaXJlcyI6MTcyMzE4MDQ5OSwiZGF0YSI6eyJpZCI6MzkwMjcwODl9fQ==--7cc560
1aa78074cf569f119d32ec48d479dffd84.gif]


Reply to this email directly or view it on GitHub
#12 (comment).

@rbeezer
Copy link
Collaborator

rbeezer commented Aug 9, 2014

OK, I am aware of this one.

I am having no luck getting the

's to output without line
breaks. It feels like a bug. If I change the h5 to then it outputs
without that trailing line break inside.

I'm going to go for a MWE and either discover the cause in the process or having
to post to SO (or similar).

I am getting no spaces between parts of environment/section headings now that
I have removed all my intentional spaces. I'll get an example up soon if
necessary, let me know.

Rob

On 08/09/2014 02:57 PM, Michael DuBois wrote:

Actually, this issue was about section/environment headings, not the
headings in the ToC. So it's related to
BooksHTML/mathbook-assets#25.

I'm pretty sure the CSS on develop (and math-fest) is adding the spaces
correctly. I filed this issue here because some environment headings were
getting an extra space from the HTML between the last <span> token and
the heading's final period. The "Example" environments at this link
demonstrate that behavior:

http://mathbook.pugetsound.edu/temp/mathfest/section-sets-and-equivalence-relations.html

When I manually remove all the linebreaks between the <span>s, the
opening <h5> tag, and the closing </h5> tag, the problem is fixed.

On Sat, Aug 9, 2014 at 4:14 AM, davidfarmer notifications@github.com
wrote:

Not implemented yet: it is issue #26

On Fri, 8 Aug 2014, Rob Beezer wrote:

It was easy to do this, since I mostly introduced the spaces with
xsl:text
/xsl:text, ie they were intentional.

Back on develop now, and it seems the majority of the headings are not
getting
the spaces they need. Is this implemented yet?

On 08/06/2014 04:35 PM, Michael DuBois wrote:

I'm doing the spacing for environment and section headings in the CSS,
as
mentioned in BooksHTML/mathbook-assets#25
BooksHTML/mathbook-assets#25. Part of it was
broken
before, but it's fixed now, so it will be important that you remove the
whitespace from between the || elements so that the browser
doesn't
interpret it as a single space.

There are a couple of different ways to do this:

Proof1.2.3Loch Ness Monster
Proof

Proof</span

1.2.3</span
Loch Ness Monster Proof

Proof1.2.3Loch Ness Monster Proof

There also might be some XSLT specific ways to handle whitespace. This
looks
promising
<
http://stackoverflow.com/questions/1468984/xslt-remove-whitespace-from-template
.


Reply to this email directly or view it on GitHub
#12.


Reply to this email directly or view it

onGitHub.[211500__eyJzY29wZSI6Ik5ld3NpZXM6QmVhY29uIiwiZXhwaXJlcyI6MTcyMzE4MDQ5OSwiZGF0YSI6eyJpZCI6MzkwMjcwODl9fQ==--7cc560

1aa78074cf569f119d32ec48d479dffd84.gif]


Reply to this email directly or view it on GitHub
#12 (comment).


Reply to this email directly or view it on GitHub
#12 (comment).

@mxdubois
Copy link
Author

Hmm, well I would just suggest trying the things I listed in the original post. The SO question I linked at the end might have the cleanest or most "correct" way to do it, though.

For what it's worth, proofs do not have this problem.

If you feel ambitious, it would be a good idea to isolate the heading XSLT into a single template (or one for environments and one for sections), now that we're standardizing them.

@rbeezer rbeezer added the bug label Feb 7, 2015
@rbeezer
Copy link
Collaborator

rbeezer commented Feb 7, 2016

This space (and many others) has gone away as a result of cae344d.

However, it remains to get reasonably easy-to-read indented output instead.

@rbeezer rbeezer closed this as completed Feb 7, 2016
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