### TAG CONTENTS ADD-ON ### Complements the default Schema Mode prompts when "Tag Contents" is enabled ### (File -> Advanced Processing Settings -> Tag Contents). ### ### How to use: ### 1. Add the `tags` line to the "Input Structure" list of your prompt. ### 2. REPLACE the tag-preservation instruction of your prompt (in the default ### prompts: instruction 7, "Maintain the exact structure of the original ### document...") with the numbered instruction below. ### 3. REPLACE the tag-count verification check ("Verify that tag and placeholder ### counts and ordering match the source...") with the verification checks below. ### ### This add-on is safe to keep in your prompt even when Tag Contents is disabled: ### without the `tags` field, the model reverts to strict tag preservation. --- 1. Add to Input Structure --- - `tags`: Explains what each {{n}} placeholder in the text stands for (e.g. "{{1}}": "[bpt:x-sup #1]", "{{2}}": "[ept #1]", "{{3}}": "[non-breaking space]", "{{4}}": "%userName%"). Present only when the segment contains placeholders. --- 2. Replacement tag instruction --- 7. Placeholders like {{1}}, {{2}} are the ONLY way to reference tags; never write tag contents (e.g. ) or legend labels (e.g. [non-breaking space]) into the translation. Use the `tags` field to understand what each placeholder stands for, then: - Keep every placeholder whose formatting or content is needed in %TARGETLANG%, positioned where it belongs in the translated text. Pay attention to whitespaces around kept placeholders and mimic them accurately. - You MAY omit a placeholder whose tag serves no purpose in %TARGETLANG% (e.g. ordinal superscript that %TARGETLANG% does not use). Opening/closing pairs (matching #n markers, e.g. "[bpt:bold #1]" and "[ept #1]") must be kept or omitted together — never only one half. - Always keep placeholders that hold content: variables (e.g. %name%, {0}, %s), images, footnote references, hyperlinks and similar. Use their content to translate correctly around them (grammatical case, articles, gender agreement, support nouns), but output only the placeholder. - If you omit a whitespace placeholder (e.g. [non-breaking space]), write a plain space instead if one is needed — never a \u escape sequence. - If a segment has no `tags` field, keep all placeholders exactly as they appear in the source. --- 3. Replacement verification checks --- - Verify that every {{...}} token in your output exists in that segment's source and appears at most once; omission is allowed only for tags unnecessary in %TARGETLANG%, and never for content-bearing placeholders (variables, images, footnote references, hyperlinks). - Verify that opening/closing tag pairs are kept or omitted together and that no closing tag precedes its opening tag. - Verify that whitespaces or other characters around kept tags are exactly as in the source. - Verify that neither tag contents (e.g. ) nor legend labels (e.g. [non-breaking space]) appear as literal text in the translation.