Skip to content

Commit 61c4059

Browse files
committed
frontend/latex/output: change auto forward/inverse sync icons; also in help text
1 parent 4a230fe commit 61c4059

File tree

19 files changed

+64
-24
lines changed

19 files changed

+64
-24
lines changed

src/packages/frontend/frame-editors/latex-editor/output-control-sync.tsx

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import { defineMessage, useIntl } from "react-intl";
1414

1515
import { Button as BSButton } from "@cocalc/frontend/antd-bootstrap";
1616
import { useRedux } from "@cocalc/frontend/app-framework";
17-
import { HelpIcon, Icon, Tip } from "@cocalc/frontend/components";
17+
import { HelpIcon, Icon, Text, Tip } from "@cocalc/frontend/components";
1818
import { SYNC_FORWARD_ICON, SYNC_INVERSE_ICON } from "@cocalc/util/consts/ui";
1919

2020
import { Actions } from "./actions";
@@ -53,17 +53,17 @@ const SYNC_HELP_MSG = {
5353
id: "editor.latex.pdf_controls.sync_help.content",
5454
defaultMessage: `<p><strong>Manual Mode:</strong></p>
5555
<ul>
56-
<li>Use ALT+Return in source document to jump to corresponding PDF location</li>
56+
<li>Use <KB>Alt+Return</KB> (<KB>Option+Return</KB> on Mac) in source document to jump to corresponding PDF location</li>
5757
<li>Double-click in PDF or the "Sync" button for inverse search to source</li>
5858
</ul>
5959
<p><strong>Automatic Mode:</strong></p>
6060
<ul>
61-
<li>Forward Sync (): Syncs automatically from cursor changes in source to PDF</li>
62-
<li>Inverse Sync (): Moving the PDF viewport moves the cursor in source</li>
61+
<li>Forward Sync ({forwardIcon}): Syncs automatically from cursor position changes in source to PDF</li>
62+
<li>Inverse Sync ({inverseIcon}): Scrolling the PDF changes the cursor position in source</li>
6363
</ul>
6464
<p>This functionality uses SyncTeX to coordinate between LaTeX source and PDF output.</p>`,
6565
description:
66-
"Complete explanation of LaTeX sync functionality including manual and automatic modes",
66+
"Explanation of LaTeX sync functionality including manual and automatic modes",
6767
}),
6868
};
6969

@@ -219,7 +219,11 @@ export function SyncControls({
219219
title={intl.formatMessage(SYNC_HELP_MSG.title)}
220220
placement="bottomLeft"
221221
>
222-
{intl.formatMessage(SYNC_HELP_MSG.content)}
222+
{intl.formatMessage(SYNC_HELP_MSG.content, {
223+
forwardIcon: String.fromCharCode(SYNC_FORWARD_ICON),
224+
inverseIcon: String.fromCharCode(SYNC_INVERSE_ICON),
225+
KB: (ch) => <Text code>{ch}</Text>,
226+
})}
223227
</HelpIcon>
224228
)}
225229
</div>

src/packages/frontend/i18n/trans/ar_EG.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -595,7 +595,7 @@
595595
"editor.latex.pdf_controls.forward_sync.tooltip": "المزامنة التلقائية من المصدر إلى PDF: تحريك المؤشر يحرك ملف PDF",
596596
"editor.latex.pdf_controls.inverse_sync.tooltip": "المزامنة التلقائية من PDF إلى المصدر: تحريك التمرير في PDF يحرك المؤشر",
597597
"editor.latex.pdf_controls.sync_button.tooltip": "مزامنة عكسية لمرة واحدة إلى محرر المصدر",
598-
"editor.latex.pdf_controls.sync_help.content": "<p><strong>الوضع اليدوي:</strong></p> <ul> <li>استخدم ALT+Return في المستند المصدر للقفز إلى الموقع المقابل في PDF</li> <li>انقر نقرًا مزدوجًا في PDF أو على زر \"المزامنة\" للبحث العكسي في المصدر</li> </ul> <p><strong>الوضع التلقائي:</strong></p> <ul> <li>المزامنة الأمامية (): تقوم بالمزامنة تلقائيًا من تغييرات المؤشر في المصدر إلى PDF</li> <li>المزامنة العكسية (): تحريك عرض PDF يحرك المؤشر في المصدر</li> </ul> <p>تستخدم هذه الوظيفة SyncTeX للتنسيق بين مصدر LaTeX ومخرجات PDF.</p>",
598+
"editor.latex.pdf_controls.sync_help.content": "<p><strong>الوضع اليدوي:</strong></p> <ul> <li>استخدم <KB>Alt+Return</KB> (<KB>Option+Return</KB> على ماك) في المستند المصدر للانتقال إلى الموقع المقابل في PDF</li> <li>انقر نقرًا مزدوجًا في PDF أو زر \"المزامنة\" للبحث العكسي إلى المصدر</li> </ul> <p><strong>الوضع التلقائي:</strong></p> <ul> <li>المزامنة الأمامية ({forwardIcon}): تتم المزامنة تلقائيًا من تغييرات موضع المؤشر في المصدر إلى PDF</li> <li>المزامنة العكسية ({inverseIcon}): يؤدي التمرير في PDF إلى تغيير موضع المؤشر في المصدر</li> </ul> <p>تستخدم هذه الوظيفة SyncTeX للتنسيق بين مصدر LaTeX وإخراج PDF.</p>",
599599
"editor.latex.pdf_controls.sync_help.title": "مساعدة مزامنة LaTeX",
600600
"editor.latex.pdf_embed.title": "PDF - أصلي",
601601
"editor.latex.pdf_embed.title.short": "PDF (native)",
@@ -608,6 +608,8 @@
608608
"editor.table_of_contents.name": "جدول المحتويات",
609609
"editor.table_of_contents.short": "المحتويات",
610610
"editor.terminal.cmd.help.title": "عرض الوثائق لاستخدام محطة لينكس في CoCalc",
611+
"editor.toggle_pdf_dark_mode.label": "تبديل وضع PDF الداكن",
612+
"editor.toggle_pdf_dark_mode.title": "إيقاف الوضع الداكن لملف PDF لرؤية الملف الأصلي",
611613
"file_actions.compress.name": "ضغط",
612614
"file_actions.copy.name": "نسخ",
613615
"file_actions.create.name": "إنشاء",

src/packages/frontend/i18n/trans/de_DE.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -595,7 +595,7 @@
595595
"editor.latex.pdf_controls.forward_sync.tooltip": "Automatische Synchronisierung vom Quelltext zum PDF: Cursorbewegungen scrollen das PDF",
596596
"editor.latex.pdf_controls.inverse_sync.tooltip": "Automatische Synchronisierung von PDF zur Quelle: PDF-Scrollen bewegt den Cursor",
597597
"editor.latex.pdf_controls.sync_button.tooltip": "Einmalige inverse Synchronisation mit dem Quell-Editor",
598-
"editor.latex.pdf_controls.sync_help.content": "<p><strong>Manueller Modus:</strong></p> <ul> <li>Verwenden Sie ALT+Return im Quelldokument, um zur entsprechenden PDF-Position zu springen</li> <li>Doppelklicken Sie im PDF oder auf die Schaltfläche \"Sync\" für die inverse Suche zur Quelle</li> </ul> <p><strong>Automatischer Modus:</strong></p> <ul> <li>Vorwärtssynchronisierung (): Synchronisiert automatisch von Cursoränderungen in der Quelle zum PDF</li> <li>Inverse Synchronisierung (): Verschieben des PDF-Ansichtsbereichs verschiebt den Cursor in der Quelle</li> </ul> <p>Diese Funktionalität verwendet SyncTeX, um zwischen LaTeX-Quelle und PDF-Ausgabe zu koordinieren.</p>",
598+
"editor.latex.pdf_controls.sync_help.content": "<p><strong>Manueller Modus:</strong></p> <ul> <li>Verwenden Sie <KB>Alt+Return</KB> (<KB>Option+Return</KB> auf Mac) im Quelldokument, um zur entsprechenden PDF-Position zu springen</li> <li>Doppelklicken Sie im PDF oder auf die \"Sync\"-Schaltfläche für inverse Suche zur Quelle</li> </ul> <p><strong>Automatischer Modus:</strong></p> <ul> <li>Vorwärtssynchronisierung ({forwardIcon}): Synchronisiert automatisch von Cursorpositionsänderungen in der Quelle zum PDF</li> <li>Inverse Synchronisierung ({inverseIcon}): Durch Scrollen im PDF ändert sich die Cursorposition in der Quelle</li> </ul> <p>Diese Funktionalität verwendet SyncTeX, um zwischen LaTeX-Quelle und PDF-Ausgabe zu koordinieren.</p>",
599599
"editor.latex.pdf_controls.sync_help.title": "LaTeX-Synchronisierungshilfe",
600600
"editor.latex.pdf_embed.title": "PDF - Native",
601601
"editor.latex.pdf_embed.title.short": "PDF (nativ)",
@@ -608,6 +608,8 @@
608608
"editor.table_of_contents.name": "Inhaltsverzeichnis",
609609
"editor.table_of_contents.short": "Inhalt",
610610
"editor.terminal.cmd.help.title": "Öffne die Dokumentation für die Nutzung des Linux-Terminals in CoCalc.",
611+
"editor.toggle_pdf_dark_mode.label": "PDF-Dunkelmodus umschalten",
612+
"editor.toggle_pdf_dark_mode.title": "Schalten Sie den Dunkelmodus der PDF aus, um die Originaldatei zu sehen",
611613
"file_actions.compress.name": "Komprimieren",
612614
"file_actions.copy.name": "Kopieren",
613615
"file_actions.create.name": "Erstellen",

