Scribble output without navigation

64 views
Skip to first unread message

Reuben Thomas

unread,
Dec 4, 2019, 5:12:32 PM12/4/19
to Racket Users
How can I get scribble/base to output HTML without the navigation elements? I just want a plain HTML page, similar to the look of the LaTeX output.

I can of course extract the "main" div from the standard output, but that seems to be somewhat shutting the stable door after the horse has bolted.

Grepping the package reveals mentions of "nonavigation" but that seems to be to do with when links are omitted because you can go no further in one direction or another.

--

Sam Tobin-Hochstadt

unread,
Dec 5, 2019, 9:47:24 AM12/5/19
to Reuben Thomas, Racket Users
The usual way I've done this is with some custom CSS to set the
navigation to "display: none".

Sam
> --
> You received this message because you are subscribed to the Google Groups "Racket Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to racket-users...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/racket-users/CAOnWdohXeROf75DQmdN75hZ8G_rMieT6-A-%3D8fYisJhptbgjiw%40mail.gmail.com.

Reuben Thomas

unread,
Dec 6, 2019, 5:18:15 AM12/6/19
to Sam Tobin-Hochstadt, Racket Users
On Thu, 5 Dec 2019 at 14:47, Sam Tobin-Hochstadt <sa...@cs.indiana.edu> wrote:
The usual way I've done this is with some custom CSS to set the
navigation to "display: none".

Thanks. I would really prefer not to have the navigation apparatus, so I guess post-processing the output is the only thing I can do without some serious work on Scribble itself?

Sam Tobin-Hochstadt

unread,
Dec 6, 2019, 10:32:12 AM12/6/19
to Reuben Thomas, Racket Users
Is there a reason that not showing it is a problem, relative to not
having it in the HTML? The CSS approach is quite easy.

Sam
> --
> You received this message because you are subscribed to the Google Groups "Racket Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to racket-users...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/racket-users/CAOnWdoiLGMFP_V%3Drh0myODK2Z9M%2BQLm6vHNZ4WML3qf_syO5Eg%40mail.gmail.com.

Matthew Flatt

unread,
Dec 6, 2019, 10:43:30 AM12/6/19
to Reuben Thomas, Sam Tobin-Hochstadt, Racket Users
Do 'no-toc and 'no-sidebar style properties on the main part help? Or
does that still leave navigation elements that you want removed?
> https://groups.google.com/d/msgid/racket-users/CAK%3DHD%2BZ18Bo%2BM68u_JvREXAh5
> u_Dd-%2BCGth-i0CDP5HJvfmkYw%40mail.gmail.com.

Reuben Thomas

unread,
Dec 7, 2019, 6:13:11 AM12/7/19
to Sam Tobin-Hochstadt, Racket Users
On Fri, 6 Dec 2019 at 15:32, Sam Tobin-Hochstadt <sa...@cs.indiana.edu> wrote:
Is there a reason that not showing it is a problem, relative to not
having it in the HTML? The CSS approach is quite easy.

I'm trying to generate XHTML for inclusion in web sites (as the main page contents) and ePUB files, so it's just extra complexity and potential for something to go wrong. If it were only the first case I was interested in, the CSS solution might be fine.

--

Reuben Thomas

unread,
Dec 7, 2019, 4:33:46 PM12/7/19
to Matthew Flatt, Sam Tobin-Hochstadt, Racket Users
On Fri, 6 Dec 2019 at 15:43, Matthew Flatt <mfl...@cs.utah.edu> wrote:
Do 'no-toc and 'no-sidebar style properties on the main part help? Or
does that still leave navigation elements that you want removed?

That's a great improvement, thanks, although it still leaves the "tocset" div, now empty.

What I couldn't work out was how to apply the style properties to the main part without using @title, which adds a title I don't want to LaTeX output. Would I need to use "make-part" to get a part without outputting anything?

--

Matthew Flatt

unread,
Dec 8, 2019, 12:07:31 PM12/8/19
to Reuben Thomas, Sam Tobin-Hochstadt, Racket Users
At Sat, 7 Dec 2019 21:33:30 +0000, Reuben Thomas wrote:
> On Fri, 6 Dec 2019 at 15:43, Matthew Flatt <mfl...@cs.utah.edu> wrote:
>
> > Do 'no-toc and 'no-sidebar style properties on the main part help? Or
> > does that still leave navigation elements that you want removed?
> >
>
> That's a great improvement, thanks, although it still leaves the "tocset"
> div, now empty.

There's now a 'no-toc+aux style property to completely get rid of that div.

> What I couldn't work out was how to apply the style properties to the main
> part without using @title, which adds a title I don't want to LaTeX output.
> Would I need to use "make-part" to get a part without outputting anything?

The 'hidden style property now works for the main document title to
skip it.

Reuben Thomas

unread,
Dec 8, 2019, 6:19:01 PM12/8/19
to Matthew Flatt, Sam Tobin-Hochstadt, Racket Users
On Sun, 8 Dec 2019 at 17:07, Matthew Flatt <mfl...@cs.utah.edu> wrote:

There's now a 'no-toc+aux style property to completely get rid of that div.

That's good, thanks; but I see that the maincolumn div is still emitted, so there's still a left margin. (I'm sorry, I hadn't looked into the CSS before to work out where the space was coming from.)

The 'hidden style property now works for the main document title to
skip it.

That's great, the LaTeX output is now perfect again!
--

Matthew Flatt

unread,
Dec 8, 2019, 7:08:36 PM12/8/19
to Reuben Thomas, Sam Tobin-Hochstadt, Racket Users
At Sun, 8 Dec 2019 23:18:45 +0000, "'Reuben Thomas' via Racket Users" wrote:
> On Sun, 8 Dec 2019 at 17:07, Matthew Flatt <mfl...@cs.utah.edu> wrote:
>
> >
> > There's now a 'no-toc+aux style property to completely get rid of that div.
> >
>
> That's good, thanks; but I see that the maincolumn div is still emitted, so
> there's still a left margin. (I'm sorry, I hadn't looked into the CSS
> before to work out where the space was coming from.)

For that kind of layout control, probably CSS really is the right level
to work at. The difference to me is that it make sense to have style
attributes at the Scribble level that control whether certain entities
are present --- detailed layout configuration for those entities is
meant to be at the CSS and Latex levels.

Reply all
Reply to author
Forward
0 new messages