daisy / daisy/pipeline-modules

Copy images to result directory in dtbook-to-latex

Open
#164 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
HTML
Stars
4
Forks
6
PR merge metrics
No merged PRs in 30d

Description

## Background

The `dtbook-to-latex` script (PR #137) generates `\includegraphics{...}` commands using the relative `@src` paths from the DTBook. For the generated `.tex` file to compile successfully, the referenced images need to be present at the same relative paths under the result directory.

The current script does not copy images to the result directory, so users have to do this manually.

## What needs to be done

- Change the script to accept a fileset as input (`source.fileset` + `source.in-memory` ports, as used by e.g. `dtbook-to-epub3`) instead of a single DTBook XML file
- After storing the `.tex` file, copy the non-DTBook entries from the input fileset (images etc.) to the result directory using `px:fileset-store`
- Update tests accordingly

## Note

This is only relevant when `image-visibility` is set to `show` (the default). Users who set `image-visibility=ignore` are unaffected.

Contributor guide

No contributing guide indexed for this repository

Research direction

Compare the dtbook-to-latex script with dtbook-to-epub3, focusing on the source.fileset and source.in-memory ports and the px:fileset-store step. Review PR #137 and the existing tests before updating them. Done means the generated .tex file and non-DTBook files from the input fileset are stored in the result directory when images are shown.

Written by the indexing model from the issue text.

Assessment

Tech stack
latex
Domain
tooling
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.