Last active
April 8, 2020 08:32
-
-
Save youz/ea466325e29d42f98ad6e6e6d2073910 to your computer and use it in GitHub Desktop.
sd.saty
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @require: stdjareport | |
| let-block ctx +distance r it = | |
| let () = if 1pt *' r <' 2pt then abort-with-message `keep a distance` else () in | |
| let d = (get-font-size ctx) *' r in | |
| let dctx = ctx |> set-leading (d *' 1.5) | |
| |> set-space-ratio r 0. (r *. 10.) | |
| |> set-paragraph-margin d d | |
| in | |
| read-inline dctx it ++ inline-fil | |
| |> form-paragraph dctx | |
| let sample = { | |
| THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | |
| } | |
| in | |
| document (| author = {}; title = {}; |) | |
| '< | |
| +p(sample); | |
| +distance(2.0)(sample); | |
| +distance(5.0)(sample); | |
| > |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment