Coder Social home page Coder Social logo

latte's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

latte's Issues

Feature request\Help support on iterating over an array of objects

I'd like to use LATTE to generate some PDFs which include some tables with fixed headers but a dynamic number of rows.

Currently, the template substitution is 1 on 1, is there a way to repeat a block of code N times over a slice?

Is there anything you would suggest to look into to achieve this feature? I'm currently browsing for ways to iterate over data in latex but I doubt it's the best performant way.

Can't make Pythagorean example work

I cloned the repo and used go run to build up the server. Then I tried to reproduce your example with curl, resulting in a file that cannot be opened by a PDF viewer since it has the format "text/plain". The content of the file was the error message "invalid character '\' looking for beginning of object key string".

Do you have an idea of what I might be doing wrong?

Another problem is that I did not manage to use Golang to properly handle the http post request (replacing curl). I tried to copy the contents of response.Body into a file using io.Copy, but it didn't work. Maybe you have some suggestions.

i am quite new to this topic, so please be gentle with me if the questions/problems are very stupid...

Default self-contained database?

The DB interface looks perfect for an embedded key/value store like badger or bbolt. Any plans to make latte self-contained with a default on-disk, memory-only, or embedded database implementation?

Some pseudocode:

type MemoryDB struct {
	docs map[string]interface{}
}


// Store should be capable of storing a given []byte or contents of an io.ReadCloser
func (db *MemoryDB) Store(ctx context.Context, uid string, i interface{}) error {
	db.docs[uid] = i
	return nil
}

// Fetch should return either a []byte, or io.ReadCloser.
// If the requested resource could not be found, error should be of type NotFoundError
func (db *MemoryDB) Fetch(ctx context.Context, uid string) (interface{}, error) {
	if v, ok := db.docs[uid]; ok {
		return v, nil
	}
	return nil, NotFoundError{}
}

// Ping should check if the databases is reachable, if return error should be nil and non-nil otherwise.
func (db *MemoryDB) Ping(ctx context.Context) error {
	return nil
}

Broken GitHub Action

The testing workflow seems to be having dependency issues during the installation of MiKTeX causing the whole thing to fail.

The current default delimiters are terrible

The default delimiters used by the Go templating engine are {{ and }}, but they clash with LaTeX.

LaTTe is currenlty using #! and !# but these are terrible in almost every way.

It'd be great to get some input on better delimiters.

Feature proposal - multiple compilations of the same document

TL;DR

  • Allow an option to force multiple consecutive compilations of the same document for compatibility with all the packages that make use of the aux files (eg. tikz)
  • I am willing to delve into the codebase and attempt a PR on the subject

As with any open source project I'd like to hear an opinion on [1] if the idea is of @raphaelreyna interest and [2] if this is the case how to proceed.

For the purpose, at the moment, I've brainstormed two paths:

  • An option to manually specify how many compile to perform
    • For the CLI it could be a flag
    • For the server a JSON key
  • Use latexmk

The first path IMHO is the easiest as it would imply to repeat compile N times by wrapping it in a for loop.

The second path, while it seems to be more efficient as it automagically takes in account the iteration to perform it could have unpleasant surprises that would arise with time.


Personally I'd lean towards the first option, LaTTe after all is a tool thought for one template injected with different details each time. I don't see it as a tool meant for documents with bibliographies for instance. So the less impactful approach is better IMHO.

Personal thoughts: this idea comes from a personal need, I use the dapper-invoice latex template to make invoices, being a freelancer software developer myself I already have tools to log my work time and I thought it would be awesome to partially automate the invoice making by separating the template form the data itself. However, the latex document needs to be compiled a couple of times for a proper rendering of its elements.

{"error":"getwd: no such file or directory"}

Occasionally the system gets into a state where it always starts returning {"error":"getwd: no such file or directory"} instead of PDF files until the daemon is restarted. I'd take a stab at fixing the issue but I'm unable to reproduce it consistently, does anybody have any ideas on what could be the cause?

Custom CLS as a registered resource - resource not found when generating

I've tried to register a custom CLS file as a resource, however when attempting to generate a document with it, I receive the error "resource with --id-- not found".

I'm unsure this is a bug, the documentation always refer to resources as files as resources to use inside the document while a cls is called in the \documentclass part of a .tex file.

If this is the intended behavior I'd like to explore further how to provide a custom cls otherwise it might indeed be a bug.

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.