Skip to content

Commit 9cf3d51

Browse files
committed
Fix standalone table compilation - move \fetchgeneratedtabular to shared package
- Move \fetchgeneratedtabular from local-qe.sty to local-qe-figs-and-tables.sty - Add \RequirePackage{catchfile} to local-qe-figs-and-tables.sty - Update local-qe.sty with comment pointing to new location - Ensures standalone tables can compile with generated content
1 parent 8a44113 commit 9cf3d51

File tree

2 files changed

+21
-17
lines changed

2 files changed

+21
-17
lines changed

@local/local-qe-figs-and-tables.sty

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,10 @@
4747
% NOTE: natbib is loaded by econsocart.cls, but we include for completeness
4848
\RequirePackage{natbib}
4949

50+
% Catchfile package for reading external files into macros
51+
% Required by: \fetchgeneratedtabular for standalone tables
52+
\RequirePackage{catchfile}
53+
5054
% ═══════════════════════════════════════════════════════════════════════════
5155
% BIBLIOGRAPHY DETECTION FOR STANDALONE FIGURES/TABLES
5256
% ═══════════════════════════════════════════════════════════════════════════
@@ -168,3 +172,17 @@
168172
% Note: \latexroot should be defined by \input{./._relpath-to-latexroot.ltx}
169173
% which should be present at the top of each figure/table file
170174
% ═══════════════════════════════════════════════════════════════════════════
175+
176+
% ═══════════════════════════════════════════════════════════════════════════
177+
% TABULAR DATA INCLUSION MACRO (for standalone tables)
178+
% ═══════════════════════════════════════════════════════════════════════════
179+
% Fetch dynamically-generated tabular content from external .ltx files
180+
% This allows standalone tables to compile independently while still
181+
% loading generated content from Code/HA-Models/.../*.ltx files
182+
%
183+
% Usage: \fetchgeneratedtabular{\latexroot/Code/HA-Models/.../table.ltx}
184+
\providecommand{\fetchgeneratedtabular}[1]{%
185+
\CatchFileDef{\fetchedcontent}{#1}{}%
186+
\fetchedcontent%
187+
}
188+
% ═══════════════════════════════════════════════════════════════════════════

@local/local-qe.sty

Lines changed: 3 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,6 @@
99
%% MINIMAL PACKAGE SET FOR QE SUBMISSION
1010
% Bisection testing (2025-11-05) confirmed only these packages are needed:
1111

12-
% Catchfile package for reading external files into macros
13-
% Required by: \CatchFileDef in \fetchgeneratedtabular and @local/metadata.ltx
14-
\usepackage{catchfile}
15-
1612
%% FIGURES/TABLES PACKAGES (SHARED WITH STANDALONE FIGURES/TABLES)
1713
% Source the minimal package set used by standalone figures/tables
1814
% This ensures figures/tables compile the same way whether integrated or standalone
@@ -38,19 +34,9 @@
3834
\providecommand{\whenintegrated}[1]{#1} % Execute content (doc is integrated)
3935
\providecommand{\whenstandalone}[1]{} % Ignore content (doc is standalone)
4036

41-
% Tabular data inclusion macro
42-
% Fetch dynamically-generated tabular content from external .ltx files
43-
%
44-
% ARCHITECTURE: `tabulars` remain as external files so reproduce.sh can
45-
% regenerate them in place. Pregenerated versions are included in submission
46-
% for immediate PDF inspection. Uses catchfile package (not \input) to comply
47-
% with QE journal requirements while preserving regeneration capability.
48-
%
49-
% Usage: \fetchgeneratedtabular{Tables/foo.ltx}
50-
\providecommand{\fetchgeneratedtabular}[1]{%
51-
\CatchFileDef{\fetchedcontent}{#1}{}%
52-
\fetchedcontent%
53-
}
37+
% NOTE: \fetchgeneratedtabular is now defined in local-qe-figs-and-tables.sty
38+
% (loaded above) to avoid duplication between main document and standalone tables.
39+
% See local-qe-figs-and-tables.sty for the command definition and documentation.
5440

5541
% ═══════════════════════════════════════════════════════════════════════════
5642
% CONDITIONAL PREGENERATED MARKER

0 commit comments

Comments
 (0)