GithubHelp home page GithubHelp logo

Buffer problem about xsim HOT 4 OPEN

Kilgrave37 avatar Kilgrave37 commented on June 12, 2024
Buffer problem

from xsim.

Comments (4)

muzimuzhi avatar muzimuzhi commented on June 12, 2024

And then I have a buffer problem. I there are only 3 students, it works fine (but the compilation is very long).

Sorry I don't get your point. A complete example would be a best description.

from xsim.

Kilgrave37 avatar Kilgrave37 commented on June 12, 2024

Thank you for your answer.
I will try to be clear (I am French).
I created external files, one for each chapter. In theses files, there are exercises (and solutions) and I tag some of the exercices for each students (eleve=1, …, eleve=6,).
Each week, six of my students pass an oral exam and I give to each one of them a paper with the exercises (the first student has the exercices tagged « eleve=1 », …)
To do that I created a file which gathers the exercises for each student (but this file contains the exercises for all 6 students)
Here is a part of the code from this file:
Here is a part of the code:
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%Élève 1 (first student)%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\xsimsetup{
solution/print=true,
eleve=1}
\input{\cheminun/coursColles-\chapun}
\input{\chemindeux/coursColles-\chapdeux}
\input{\chemintrois/coursColles-\chaptrois}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%Élève 2% (second student)%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\xsimsetup{eleve=2}
\input{\cheminun/exosColles-\chapun}
\input{\chemindeux/exosColles-\chapdeux}
\input{\chemintrois/exosColles-\chaptrois}

And so on until the sixth student (In my code there are only 2 students, because the code is exactly the same for the other students, except the tag, of course).
In my example, the exercises are gathered from three external files (chapun, chapdeux and chaptrois).
The problem is that each chapter is read six times (one time for each student) and there are three chapters.
That’s why I have a buffer problem. I don’t want to create a file for each student, I want a single file for all 6 students. If in my file, I put only 3 students instead of 6, I don’t have this buffer problem.
I guess I can avoid this buffer problem with collections but I didn’t succeed.
What I would like:

  • each chapter is read only one time
  • when the chapter is read, the 6 collections are created (a collection for tag « eleve=1 », …, « eleve=6 »)
  • when I print the exercises and the solutions, the exercises for each student are numbered 1, 2, … and not as they are numbered in each chapter.
    This way the chapters wouldn’t be read 6 times but only one time, because there would be only one \input for each chapter instead of six. But I don’t know how to do that

I hope I am clear

from xsim.

Kilgrave37 avatar Kilgrave37 commented on June 12, 2024

I will try to do it short.
I want to create six different collections from an external file.
Here is what I am doing:
\xsimsetup{eleve=1}
\input{\cheminun/exosColles-\chapun}
\xsimsetup{eleve=2}
\input{\cheminun/exosColles-\chapun}
\xsimsetup{eleve=3}
\input{\cheminun/exosColles-\chapun}
\xsimsetup{eleve=4}
\input{\cheminun/exosColles-\chapun}
\xsimsetup{eleve=5}
\input{\cheminun/exosColles-\chapun}
\xsimsetup{eleve=6}
\input{\cheminun/exosColles-\chapun}

I think this is not a good way because the external final is input 6 times.
I guess there is a way to input the external file only one time and create six collections in the same time (a collection for the tag « eleve=1 », …, a collection for the tag « eleve=6 ») but I don’t know how to do that

from xsim.

Kilgrave37 avatar Kilgrave37 commented on June 12, 2024

I guess I am not clear. Never mind

from xsim.

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.