Index: CHANGES.txt ================================================================== --- CHANGES.txt +++ CHANGES.txt @@ -1,9 +1,11 @@ -Version [next] +Version 0.14.1 +2025-01-02 [Changed] New icon, slightly less awful. [Bugfix] On macOS, groffstudio printed debug output where it shouldn't. +[Bugfix] Preprocessors did not quite work as well as they should have. ------------------------------- Version 0.14.0 2024-05-02 Index: src/unit1.pas ================================================================== --- src/unit1.pas +++ src/unit1.pas @@ -394,10 +394,11 @@ procedure TMainForm.btnBuildClick(Sender: TObject); var buildSuccess: boolean; buildOpts: string; + preproc: string; logFileName: string = ''; outputFileName: string; begin // Reset status display: MainStatusBar.Panels[1].Text := ''; @@ -413,16 +414,17 @@ // - Enforce UTF-8: buildOpts := buildOpts + ' -Kutf8'; // - Preprocessors: - if chkBoxPreprocessors.Checked[0] then buildOpts := buildOpts + ' -chem'; - if chkBoxPreprocessors.Checked[1] then buildOpts := buildOpts + ' -eqn'; - if chkBoxPreprocessors.Checked[2] then buildOpts := buildOpts + ' -grn'; - if chkBoxPreprocessors.Checked[3] then buildOpts := buildOpts + ' -pic'; - if chkBoxPreprocessors.Checked[4] then buildOpts := buildOpts + ' -refer'; - if chkBoxPreprocessors.Checked[5] then buildOpts := buildOpts + ' -tbl'; + if chkBoxPreprocessors.Checked[0] then preproc := preproc + 'chem | '; + + if chkBoxPreprocessors.Checked[1] then buildOpts := buildOpts + ' -e'; // eqn + if chkBoxPreprocessors.Checked[2] then buildOpts := buildOpts + ' -g'; // grn + if chkBoxPreprocessors.Checked[3] then buildOpts := buildOpts + ' -p'; // pic + if chkBoxPreprocessors.Checked[4] then buildOpts := buildOpts + ' -R'; // refer + if chkBoxPreprocessors.Checked[5] then buildOpts := buildOpts + ' -t'; // tbl if chkBoxExtras.Checked[0] then buildOpts := buildOpts + ' -mhdtbl'; // - PDF-specifics: {$IFNDEF WINDOWS} @@ -446,10 +448,11 @@ // - Log file: if chkLogFile.Checked then logFileName := currentGroffFilePath + '.log'; // Build: + buildOpts := preproc + buildOpts; buildSuccess := BuildWindow.BuildDocument(buildOpts, logFileName); {$IFDEF WINDOWS} if buildSuccess and hasGhostscript and rdPdf.Checked then {$ELSE}