idea for debugging aid: report on unexpected changes/settings
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 33
- Forks
- 15
- PR merge metrics
- No merged PRs in 30d
Description
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.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
The proposal does not name an implementation file or test. Start by locating the report generator and reviewing the referenced style sheets, TeX files, parlocs file, .fontusage log, project.tex, and ptxprint-mods files. Done would require a defined debugging report that identifies unexpected settings and overrides without becoming a general preflight tool.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python, tex
- Domain
- devtools, tooling
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100