# Diglot on Facing Pages (Single Column per page)

Is it possible to create a Diglot/Discript on Facing Pages, using a Single Column?

This has been requested by for Song Books, because A5 double columns cause too much wrapping.

I have not been able to get it to work (v2.0.30 and v2.1.8)

Thanks, Mike

Yes, it should be… but not (exclusively) via the graphical user-interface at the moment.

It is possible with the “polygolt-simplepages” plugin. If only the user-interface allowed plugins to be loaded then it would “just” be a case of specifying that and adding some cryptic code to put into the ptxprint-premods.tex file (and maybe ptxprint-mods.tex). Sadly, that functionality isn’t in the user-interface yet, and even the ptxprint-premods.tex file is too late to load that plugin.

So… Are you using linux or windows and are you comforable using a command-line?

I am using windows, and I am comfortable with command-line.

OK…

One way to do it that I think ought to work (untested):

1. Set up as much as you can via the GUI.
2. Add this to ptxprint-premods.tex:
\polyglotpages{L,R}
\def\DiglotRFraction{1.0}
\def\DiglotLFraction{1.0}

1. Press print.
2. Generate an archive (under the help tab)
3. Using your favourite text editor, add the code \def\pluginlist{polyglot-simplepages} as the first line of the generated tex file. Maybe the “view only” button will work to open the file and let you save the changes.
4. From the archive you generated, extract the “runtex.txt” batch file.
5. Rename above file to runtex.bat, and put it into the configuration’s working folder (My Paratext 8 projects\PROJ\local\ptxprint\MySongBooks)
6. Edit runtex.bat, replacing the line:
set TEXINPUTS=.;%cd%\\..\\..\\..\\src\\;
with:
set TEXINPUTS=.;C:\\Program Files\\PTXprint\\ptx2pdf\\;
and delete the FONTCONFIG line. (I hope)
7. Run runtex.bat

Every time you change something from ptxprint’s GUI, you’ll need to repeat steps 3,5 and 9.

I’ve just put in a github issue #636 discussing the problem. Hopefully you’ll be able to see there if there is any progress from the python programmers!

Thanks to @David_Gardner this functionality has been around for about a year. But so far no one else has asked for it, so I have been reluctant to add it to the UI which continues to become more and more complicated, especially for novice users.

However, it would be really good to hear from the rest of this community regarding how useful this kind of feature would be. And rather than replying with a “Yes please!”, please tell us specifically how a two-page spread might help solve an existing problem.

BTW - related to this is an option for multi-glot, which is on our current list of enhancements but at priority 12 out of 25. The TeX work is complete, but it hasn’t been implemented in PTXprint’s UI yet. Here is what the output (5 synchronized projects across a 2-page spread) could look like:

PtxPrint Crashed on Step#3 (Print). I am emailing crash report to support email.
Thanks,

XeTeX crashing is to be expected with the above. But before XeTeX crashes, ptxprint generates the files that need to be modified (so it does not crash but works properly).

A better version that should not crash would be:

\ifcsname polyglotpages\endcsname
\polyglotpages{L,R}
\def\DiglotRFraction{1.0}
\def\DiglotLFraction{1.0}
\fi


This basically says ignore this bit if the plugin has not been loaded

It did create a PDF with diglot on single facing pages. Yeah!
But the alignment is not so good. This is a non-Biblical book without verses, only chapters and text. Is there anyway to avoid having to manually align each page?

Each time I want to update the PDF, I only need to redo steps 3, 5 & 9, (not 4). Correct?

Second time (Steps 3,5,9) but I am getting errors.
I tried recreating archive, but then I got two columns second time.

If you’ve given it the 2nd version of the ptxprint-premods, yes, that will give you the old-style 2column mode.
To re-create the facing-sides output, the steps would be:

1. Make changes,
2. Press print (ignore crash / close that PDF). (Even though you get an error, letting it crash might save some time).
3. Add \def\pluginlist{polyglot-simplepages} to top of the .tex file
4. run runtex.bat (possibly 2 or 3 times, depending on whether the output says anything about ‘Re-run to correct XYZ’

One of the changes you might want to play with is the ‘Alternative merge mechanism’ One of them pays more attention to paragraphs than the other.

Another thing you might want to do to help alignment is insert verse numbers but suppress printing them. (on the “Body” tab)
You could, e.g. use chapters numbers for the song number, and \v for the verses.

It is working fairly well, but after I re-run runtex.bat, the pages numbers in the footer and in the TOC are no longer in Devanagari script, they revert to roman script. How do I fix that?

Also the TOC Page numbers are for the diglot printing, and are not updated for the new page layout.

I think it sounds like the python code is doing something complicated for you between runs. If there’s no UI change that lets you specify a plugin then you may need to set the default plugin list before it is checked in ptx-plugins.tex i.e. put the \def\pluginlist... from (3) at the top of that file. I can’t remember where the file is stored in windows, sorry.

I already have the \def\pluginlist… in the ptxprint-Diglot-XXEETHymns.tex file. See below.

I believe you are asking me to put it in a second file, Correct?
I have searched the C drive and do not find a ptx-plugins.tex.
Can someone point me to a folder or general area?

% Created by ptxprint 2.07 at 2022-03-31 15:58:52 +05’45’
\def\pluginlist{polyglot-simplepages}
\input paratext2.tex
\input ptx-ptxprint.tex
\includeifpresent{…/…/…/shared/ptxprint/Diglot/ptxprint-premods.tex}
.

Today I used v2.1.20, and added polyglot-simplepages to the advanced page, but the pages are still two columns for the diglot. I am not doing any of the manual steps from before.

1. What else do I need to configure for single facing page diglot?
2. What do I need to configure on the second diglot config?

Including the plugin via the UI helps skip the manual running of the priject but it being included does nothing in itself (except take up some of TeX’s memory and make additional configuation available). It is still necessary to speciy which columns go on which pages (\polyglotpages{L,R} for example), and how big the columns should be, (step 2 as given above). These settings should go in ptxprint-premods.tex available from the advanced menu.

If by ‘second diglot config’ you mean the styling etc. pages for the ‘secondary text’, there is no special configuration necessary unless you wish to use wider margins, alter font sizes, etc.

To get multi-column diglots as per Mark"s image, you must have a copy of perl available so that you can run the (command line) merge program, and basically abandon the graphical user interface.