Comments (9)
Can you post the code, or a link to it?
from scribble.
https://github.com/zoeeer/git-from-the-bottom-up-translate
I just pushed it to this repo. Please look at the file at path "docs/1.repository.scrbl". Thanks.
---edit---
Here's the code about footnotes:
At the top of this file:
@(define-footnote notes2 footnotes2)
@(define-footnote notes3 footnotes3)
@(define-footnote notes4 footnotes4)
@(define-footnote notes5 footnotes5)
defines footnote for several sections. And after the text of certain section there is:
@(footnotes2)
@section{...} @;begins the next section
specifies where to show the footnotes. Then just as the picture shows, section number jumped by one when there is a footnote-part.
I also have footnotes for section 2.1, but I put this subsection in a separate file and then included it (I actually did this to test the "footnote - section number" thing):
@title{代码仓库(repository)}
@include-section["1-1-content-tracking.scrbl"]
@section{blob的介绍}
And this works fine - the following section is numbered 2.2.
from scribble.
Ok, I think the change in #84 will fix this. Can you edit your copy of scriblib/footnote.rkt
and try it?
The issue seems to be, calling @(footnotes2)
is the same as adding @section[#:style '(hidden toc-hidden)]{}
. This "hidden" section gets a section number, so the section after it gets an incremented number.
Adding @section[#:style '(unnumbered hidden toc-hidden)]{}
doesn't change the section numbers, and that's what the pull request does.
from scribble.
Thank you bennn, I read your PR and I think it will fix.
But, please excuse me, I don't know how to build and use the latest code. Is there anything in the racket docs which can guide me through this?
I read some parts of the Package Management in Racket, and I figure I need to remove the official package and install it from my local repository, is that right? Do I remove only scribble-lib or I need to remove the whole scribble package?
Actually I tried:
$ raco pkg remove --force scribble-lib
$ raco pkg install # under path $(scribble-repo)/scribble-lib
Everything seems right. But then when I ran scribble command from shell, it says the command cannot be found. Where did I go wrong?
---edit---
Now I tried adding the "unnumbered" argument into the installed directory of Racket. It works as expected.
from scribble.
@bennn Now that you've mentioned an 'unnumbered' option , I wonder if it can be used with a section included by the @include-section syntax? 'cause I have an 'introduction' section in the beginning of my document and I don't want it to be numbered.
from scribble.
To work with the latest scribble**
- clone Racket
- inside the clone directory, make a folder
extra-pkgs/
- inside the
extra-pkgs/
folder, runraco pkg update --clone scribble
Yes, you can use 'unnumbered' on any section. I think the full list of style options is in the docs for the part
struct:
http://docs.racket-lang.org/scribble/core.html#%28def._%28%28lib._scribble%2Fcore..rkt%29._make-part%29%29
(All this should be easier to find .... idk the best solution. Write blog posts? Ask questions on Stack Overflow?)
**
Those instructions are what I did, and I think probably what you want to do. But I'm not sure it's necessary to clone Racket. And it's definitely not necessary to make an extra-pkgs/
directory or even to call it that, but extra-pkgs/
is included in the .gitignore
in the Racket repo. Also, you can do raco pkg install --clone <pkg-name>
for new packages. ... There's an email from Sam from 2014(?) that suggests extra-pkgs/
.
from scribble.
Thanks, that's a lot of information...
I grabbed the idea of "part" objects, and it says
"There is no difference between a part and a full document; a particular source module just as easily defines a subsection (incorporated via include-section) as a document."
But I still don't know how to add a "style" option to the whole included-document-as-a-part-object. The doc for @include-section says:
(include-section module-path)
Requires module-path and returns its doc export (without making any imports visible to the enclosing context). Since this form expands to require, it must be used in a module or top-level context.
It seems to me that @include-section["path/to/file"]
just expands to something like (require "path/to/file")
, right? The following code generates a "bad syntax" error:
@include-section[#:style 'unnumbered "path/to/file"]
from scribble.
Yes include-section
is basically a require
.
I don't know how to add a style to a whole included document either. I would add #:style
tags to each section, or redefine @section
etc. at the top of the Introduction. Like:
#lang scribble/manual
@(require (prefix-in base: scribble/base))
@(define (section . stuff)
(apply base:section #:style 'unnumbered stuff))
from scribble.
from scribble.
Related Issues (20)
- binary package does not include css
- Empty lines for grouping in `scribble/example` `@examples`
- Missing license information for LaTeX files HOT 2
- `scribble/text-render` doesn't respect `(linebreak)` HOT 3
- Should `output` and `outputable/c` also accept a generic interface?
- Feature request: Anchor links on hover
- The scribble documentation doesn't say how to install scribble HOT 10
- Small scribble doc w/`pict` & `/gui` seems to cause ObjC exception HOT 1
- ORCID in acmart generates invalid link HOT 1
- Autobib citation links jump to the wrong place in PDF backend
- Secref ignores #:link-render-style
- HTML style attributes aren't applied to `*section`s HOT 2
- Feature request: Wrap a `div` with a class around the HTML for a `part`
- Incorrect package computation HOT 8
- scribble/doclang and scribble/doclang2 should not be defmodulelang
- Contract violation when using prefab struct datums w/linebreaks in `racketblock`
- Cyrillic titles / sections / etc. generate incorrect links HOT 1
- append: contract violation in base-render HOT 5
- Verbatim text not wrapped correctly in PDF output HOT 1
- Double underscore renders as single underscore HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from scribble.