Skip to content
This repository has been archived by the owner on Oct 8, 2022. It is now read-only.

Commit

Permalink
Merge pull request #269 from tdurieux/fix_258
Browse files Browse the repository at this point in the history
[fix #258] Makes the index after the compilation
  • Loading branch information
satabin committed Jun 4, 2016
2 parents 7f74646 + ecd7775 commit 80320b1
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 0 deletions.
5 changes: 5 additions & 0 deletions blue-compile/src/main/scala/gnieh/blue/compile/Compiler.scala
Original file line number Diff line number Diff line change
Expand Up @@ -53,5 +53,10 @@ trait Compiler {
*/
def bibtex(paperId: String, settings: CompilerSettings)(implicit timeout: Timeout): Try[Boolean]

/** Do the makeindex task for a paper, given the base directory
* containing the paper files.
*/
def makeindex(paperId: String, settings: CompilerSettings)(implicit timeout: Timeout): Try[Boolean]

}

Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,10 @@ abstract class SystemCompiler(system: ActorSystem, config: Config, texmfcnf: Fil
exec(s"bibtex main.aux", configuration.buildDir(paperId))
}

def makeindex(paperId: String, settings: CompilerSettings)(implicit timeout: Timeout): Try[Boolean] = {
exec(s"makeindex main.idx", configuration.buildDir(paperId))
}

protected def buildDir(paperId: String) = configuration.buildDir(paperId).getCanonicalPath
protected def paperFile(paperId: String) = configuration.paperFile(paperId).getName

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,7 @@ class ExplicitCompilationActor(
res <- compiler.compile(paperId, settings)
// we run bibtex on it if the compilation succeeded
_ <- compiler.bibtex(paperId, settings)
_ <- compiler.makeindex(paperId, settings)
} yield {
// clean the generated png files when compilation succeeded
for(file <- paperConfig.buildDir(paperId).filter(_.extension == ".png"))
Expand Down

0 comments on commit 80320b1

Please sign in to comment.