Giter Club home page Giter Club logo

Comments (5)

rpspringuel avatar rpspringuel commented on June 8, 2024

At least some of this should already be possible using the \betweenLilyPondSystem mechanism described on the lilypond-book pages.

from lyluatex.

uliska avatar uliska commented on June 8, 2024

Indeed. Only now I realize that the system number actually is passed into that function (if it is defined), and one could make that function check against a list somewhere else. The main problem I see is that this is only triggered after each system. So when we ask for anythin not including the first system we can't undo that (AFAICS). In any case it should be easier to completely handle this in teh Lua part.

from lyluatex.

rpspringuel avatar rpspringuel commented on June 8, 2024

Well, lilypond-book has \preLilyPondExample (and \postLilyPondExample) which one could use to do this like this:

\def\preLilyPondExamples{
    \let\oldincludegraphics\includegraphics
    \renewcommand{\includegraphics}[2][]{\relax}
}
\def\betweenLilyPondSystem#1{
    \ifnum#1<2\else\let\includegraphics\oldincludegraphics\fi
}
\def\postLilyPondExamples{
    \let\preLilyPondExamples\relax
    \let\betweenLilyPondSystem\undefined
    \let\postLilyPondExamples\relax
}

If included just before a particular snippet, this ought to suppress printing of the first system (not tested) and reset things back to normal afterwards.

As best I can tell, the package doesn't currently support those two commands. Would implementing them be sufficient to what you want, or would you want something that would be more user friendly.

from lyluatex.

uliska avatar uliska commented on June 8, 2024

Maybe that could be wrapped to make it simpler to use, I think.
However, I have the feeling that I would prefer handling it in Lua. But that may solely be based on the fact that I'm still feeling somewhat alien to TeX programming, while Lua (although completely new) is quite familiar based on my knowledge of other languages like Python or JavaScript.

What may be a point for the Lua argument is that it may be easier to make flexible on the long run, and we are dealing with the -systems.tex page anyway.

But I'm far from having a strong opinion here.

from lyluatex.

uliska avatar uliska commented on June 8, 2024

It will be much easier to to now after the refactor will be merged. Basically it can be done by updating latex.includepdf() and latex.includesystems().

I will add an option print-only that will take effect depending on the value of insert. In systems it affects the systems to be included, in fullpage it filters pages (in inline it won't have an effect).

It will accept:

  • a single number
  • a range: M-N
  • a list: M, N,O

from lyluatex.

Related Issues (20)

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.