src/packages/frontend/i18n/trans/es_ES.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -595,7 +595,7 @@
595595
"editor.latex.pdf_controls.forward_sync.tooltip": "Auto-sincronización de fuente a PDF: el cursor mueve el desplazamiento del PDF",
596596
"editor.latex.pdf_controls.inverse_sync.tooltip": "Sincronización automática de PDF a fuente: el desplazamiento del PDF mueve el cursor",
597597
"editor.latex.pdf_controls.sync_button.tooltip": "Sincronización inversa única con el editor de origen",
598-
"editor.latex.pdf_controls.sync_help.content": "<p><strong>Modo Manual:</strong></p> <ul> <li>Usa ALT+Return en el documento fuente para saltar a la ubicación correspondiente en el PDF</li> <li>Haz doble clic en el PDF o en el botón \"Sincronizar\" para buscar inversamente en la fuente</li> </ul> <p><strong>Modo Automático:</strong></p> <ul> <li>Sincronización directa (→): Sincroniza automáticamente los cambios de cursor en la fuente al PDF</li> <li>Sincronización inversa (←): Mover la vista del PDF mueve el cursor en la fuente</li> </ul> <p>Esta funcionalidad utiliza SyncTeX para coordinar entre la fuente LaTeX y la salida PDF.</p>",
598+
"editor.latex.pdf_controls.sync_help.content": "<p><strong>Modo Manual:</strong></p> <ul> <li>Usa <KB>Alt+Return</KB> (<KB>Option+Return</KB> en Mac) en el documento fuente para saltar a la ubicación correspondiente en el PDF</li> <li>Haz doble clic en el PDF o en el botón \"Sync\" para la búsqueda inversa en la fuente</li> </ul> <p><strong>Modo Automático:</strong></p> <ul> <li>Sincronización Directa ({forwardIcon}): Sincroniza automáticamente desde los cambios de posición del cursor en la fuente al PDF</li> <li>Sincronización Inversa ({inverseIcon}): Desplazar el PDF cambia la posición del cursor en la fuente</li> </ul> <p>Esta funcionalidad utiliza SyncTeX para coordinar entre la fuente LaTeX y la salida PDF.</p>",
599599
"editor.latex.pdf_controls.sync_help.title": "Ayuda de sincronización de LaTeX",
600600
"editor.latex.pdf_embed.title": "PDF - Nativo",
601601
"editor.latex.pdf_embed.title.short": "PDF (nativo)",
@@ -608,6 +608,8 @@
608608
"editor.table_of_contents.name": "Tabla de Contenidos",
609609
"editor.table_of_contents.short": "Contenido",
610610
"editor.terminal.cmd.help.title": "Mostrar documentación para usar el Terminal de Linux en CoCalc",
611+
"editor.toggle_pdf_dark_mode.label": "Alternar modo oscuro de PDF",
612+
"editor.toggle_pdf_dark_mode.title": "Desactivar el modo oscuro del PDF para ver el archivo original",
611613
"file_actions.compress.name": "Comprimir",
612614
"file_actions.copy.name": "Copiar",
613615
"file_actions.create.name": "Crear",

src/packages/frontend/i18n/trans/es_PV.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -595,7 +595,7 @@
595595
"editor.latex.pdf_controls.forward_sync.tooltip": "Iturburutik PDFra auto-sinkronizazioa: kurtsorea mugitzean PDFa korritzen da",
596596
"editor.latex.pdf_controls.inverse_sync.tooltip": "Auto-sinkronizazioa PDFtik iturburura: PDFa korritzeak kurtsorea mugitzen du",
597597
"editor.latex.pdf_controls.sync_button.tooltip": "Aldibaterako alderantzizko sinkronizazioa iturburu editorearekin",
598-
"editor.latex.pdf_controls.sync_help.content": "<p><strong>Eskuzko modua:</strong></p> <ul> <li>Erabili ALT+Return iturburu dokumentuan dagokion PDF kokapenera jauzi egiteko</li> <li>Egin klik bikoitza PDFan edo \"Sinkronizatu\" botoian iturburura alderantzizko bilaketa egiteko</li> </ul> <p><strong>Modu automatikoa:</strong></p> <ul> <li>Aurrerako Sinkronizazioa (): Iturburuko kurtsore aldaketetatik PDFra automatikoki sinkronizatzen da</li> <li>Alderantzizko Sinkronizazioa (): PDF ikuspegi-leihoa mugitzean iturburuko kurtsorea mugitzen da</li> </ul> <p>Funtzionalitate honek SyncTeX erabiltzen du LaTeX iturburuaren eta PDF irteeraren artean koordinatzeko.</p>",
598+
"editor.latex.pdf_controls.sync_help.content": "<p><strong>Eskuzko Modua:</strong></p> <ul> <li>Erabili <KB>Alt+Return</KB> (<KB>Option+Return</KB> Mac-en) iturburu dokumentuan dagokion PDF kokapenera jauzi egiteko</li> <li>Egin klik bikoitza PDF-an edo \"Sinkronizatu\" botoian iturburura alderantzizko bilaketa egiteko</li> </ul> <p><strong>Modu Automatikoa:</strong></p> <ul> <li>Aurrerako Sinkronizazioa ({forwardIcon}): Automatikoki sinkronizatzen da iturburuko kurtsorearen posizio aldaketetatik PDF-ra</li> <li>Alderantzizko Sinkronizazioa ({inverseIcon}): PDF-a korritzeak iturburuan kurtsorearen posizioa aldatzen du</li> </ul> <p>Funtzionalitate honek SyncTeX erabiltzen du LaTeX iturburuaren eta PDF irteeraren artean koordinatzeko.</p>",
599599
"editor.latex.pdf_controls.sync_help.title": "LaTeX Sinkronizazio Laguntza",
600600
"editor.latex.pdf_embed.title": "PDF - Natifoa",
601601
"editor.latex.pdf_embed.title.short": "PDF (natiboa)",
@@ -608,6 +608,8 @@
608608
"editor.table_of_contents.name": "Edukiaren Taula",
609609
"editor.table_of_contents.short": "Edukia",
610610
"editor.terminal.cmd.help.title": "Erakutsi dokumentazioa Linux Terminala CoCalc-en erabiltzeko.",
611+
"editor.toggle_pdf_dark_mode.label": "Aldatu PDF Modu Ilunera",
612+
"editor.toggle_pdf_dark_mode.title": "PDFaren ilunpeko modua desaktibatu, jatorrizko fitxategia ikusteko",
611613
"file_actions.compress.name": "Konprimitu",
612614
"file_actions.copy.name": "Kopiatu",
613615
"file_actions.create.name": "Sortu",

src/packages/frontend/i18n/trans/fr_FR.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -595,7 +595,7 @@
595595
"editor.latex.pdf_controls.forward_sync.tooltip": "Synchronisation automatique de la source au PDF : le défilement du curseur déplace le PDF",
596596
"editor.latex.pdf_controls.inverse_sync.tooltip": "Synchronisation automatique du PDF vers la source : le défilement du PDF déplace le curseur",
597597
"editor.latex.pdf_controls.sync_button.tooltip": "Synchronisation inverse unique vers l'éditeur source",
598-
"editor.latex.pdf_controls.sync_help.content": "<p><strong>Mode manuel :</strong></p> <ul> <li>Utilisez ALT+Entrée dans le document source pour sauter à l'emplacement PDF correspondant</li> <li>Double-cliquez dans le PDF ou sur le bouton \"Sync\" pour rechercher inversement dans la source</li> </ul> <p><strong>Mode automatique :</strong></p> <ul> <li>Synchronisation avant (→) : Synchronise automatiquement les modifications du curseur dans la source vers le PDF</li> <li>Synchronisation inverse (←) : Déplacer la vue du PDF déplace le curseur dans la source</li> </ul> <p>Cette fonctionnalité utilise SyncTeX pour coordonner entre la source LaTeX et la sortie PDF.</p>",
598+
"editor.latex.pdf_controls.sync_help.content": "<p><strong>Mode Manuel :</strong></p> <ul> <li>Utilisez <KB>Alt+Retour</KB> (<KB>Option+Retour</KB> sur Mac) dans le document source pour sauter à l'emplacement correspondant dans le PDF</li> <li>Double-cliquez dans le PDF ou sur le bouton \"Sync\" pour la recherche inverse vers la source</li> </ul> <p><strong>Mode Automatique :</strong></p> <ul> <li>Synchronisation Avant ({forwardIcon}): Synchronise automatiquement des changements de position du curseur dans la source vers le PDF</li> <li>Synchronisation Inverse ({inverseIcon}): Faire défiler le PDF change la position du curseur dans la source</li> </ul> <p>Cette fonctionnalité utilise SyncTeX pour coordonner entre le source LaTeX et la sortie PDF.</p>",
599599
"editor.latex.pdf_controls.sync_help.title": "Aide à la synchronisation LaTeX",
600600
"editor.latex.pdf_embed.title": "PDF - Natif",
601601
"editor.latex.pdf_embed.title.short": "PDF (natif)",
@@ -608,6 +608,8 @@
608608
"editor.table_of_contents.name": "Table des matières",
609609
"editor.table_of_contents.short": "Contenu",
610610
"editor.terminal.cmd.help.title": "Afficher la documentation pour utiliser le terminal Linux dans CoCalc.",
611+
"editor.toggle_pdf_dark_mode.label": "Basculer le mode sombre PDF",
612+
"editor.toggle_pdf_dark_mode.title": "Désactiver le mode sombre du PDF pour voir le fichier original",
611613
"file_actions.compress.name": "Compresser",
612614
"file_actions.copy.name": "Copier",
613615
"file_actions.create.name": "Créer",

src/packages/frontend/i18n/trans/he_IL.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -595,7 +595,7 @@
595595
"editor.latex.pdf_controls.forward_sync.tooltip": "סנכרון אוטומטי ממקור ל-PDF: הזזת הסמן מגלגלת את ה-PDF",
596596
"editor.latex.pdf_controls.inverse_sync.tooltip": "סנכרון אוטומטי מ-PDF למקור: גלילת ה-PDF מזיזה את הסמן",
597597
"editor.latex.pdf_controls.sync_button.tooltip": "סנכרון הפוך חד-פעמי לעורך המקור",
598-
"editor.latex.pdf_controls.sync_help.content": "<p><strong>מצב ידני:</strong></p> <ul> <li>השתמש ב-ALT+Return במסמך המקור כדי לקפוץ למיקום המתאים ב-PDF</li> <li>לחץ פעמיים ב-PDF או על כפתור \"סנכרון\" לחיפוש הפוך למקור</li> </ul> <p><strong>מצב אוטומטי:</strong></p> <ul> <li>סנכרון קדימה (): מסנכרן אוטומטית משינויים בסמן במקור ל-PDF</li> <li>סנכרון הפוך (): תזוזת התצוגה ב-PDF מזיזה את הסמן במקור</li> </ul> <p>פונקציונליות זו משתמשת ב-SyncTeX כדי לתאם בין מקור LaTeX לפלט PDF.</p>",
598+
"editor.latex.pdf_controls.sync_help.content": "<p><strong>מצב ידני:</strong></p> <ul> <li>השתמש ב-<KB>Alt+Return</KB> (<KB>Option+Return</KB> במק) במסמך המקור כדי לקפוץ למיקום המתאים ב-PDF</li> <li>לחץ פעמיים ב-PDF או על כפתור \"סנכרון\" לחיפוש הפוך למקור</li> </ul> <p><strong>מצב אוטומטי:</strong></p> <ul> <li>סנכרון קדימה ({forwardIcon}): מסנכרן אוטומטית משינויים במיקום הסמן במקור ל-PDF</li> <li>סנכרון הפוך ({inverseIcon}): גלילת ה-PDF משנה את מיקום הסמן במקור</li> </ul> <p>פונקציונליות זו משתמשת ב-SyncTeX כדי לתאם בין מקור LaTeX לפלט PDF.</p>",
599599
"editor.latex.pdf_controls.sync_help.title": "עזרה לסנכרון LaTeX",
600600
"editor.latex.pdf_embed.title": "PDF - ילידי",
601601
"editor.latex.pdf_embed.title.short": "PDF (מקורי)",
@@ -608,6 +608,8 @@
608608
"editor.table_of_contents.name": "תוכן העניינים",
609609
"editor.table_of_contents.short": "תוכן",
610610
"editor.terminal.cmd.help.title": "הצג תיעוד לשימוש בטרמינל לינוקס ב-CoCalc",
611+
"editor.toggle_pdf_dark_mode.label": "החלף מצב כהה עבור PDF",
612+
"editor.toggle_pdf_dark_mode.title": "כבה את מצב החושך של ה-PDF, כדי לראות את הקובץ המקורי",
611613
"file_actions.compress.name": "דחוס",
612614
"file_actions.copy.name": "העתק",
613615
"file_actions.create.name": "צור",

0 commit comments

Comments
 (0)