Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to run multiple times for longtable #50

Open
Arlen22 opened this issue Jan 25, 2017 · 5 comments
Open

How to run multiple times for longtable #50

Arlen22 opened this issue Jan 25, 2017 · 5 comments

Comments

@Arlen22
Copy link

Arlen22 commented Jan 25, 2017

I'm trying to figure out how I would run this multiple times, which is needed when using longtable.

Any thoughts?

@manuels
Copy link
Owner

manuels commented Jan 25, 2017

What is the error that you are getting? What is the code that you are running?

@Arlen22
Copy link
Author

Arlen22 commented Jan 25, 2017

Package longtable Warning: Column widths have changed
(longtable)                in table 1 on input line 126.


Package longtable Warning: Table widths have changed. Rerun LaTeX.

[2] (./input.aux) )
(see the transcript file for additional information)<//texmf-dist/fonts/type1/p
ublic/amsfonts/cm/cmr10.pfb>
Output written on input.pdf (2 pages, 32845 bytes).
Transcript written on input.log.

I'm using the code at http://manuels.github.com/texlive.js/

However if I duplicate the line https://github.com/manuels/texlive.js/blob/master/pdftex.js#L171, it still only runs one time. I can't really tell why.

@manuels
Copy link
Owner

manuels commented Jan 31, 2017

You cannot re-run emscripten scripts without configuring this at runtime.
Probably the easiest is to create a new PDFTeX instance and copy the files created when running the first time into this emscripten environment.

@ghost
Copy link

ghost commented Feb 15, 2017

You can move files, e.g., .aux and .toc, from one compilation to another like this though:

var myauxfile = pdftex_first.FS_readFile("/input.aux");

pdftex_second.FS_createDataFile("/", "input.aux", myauxfile["result"][0], true, true, true);

Works like magic.

@Arlen22
Copy link
Author

Arlen22 commented Mar 8, 2017

Ok, interesting. Ended up changing the return statement of compileRaw to this and made the related changes that you see here, such as moving onMessage out of the constructor and adding a few arguments to compileRaw. Written in typescript.

            return PromiseHelper.chain(commands)
                .then(sendCompile)
                .then(() => self.FS_readFile('/input.aux'))
                .then(file => {
                    console.log(file);
                    
                    if (count < 3) {
                        worker = new Worker(opt_workerPath);
                        worker.onmessage = workerOnMessage.bind(self);
                        initialized = false;
                        return self.compileRaw(source_code, file, count + 1);
                    } else {
                        return self.FS_readFile('/input.pdf');
                    }

                    //return PromiseHelper.chain(commands);
                })

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants