Giter VIP home page Giter VIP logo

manus's People

Contributors

erikmannerfelt avatar

Watchers

 avatar

manus's Issues

Set `\,` as default separator

Currently, the sep helper needs a separator in the data.toml. A neater way would be to have \, as default, and the separator key to optionally override it.

This behaviour will need to be changed accordingly in the documentation.

`\,` separator not working

Numbers in latex are often 1000-separated with \,. In the JSON world, it has to be written as \\, to mark that the backslash is not an escape sequence. A weird error occurs then, however:

data

{
    "n_terra_archive_images": 57385,
    "separator": "\\,"
}

tex

The terrA archive consists of {{sep n_terra_archive_images}} images in total, covering most of Switzerland.

output

Undefined control sequence.
l.44 The terrA archive consists of 57,\3
                                        85 images in total, covering most of...

Note that the separator turned into ,\instead of \,!

Add global formatting flags

The {{sep key}} is great for making large numbers more readable, e.g. 123456789 -> 123 456 789.

This should be possible as a global flag somewhere, so that the sep helper does not need to be put on every number, but will be added automatically.

Something like

% [manus: separate, round 2]

etc.

Add more helpers

Some examples of helpers that might be useful are:

  • More decimal rounding (now only 0-3 is supported)
  • Rounding upward (to nearest 10s, 100s etc.)
  • Comma or ~ separate large numbers ("10000" -> "10,000" / "10 000")
  • Maybe a pm or something to automatically add value$\pm$error if a "_pm" key is available?
  • Simple maths would be cool, but I don't know how feasible that is. Something like {{year1 - year2}} to get a duration.

Add support for toml data files

Currently, only json is supported, which is the most acceptable format out there. Toml is however great, as it allows for a more "human" syntax, and allows for comments.

pm not giving useful errors

If a key is not found, this error will be printed:

WARNING L79C62: pm argument: null was not a valid data path.

This is not very useful...

Add `manus lint` or similar

LaTeX is terrible at telling what's wrong. In addition, manus introduces new syntax, like templating, which would be nice to validate in a command.

Good checks can be:

  • Undefined citations (properly, not the bibtex nightmare messages that might mean anything).
  • Undefined data (templating data that can't be found in the data.json)
  • Unused data (data in data.json that hasn't been used.)
  • Runaway { and } marks (LaTeX will just tell you that you-re wrong. Nothing more than that).

Add powers of 10 abbreviation in expressions

1e-9 is currently invalid syntax and is terribly annoying to write. Something should be done about that.

Also, there is no operator for exponents, so a pow() function or similar should be implemented.

Add verbose flag

Right now, there is no verbose flag, so no progress and very few errors are reported.

This could be added like in the clap readme:

manus  # this is quiet, unless there are errors.
manus -v # This prints warnings and some more info.
manus -vv # This prints everything

Add CI

In python, it's trivial. I'm sure it can't be too hard in rust as well..

Add `--output` to all CLI tools for easier use with Windows

I am so used to piping things that it didn't occur to me that some cough windows may not always have access to those arguably essential tools. Hence:

manus convert main.tex > converted.tex

doesn't work. There should be an --output, -o option for all CLI arguments:

manus convert main.tex -o converted.tex

Retain origin information when printing errors

Currently, warnings are provided with line numbers of the merged tex file. Theoretically, a map or line struct could be made to remember which lines come from where. Thus, the error:

WARNING L166C83: Variable "value" not found.

could become:

WARNING L20C83 in chapters/data.tex: Variable "value" not found.

or similar.

Fix better error handling

Currently, most errors are shown to the user using format!("{:?}", error) which works for now but is quite ugly. There must be a better way for this!

Add custom bibliography styles

Bibtex is a nightmare, and its functionality is not very complicated. It would not be too hard to use templating-like syntax to generate bibliographies with hyperlinks.

The advantage would be that new bibliography styles can be made simply, without having to write a 1000+ line .sty file. Currently, TeX has to run twice (TeX -> BibTeX -> TeX) to get cross-references right. If BibTeX is removed, it only has to be run once, which will probably make it much much faster.

Also, error handling (Missing a { -> "There were undefined citations" ????) could be significantly improved. Of course, conversions should be possible into a "mainstream latex" format.

Add tectonic arguments

Arguments that should be propagated are:

--synctex
--keep-intermediates
--print # Although this would be -vv or something.

Add documentation

If things are published to crates.io, I guess it would solve itself. Would be nice to write things down, especially with helper syntax and so on.

Add `downsample` flag or similar for images

LaTeX doesn't care about image sizes, which is an obvious problem as images of arbitrary sizes can be given. It would be nice with a flag to automatically reduce image sizes:

manus build --downsample=300 main.tex

or something similar.

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.