Skip to content

Commit 4a79881

Browse files
committed
Fixed latex attestations
1 parent f02c266 commit 4a79881

File tree

2 files changed

+16
-14
lines changed

2 files changed

+16
-14
lines changed

attestation-result.html

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -107,13 +107,17 @@ <h4>Option 3: API / Automation</h4>
107107

108108
<div id="latex-section" style="display: none; margin-top: 20px;">
109109
<h4>LaTeX Code</h4>
110-
<p>Basic version:</p>
110+
<p><strong>Step 1:</strong> Add this line to your main .tex file where you want the AI attestation to appear:</p>
111111
<pre id="latex-code" style="font-size: 0.9em;"></pre>
112-
<button id="copy-latex-code" class="btn btn-secondary">Copy LaTeX Code</button>
112+
<button id="copy-latex-code" class="btn btn-secondary">Copy Main File Code</button>
113113

114-
<p style="margin-top: 15px;">Extended version with footnote:</p>
114+
<p style="margin-top: 15px;"><strong>Step 2:</strong> Create a file named <code>ai-attestation.tex</code> with this content:</p>
115115
<pre id="latex-extended" style="font-size: 0.9em;"></pre>
116-
<button id="copy-latex-extended" class="btn btn-secondary">Copy Extended LaTeX</button>
116+
<button id="copy-latex-extended" class="btn btn-secondary">Copy ai-attestation.tex Content</button>
117+
118+
<div style="margin-top: 15px; padding: 15px; background: var(--bg-panel); border: 1px solid var(--border-color); border-radius: 4px;">
119+
<p style="margin: 0;"><strong>Note:</strong> This modular approach keeps your AI attestation in a separate file, making it easy to update or remove. Add <code>\clearpage</code> before the <code>\input</code> command if you want the attestation to start on a new page.</p>
120+
</div>
117121
</div>
118122

119123
<div id="markdown-section" style="display: none; margin-top: 20px;">

attestation-result.js

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -23,17 +23,15 @@ function generateAttestationDisplay(attestation) {
2323
latexSection.style.display = 'block';
2424
badgePreview.innerHTML = '<div style="font-family: monospace; background: var(--bg-panel); padding: 10px; border: 1px solid var(--border-color); color: var(--text-primary);">LaTeX Badge (see code below)</div>';
2525

26-
// Basic LaTeX code
26+
// Basic LaTeX code - now shows how to include the modular file
2727
const roleDisplay = attestation.role === 'edited' ? 'AI-ASSISTED' : attestation.role.toUpperCase().replace('_', '-');
28-
const latexCode = `% AI Attestation
29-
\\section{AI Attestation}
30-
\\begin{center}
31-
\\fbox{\\small\\texttt{${roleDisplay}}}
32-
\\end{center}`;
28+
const latexCode = `% Include AI Attestation section
29+
\\input{ai-attestation}`;
3330

34-
// Extended LaTeX with footnote
31+
// Extended LaTeX - the content for ai-attestation.tex file
3532
const modelDisplay = attestation.model === 'human' ? 'Human' : attestation.model;
36-
const latexExtended = `% AI Attestation
33+
const latexExtended = `% ai-attestation.tex
34+
% AI Attestation section for inclusion in main document
3735
\\section{AI Attestation}
3836
\\begin{center}
3937
\\fbox{\\small\\texttt{${roleDisplay}}}
@@ -191,7 +189,7 @@ function initializeCopyButtons() {
191189
await navigator.clipboard.writeText(code);
192190
this.textContent = 'Copied!';
193191
setTimeout(() => {
194-
this.textContent = 'Copy LaTeX Code';
192+
this.textContent = 'Copy Main File Code';
195193
}, 2000);
196194
} catch (err) {
197195
alert('Failed to copy LaTeX code');
@@ -208,7 +206,7 @@ function initializeCopyButtons() {
208206
await navigator.clipboard.writeText(code);
209207
this.textContent = 'Copied!';
210208
setTimeout(() => {
211-
this.textContent = 'Copy Extended LaTeX';
209+
this.textContent = 'Copy ai-attestation.tex Content';
212210
}, 2000);
213211
} catch (err) {
214212
alert('Failed to copy LaTeX code');

0 commit comments

Comments
 (0)