0 votes
Under the Pictures tab of PTXPrint, it is possible to code each picture for Print, App, or Web. It is possible under Global options to "Omit pictures only meant for Web or App". But the UI doesn't give any other permutation of media selection. Is there a snippet of Tex we can put in ptxprint-mods by which we can say for example "Only output the Web pictures but not the Print pictures"? (I have pictures which I want in the "Readers Version" but not in the "Study Bible version" and vise versa. I am using these media tags to distinguish the two.)
PTXprint by (206 points)

2 Answers

0 votes
It sounds like you already have 2 different "Layouts" (Configurations), with one for Readers and one for Study. Each layout has control over its own unique PicList, so you should be able to manually REMOVE any unwanted pictures from each layout without affecting the other layout (i.e. select one or more rows and hit DEL or click the Del button at the top right).

For all Scripture books PTXprint removes the \fig ...\fig* from the USFM and controls everything through the PicList, so a changes.txt rule won't work to flip between loc="w" and loc="p"
by (3.2k points)
0 votes
Hi, sorry, the site was down when I tried to post what I'd written yesterday.

At the moment, on the TeX side of things:
1. the piclist entries are read and then remembered, just as the line of text without any interpretation.
2. The interpretation of the line of text into arguments occurs once  the right verse is reached.
3. Once the arguments from the have been processed, there's no setting or option in the current code that will prevent a picture (or placeholder) being inserted into the text.

So that means that if an unwanted image was at Gen1:1, say, and the wanted variant was at Gen1:2,
on the TeX side of things you could theoretically tell TeX to forget the piclist entry from Gen1:1, (between steps 1 and 2 above) but it would need to be told explicitly which entries to remove. This basically makes it a manual process, and Mark P has already suggested an easier way.

What I could do is refactor the code to allow a hook between the argument-parsing and image-creation steps, with that hook being allowed to set some kind of 'filtered out' flag. But that would be new code and as Mark has written, there are alternatives that will better suit most people.

Are you envisaging this as part of an automated process with hundreds of images and some kind of centrally-managed database of images? If so, then I wouldn't be opposed to inserting the hook-code as above, but for most people, if there's an image in the piclist but not in the final output, that's a bug!
by (1.1k points)
Welcome to Support Bible, where you can ask questions and receive answers from other members of the community.
How good and pleasant it is when God’s people live together in unity!
Psalm 133:1
3,032 questions
5,987 answers
5,653 comments
2,019 users