Giter VIP home page Giter VIP logo

try-pollen's Issues

Some of the defined markup functions fail to render on latex.

For example, when rendering a test file (using pdflatex), functions such as blockcode and section fail to render leaving the following trace:

pollen: rendering generated pagetree for directory /home/divya/src/racket/test-pollen/
pollen: rendering /example.poly.pm as html
pollen: rendered /example.html (693 ms)
pollen: rendering /example.poly.pm as ltx
pollen: rendered /example.ltx (982 ms)
pollen: rendering /example.poly.pm as pdf
string-append: contract violation
  expected: string?
  given: '(txt "\\begin{center}" "This text should be in the center." "\\end{center}")
  context...:
   body of 'g5817
   /home/divya/.local/share/racket/8.12/pkgs/pollen/pollen/render.rkt:411:0: render-markup-or-markdown-source
   /home/divya/.local/share/racket/8.12/pkgs/pollen/pollen/render.rkt:337:25: render
   /home/divya/.local/share/racket/8.12/pkgs/pollen/pollen/private/cache-utils.rkt:124:2: generate-dest-file
   /usr/share/racket/collects/file/cache.rkt:63:2: fetch-and-continue
   /usr/share/racket/collects/racket/contract/private/arrow-val-first.rkt:555:3
   /home/divya/.local/share/racket/8.12/pkgs/pollen/pollen/private/cache-utils.rkt:114:0: cache-ref!
   /usr/share/racket/collects/racket/private/more-scheme.rkt:377:2: hash-ref!
   /home/divya/.local/share/racket/8.12/pkgs/pollen/pollen/render.rkt:277:0: render-to-file-base
   /home/divya/.local/share/racket/8.12/pkgs/pollen/pollen/render.rkt:183:25: render-batch
   /home/divya/.local/share/racket/8.12/pkgs/pollen/pollen/private/command.rkt:149:9: render-one-dir
   /home/divya/.local/share/racket/8.12/pkgs/pollen/pollen/private/external/logging.rkt:46:0: with-intercepted-logging
   body of (submod "/home/divya/.local/share/racket/8.12/pkgs/pollen/pollen/private/command.rkt" raco)
   /usr/share/racket/collects/raco/raco.rkt:41:0
   body of "/usr/share/racket/collects/raco/raco.rkt"
   body of "/usr/share/racket/collects/raco/main.rkt"

The minimal pollen.rkt that was used is the following:

#lang racket

(require pollen/decode
	       pollen/setup
	       txexpr)

(module setup racket/base
  (provide (all-defined-out))
  (define poly-targets '(html ltx pdf)))

(provide (all-defined-out))

(define (section title . text)
  (case (current-poly-target)
    [(ltx pdf) `(txt "\\section*{" ,title "}"
                 "\\label{sec:" ,title ,(symbol->string (gensym)) "}"
                 ,@text)]
    [else `(section (h2 ,title) ,@text)]))
    
(define (blockcode . text)
  (case (current-poly-target)
    [(ltx pdf) `(txt "\\begin{verbatim}" ,@text "\\end{verbatim}")]
    [else `(pre [[class "code"]] ,@text)]))

Error compiling feed.xml.pp after a Pollen/Racket upgrade

Hi,

I updated my system (Arch Linux, using pacman -Syu). As a part of the process, Racket was upgraded to version 7.7 and I had to re-install Pollen. After that, compiling this repository (make all) seems to work fine until it produces this error message upon compiling feed.xml.pp and then halts:

[truncated]

raco pollen render feed.xml.pp
pollen: rendering feed.xml.pp
pollen: rendering /feed.xml.pp
path->complete-path: second argument is not a complete path
  first argument: #<path:pollen.rkt>
  second argument: #<path:posts/>
  context...:
   /home/me/.racket/7.7/pkgs/pollen/pollen/setup.rkt:21:0: get-path-to-override
   /home/me/.racket/7.7/pkgs/pollen/pollen/setup.rkt:48:11: poly-targets
   /home/me/.racket/7.7/pkgs/pollen/pollen/private/file-utils.rkt:176:11: ->markup-source-path
   /home/me/documents/www/sandbox/digitalwords.net/try-pollen/feed.xml.pp:135:0: syndicate?
   /usr/share/racket/collects/racket/private/list.rkt:256:2: filter
   "/home/me/documents/www/sandbox/digitalwords.net/try-pollen/feed.xml.pp": [running body]
   temp35_0
   for-loop
   run-module-instance!
   do-dynamic-require
   /home/me/.racket/7.7/pkgs/pollen/pollen/private/cache-utils.rkt:67:0: path->hash
   /home/me/.racket/7.7/pkgs/pollen/pollen/private/cache-utils.rkt:124:2: generate-dest-file
   /usr/share/racket/collects/file/cache.rkt:63:2: fetch-and-continue
   /usr/share/racket/collects/racket/contract/private/arrow-val-first.rkt:555:3
   /home/me/.racket/7.7/pkgs/pollen/pollen/private/cache-utils.rkt:114:0: cache-ref!
   /usr/share/racket/collects/racket/private/more-scheme.rkt:376:2: hash-ref!
   ...
make: *** [makefile:84: feed.xml] Error 1

I’m not sure how to fix this and where the problem actually lies.

I came accross the problem trying to compile my own Pollen website, as I based my feed.xml.pp on yours (thanks! 💐).

Júda

License?

I'm remaking my blog in pollen, and went looking for a RSS impl. Found yours. I dont see a licsense anywhere in this. Do you mind if I copy/modify the RSS feed code you have?

This goes for other code, if you don't mind. Of course I won't touch any prose/design.

Or not -- Just let me know. TY!

libuuid not available on Windows

It appears that libuuid is not available on Windows, as the install raco pkg install libuuid fails, because ffi-lib: couldn't open "libuuid-1.dll" (the module does not exist).

Is there a way to fix this?

Implement LaTeX & PDF targets

Want to be able to demonstrate Pollen's multiple output target capability by creating a print-ready PDF version of the site via LaTeX.

  1. Add code to tag functions to distinguish between output target types
  2. Create LaTeX templates
  3. Change all .html.pm to .poly.pm

Too many decoders

For certain Pollen tags which need to return a list of X-expressions instead of a single one, I use the “decoder function” approach (described by MB). This is sort of ungainly, since my tags are now being handled by two different types of functions at two different stages of processing. Better to use the splice-me approach as seen in this example pollen.rkt file.

make flatland/flatland-book.ltx requires flatland/children.pm

Hello!

I really love this project, and am currently exploring it in my quest to build a pollen pipeline for my own written works. =)

I am trying to get a working make all going, and keep running into this failure when the project tries to build the full flatland-book.ltx.

Screenshot from 2019-07-15 18-43-14

(I have the xetex LaTeX engine installed and have successfully built the individual pages leading up to here, albeit I have changed the fonts to Ubuntu and Ubuntu Mono.)

Does this error look familiar? Do you know what the children.pm that it is looking for is? I have not been able to find any reference to it in the repo.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.