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

idea for debugging aid: report on unexpected changes/settings #969

Open
davidg-sil opened this issue Jul 31, 2024 · 0 comments
Open

idea for debugging aid: report on unexpected changes/settings #969

davidg-sil opened this issue Jul 31, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@davidg-sil
Copy link
Collaborator

It might help debugging if there was a 'deviations from a normal setup' report. e.g.:

spaceafter in body paragraph type(s) (p, q2) [LAYOUT]
body paragraph type (q1) has non-standard linespacing [LAYOUT]
using underline in char types (w) [HYPHENATION, READABILITY]
body paragraph type (q3) does not match font of (q1, q2) [CONSISTENCY]
baselineskip of (f) set smaller than font size [LAYOUT]
use of override style sheet ptxprint-mods.sty, breaking UI control of (fq, w) [CONTROL]
ptxprint-mods.tex redefines internal macro(s) (rubyt) [UNEXPECTED BEHAVIOUR]

The style sheet probably is not quite sufficient to identify what's a body paragraph style vs intro material vs magic (like h, toc1) but it gives a good start. The report generator code could fairly easily include some extra lists or subcategories, and group paragraph types where it would often be expected that the font be the same, e.g. q[123], (p,m,pm,pmi,pmc).

The information above could come purely from sty sheets and tex files, but theoretically the parlocs file could be scanned for odd baselines, paragraphs starting off-grid etc, and if there were a {job}.fontusage log (\LogFontstrue) then that could also be parsed to look for oddities which are caused in the functioning of TeX macros, as well as user settings.

I'm envisaging that the final line above would populate a dict of from the macro files with a couple of regexes \\def\\([^#{ ]*) and \\let\\([ \\]*) and then look in the mods file with the same regexes. There could be a list of expected user-controls to weed out things that we expect to see there, and of course a similar list could be generated from the project.tex file, to see if something provided by the UI is getting overridden.

The role of the tool is not to provide a preflight tool, but a debugging tool, to help spot what might be causing problems.

@davidg-sil davidg-sil added the enhancement New feature or request label Jul 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant