From 740807684ef1bcfb202b8820c88bad4ea8018c2e Mon Sep 17 00:00:00 2001 From: Harald Schilly Date: Wed, 8 Oct 2025 11:13:50 +0200 Subject: [PATCH 1/3] frontend/latex/output: change auto forward/inverse sync icons --- .../frame-editors/latex-editor/output-control-sync.tsx | 9 +++------ src/packages/util/consts/ui.ts | 6 ++++++ 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/src/packages/frontend/frame-editors/latex-editor/output-control-sync.tsx b/src/packages/frontend/frame-editors/latex-editor/output-control-sync.tsx index 8bd844a69ee..24dff2f6e05 100644 --- a/src/packages/frontend/frame-editors/latex-editor/output-control-sync.tsx +++ b/src/packages/frontend/frame-editors/latex-editor/output-control-sync.tsx @@ -15,6 +15,7 @@ import { defineMessage, useIntl } from "react-intl"; import { Button as BSButton } from "@cocalc/frontend/antd-bootstrap"; import { useRedux } from "@cocalc/frontend/app-framework"; import { HelpIcon, Icon, Tip } from "@cocalc/frontend/components"; +import { SYNC_FORWARD_ICON, SYNC_INVERSE_ICON } from "@cocalc/util/consts/ui"; import { Actions } from "./actions"; @@ -183,7 +184,7 @@ export function SyncControls({ onClick={() => handleAutoSyncChange("autoSyncInverse")} style={{ padding: CONTROL_BUTTON_PADDING }} > - + handleAutoSyncChange("autoSyncForward")} style={{ padding: CONTROL_BUTTON_PADDING }} > - + Date: Wed, 8 Oct 2025 15:58:43 +0200 Subject: [PATCH 2/3] frontend/latex/output: change auto forward/inverse sync icons; also in help text --- .../latex-editor/output-control-sync.tsx | 16 ++++++++++------ src/packages/frontend/i18n/trans/ar_EG.json | 4 +++- src/packages/frontend/i18n/trans/de_DE.json | 4 +++- src/packages/frontend/i18n/trans/es_ES.json | 4 +++- src/packages/frontend/i18n/trans/es_PV.json | 4 +++- src/packages/frontend/i18n/trans/fr_FR.json | 4 +++- src/packages/frontend/i18n/trans/he_IL.json | 4 +++- src/packages/frontend/i18n/trans/hi_IN.json | 4 +++- src/packages/frontend/i18n/trans/hu_HU.json | 4 +++- src/packages/frontend/i18n/trans/it_IT.json | 4 +++- src/packages/frontend/i18n/trans/ja_JP.json | 4 +++- src/packages/frontend/i18n/trans/ko_KR.json | 4 +++- src/packages/frontend/i18n/trans/nl_NL.json | 4 +++- src/packages/frontend/i18n/trans/pl_PL.json | 4 +++- src/packages/frontend/i18n/trans/pt_BR.json | 4 +++- src/packages/frontend/i18n/trans/pt_PT.json | 4 +++- src/packages/frontend/i18n/trans/ru_RU.json | 4 +++- src/packages/frontend/i18n/trans/tr_TR.json | 4 +++- src/packages/frontend/i18n/trans/zh_CN.json | 4 +++- 19 files changed, 64 insertions(+), 24 deletions(-) diff --git a/src/packages/frontend/frame-editors/latex-editor/output-control-sync.tsx b/src/packages/frontend/frame-editors/latex-editor/output-control-sync.tsx index 24dff2f6e05..364889e4535 100644 --- a/src/packages/frontend/frame-editors/latex-editor/output-control-sync.tsx +++ b/src/packages/frontend/frame-editors/latex-editor/output-control-sync.tsx @@ -14,7 +14,7 @@ import { defineMessage, useIntl } from "react-intl"; import { Button as BSButton } from "@cocalc/frontend/antd-bootstrap"; import { useRedux } from "@cocalc/frontend/app-framework"; -import { HelpIcon, Icon, Tip } from "@cocalc/frontend/components"; +import { HelpIcon, Icon, Text, Tip } from "@cocalc/frontend/components"; import { SYNC_FORWARD_ICON, SYNC_INVERSE_ICON } from "@cocalc/util/consts/ui"; import { Actions } from "./actions"; @@ -53,17 +53,17 @@ const SYNC_HELP_MSG = { id: "editor.latex.pdf_controls.sync_help.content", defaultMessage: `

Manual Mode:

    -
  • Use ALT+Return in source document to jump to corresponding PDF location
  • +
  • Use Alt+Return (Option+Return on Mac) in source document to jump to corresponding PDF location
  • Double-click in PDF or the "Sync" button for inverse search to source

Automatic Mode:

    -
  • Forward Sync (→): Syncs automatically from cursor changes in source to PDF
  • -
  • Inverse Sync (←): Moving the PDF viewport moves the cursor in source
  • +
  • Forward Sync ({forwardIcon}): Syncs automatically from cursor position changes in source to PDF
  • +
  • Inverse Sync ({inverseIcon}): Scrolling the PDF changes the cursor position in source

This functionality uses SyncTeX to coordinate between LaTeX source and PDF output.

`, description: - "Complete explanation of LaTeX sync functionality including manual and automatic modes", + "Explanation of LaTeX sync functionality including manual and automatic modes", }), }; @@ -219,7 +219,11 @@ export function SyncControls({ title={intl.formatMessage(SYNC_HELP_MSG.title)} placement="bottomLeft" > - {intl.formatMessage(SYNC_HELP_MSG.content)} + {intl.formatMessage(SYNC_HELP_MSG.content, { + forwardIcon: String.fromCharCode(SYNC_FORWARD_ICON), + inverseIcon: String.fromCharCode(SYNC_INVERSE_ICON), + KB: (ch) => {ch}, + })} )} diff --git a/src/packages/frontend/i18n/trans/ar_EG.json b/src/packages/frontend/i18n/trans/ar_EG.json index 4d97c3de33e..a33b06e6863 100644 --- a/src/packages/frontend/i18n/trans/ar_EG.json +++ b/src/packages/frontend/i18n/trans/ar_EG.json @@ -595,7 +595,7 @@ "editor.latex.pdf_controls.forward_sync.tooltip": "المزامنة التلقائية من المصدر إلى PDF: تحريك المؤشر يحرك ملف PDF", "editor.latex.pdf_controls.inverse_sync.tooltip": "المزامنة التلقائية من PDF إلى المصدر: تحريك التمرير في PDF يحرك المؤشر", "editor.latex.pdf_controls.sync_button.tooltip": "مزامنة عكسية لمرة واحدة إلى محرر المصدر", - "editor.latex.pdf_controls.sync_help.content": "

الوضع اليدوي:

  • استخدم ALT+Return في المستند المصدر للقفز إلى الموقع المقابل في PDF
  • انقر نقرًا مزدوجًا في PDF أو على زر \"المزامنة\" للبحث العكسي في المصدر

الوضع التلقائي:

  • المزامنة الأمامية (→): تقوم بالمزامنة تلقائيًا من تغييرات المؤشر في المصدر إلى PDF
  • المزامنة العكسية (←): تحريك عرض PDF يحرك المؤشر في المصدر

تستخدم هذه الوظيفة SyncTeX للتنسيق بين مصدر LaTeX ومخرجات PDF.

", + "editor.latex.pdf_controls.sync_help.content": "

الوضع اليدوي:

  • استخدم Alt+Return (Option+Return على ماك) في المستند المصدر للانتقال إلى الموقع المقابل في PDF
  • انقر نقرًا مزدوجًا في PDF أو زر \"المزامنة\" للبحث العكسي إلى المصدر

الوضع التلقائي:

  • المزامنة الأمامية ({forwardIcon}): تتم المزامنة تلقائيًا من تغييرات موضع المؤشر في المصدر إلى PDF
  • المزامنة العكسية ({inverseIcon}): يؤدي التمرير في PDF إلى تغيير موضع المؤشر في المصدر

تستخدم هذه الوظيفة SyncTeX للتنسيق بين مصدر LaTeX وإخراج PDF.

", "editor.latex.pdf_controls.sync_help.title": "مساعدة مزامنة LaTeX", "editor.latex.pdf_embed.title": "PDF - أصلي", "editor.latex.pdf_embed.title.short": "PDF (native)", @@ -608,6 +608,8 @@ "editor.table_of_contents.name": "جدول المحتويات", "editor.table_of_contents.short": "المحتويات", "editor.terminal.cmd.help.title": "عرض الوثائق لاستخدام محطة لينكس في CoCalc", + "editor.toggle_pdf_dark_mode.label": "تبديل وضع PDF الداكن", + "editor.toggle_pdf_dark_mode.title": "إيقاف الوضع الداكن لملف PDF لرؤية الملف الأصلي", "file_actions.compress.name": "ضغط", "file_actions.copy.name": "نسخ", "file_actions.create.name": "إنشاء", diff --git a/src/packages/frontend/i18n/trans/de_DE.json b/src/packages/frontend/i18n/trans/de_DE.json index b6111059c09..1278077108f 100644 --- a/src/packages/frontend/i18n/trans/de_DE.json +++ b/src/packages/frontend/i18n/trans/de_DE.json @@ -595,7 +595,7 @@ "editor.latex.pdf_controls.forward_sync.tooltip": "Automatische Synchronisierung vom Quelltext zum PDF: Cursorbewegungen scrollen das PDF", "editor.latex.pdf_controls.inverse_sync.tooltip": "Automatische Synchronisierung von PDF zur Quelle: PDF-Scrollen bewegt den Cursor", "editor.latex.pdf_controls.sync_button.tooltip": "Einmalige inverse Synchronisation mit dem Quell-Editor", - "editor.latex.pdf_controls.sync_help.content": "

Manueller Modus:

  • Verwenden Sie ALT+Return im Quelldokument, um zur entsprechenden PDF-Position zu springen
  • Doppelklicken Sie im PDF oder auf die Schaltfläche \"Sync\" für die inverse Suche zur Quelle

Automatischer Modus:

  • Vorwärtssynchronisierung (→): Synchronisiert automatisch von Cursoränderungen in der Quelle zum PDF
  • Inverse Synchronisierung (←): Verschieben des PDF-Ansichtsbereichs verschiebt den Cursor in der Quelle

Diese Funktionalität verwendet SyncTeX, um zwischen LaTeX-Quelle und PDF-Ausgabe zu koordinieren.

", + "editor.latex.pdf_controls.sync_help.content": "

Manueller Modus:

  • Verwenden Sie Alt+Return (Option+Return auf Mac) im Quelldokument, um zur entsprechenden PDF-Position zu springen
  • Doppelklicken Sie im PDF oder auf die \"Sync\"-Schaltfläche für inverse Suche zur Quelle

Automatischer Modus:

  • Vorwärtssynchronisierung ({forwardIcon}): Synchronisiert automatisch von Cursorpositionsänderungen in der Quelle zum PDF
  • Inverse Synchronisierung ({inverseIcon}): Durch Scrollen im PDF ändert sich die Cursorposition in der Quelle

Diese Funktionalität verwendet SyncTeX, um zwischen LaTeX-Quelle und PDF-Ausgabe zu koordinieren.

", "editor.latex.pdf_controls.sync_help.title": "LaTeX-Synchronisierungshilfe", "editor.latex.pdf_embed.title": "PDF - Native", "editor.latex.pdf_embed.title.short": "PDF (nativ)", @@ -608,6 +608,8 @@ "editor.table_of_contents.name": "Inhaltsverzeichnis", "editor.table_of_contents.short": "Inhalt", "editor.terminal.cmd.help.title": "Öffne die Dokumentation für die Nutzung des Linux-Terminals in CoCalc.", + "editor.toggle_pdf_dark_mode.label": "PDF-Dunkelmodus umschalten", + "editor.toggle_pdf_dark_mode.title": "Schalten Sie den Dunkelmodus der PDF aus, um die Originaldatei zu sehen", "file_actions.compress.name": "Komprimieren", "file_actions.copy.name": "Kopieren", "file_actions.create.name": "Erstellen", diff --git a/src/packages/frontend/i18n/trans/es_ES.json b/src/packages/frontend/i18n/trans/es_ES.json index d0c012113cd..08e04b3dc63 100644 --- a/src/packages/frontend/i18n/trans/es_ES.json +++ b/src/packages/frontend/i18n/trans/es_ES.json @@ -595,7 +595,7 @@ "editor.latex.pdf_controls.forward_sync.tooltip": "Auto-sincronización de fuente a PDF: el cursor mueve el desplazamiento del PDF", "editor.latex.pdf_controls.inverse_sync.tooltip": "Sincronización automática de PDF a fuente: el desplazamiento del PDF mueve el cursor", "editor.latex.pdf_controls.sync_button.tooltip": "Sincronización inversa única con el editor de origen", - "editor.latex.pdf_controls.sync_help.content": "

Modo Manual:

  • Usa ALT+Return en el documento fuente para saltar a la ubicación correspondiente en el PDF
  • Haz doble clic en el PDF o en el botón \"Sincronizar\" para buscar inversamente en la fuente

Modo Automático:

  • Sincronización directa (→): Sincroniza automáticamente los cambios de cursor en la fuente al PDF
  • Sincronización inversa (←): Mover la vista del PDF mueve el cursor en la fuente

Esta funcionalidad utiliza SyncTeX para coordinar entre la fuente LaTeX y la salida PDF.

", + "editor.latex.pdf_controls.sync_help.content": "

Modo Manual:

  • Usa Alt+Return (Option+Return en Mac) en el documento fuente para saltar a la ubicación correspondiente en el PDF
  • Haz doble clic en el PDF o en el botón \"Sync\" para la búsqueda inversa en la fuente

Modo Automático:

  • Sincronización Directa ({forwardIcon}): Sincroniza automáticamente desde los cambios de posición del cursor en la fuente al PDF
  • Sincronización Inversa ({inverseIcon}): Desplazar el PDF cambia la posición del cursor en la fuente

Esta funcionalidad utiliza SyncTeX para coordinar entre la fuente LaTeX y la salida PDF.

", "editor.latex.pdf_controls.sync_help.title": "Ayuda de sincronización de LaTeX", "editor.latex.pdf_embed.title": "PDF - Nativo", "editor.latex.pdf_embed.title.short": "PDF (nativo)", @@ -608,6 +608,8 @@ "editor.table_of_contents.name": "Tabla de Contenidos", "editor.table_of_contents.short": "Contenido", "editor.terminal.cmd.help.title": "Mostrar documentación para usar el Terminal de Linux en CoCalc", + "editor.toggle_pdf_dark_mode.label": "Alternar modo oscuro de PDF", + "editor.toggle_pdf_dark_mode.title": "Desactivar el modo oscuro del PDF para ver el archivo original", "file_actions.compress.name": "Comprimir", "file_actions.copy.name": "Copiar", "file_actions.create.name": "Crear", diff --git a/src/packages/frontend/i18n/trans/es_PV.json b/src/packages/frontend/i18n/trans/es_PV.json index d1596da796c..d0363df2adb 100644 --- a/src/packages/frontend/i18n/trans/es_PV.json +++ b/src/packages/frontend/i18n/trans/es_PV.json @@ -595,7 +595,7 @@ "editor.latex.pdf_controls.forward_sync.tooltip": "Iturburutik PDFra auto-sinkronizazioa: kurtsorea mugitzean PDFa korritzen da", "editor.latex.pdf_controls.inverse_sync.tooltip": "Auto-sinkronizazioa PDFtik iturburura: PDFa korritzeak kurtsorea mugitzen du", "editor.latex.pdf_controls.sync_button.tooltip": "Aldibaterako alderantzizko sinkronizazioa iturburu editorearekin", - "editor.latex.pdf_controls.sync_help.content": "

Eskuzko modua:

  • Erabili ALT+Return iturburu dokumentuan dagokion PDF kokapenera jauzi egiteko
  • Egin klik bikoitza PDFan edo \"Sinkronizatu\" botoian iturburura alderantzizko bilaketa egiteko

Modu automatikoa:

  • Aurrerako Sinkronizazioa (→): Iturburuko kurtsore aldaketetatik PDFra automatikoki sinkronizatzen da
  • Alderantzizko Sinkronizazioa (←): PDF ikuspegi-leihoa mugitzean iturburuko kurtsorea mugitzen da

Funtzionalitate honek SyncTeX erabiltzen du LaTeX iturburuaren eta PDF irteeraren artean koordinatzeko.

", + "editor.latex.pdf_controls.sync_help.content": "

Eskuzko Modua:

  • Erabili Alt+Return (Option+Return Mac-en) iturburu dokumentuan dagokion PDF kokapenera jauzi egiteko
  • Egin klik bikoitza PDF-an edo \"Sinkronizatu\" botoian iturburura alderantzizko bilaketa egiteko

Modu Automatikoa:

  • Aurrerako Sinkronizazioa ({forwardIcon}): Automatikoki sinkronizatzen da iturburuko kurtsorearen posizio aldaketetatik PDF-ra
  • Alderantzizko Sinkronizazioa ({inverseIcon}): PDF-a korritzeak iturburuan kurtsorearen posizioa aldatzen du

Funtzionalitate honek SyncTeX erabiltzen du LaTeX iturburuaren eta PDF irteeraren artean koordinatzeko.

", "editor.latex.pdf_controls.sync_help.title": "LaTeX Sinkronizazio Laguntza", "editor.latex.pdf_embed.title": "PDF - Natifoa", "editor.latex.pdf_embed.title.short": "PDF (natiboa)", @@ -608,6 +608,8 @@ "editor.table_of_contents.name": "Edukiaren Taula", "editor.table_of_contents.short": "Edukia", "editor.terminal.cmd.help.title": "Erakutsi dokumentazioa Linux Terminala CoCalc-en erabiltzeko.", + "editor.toggle_pdf_dark_mode.label": "Aldatu PDF Modu Ilunera", + "editor.toggle_pdf_dark_mode.title": "PDFaren ilunpeko modua desaktibatu, jatorrizko fitxategia ikusteko", "file_actions.compress.name": "Konprimitu", "file_actions.copy.name": "Kopiatu", "file_actions.create.name": "Sortu", diff --git a/src/packages/frontend/i18n/trans/fr_FR.json b/src/packages/frontend/i18n/trans/fr_FR.json index fef7197a2fa..bcdb904020a 100644 --- a/src/packages/frontend/i18n/trans/fr_FR.json +++ b/src/packages/frontend/i18n/trans/fr_FR.json @@ -595,7 +595,7 @@ "editor.latex.pdf_controls.forward_sync.tooltip": "Synchronisation automatique de la source au PDF : le défilement du curseur déplace le PDF", "editor.latex.pdf_controls.inverse_sync.tooltip": "Synchronisation automatique du PDF vers la source : le défilement du PDF déplace le curseur", "editor.latex.pdf_controls.sync_button.tooltip": "Synchronisation inverse unique vers l'éditeur source", - "editor.latex.pdf_controls.sync_help.content": "

Mode manuel :

  • Utilisez ALT+Entrée dans le document source pour sauter à l'emplacement PDF correspondant
  • Double-cliquez dans le PDF ou sur le bouton \"Sync\" pour rechercher inversement dans la source

Mode automatique :

  • Synchronisation avant (→) : Synchronise automatiquement les modifications du curseur dans la source vers le PDF
  • Synchronisation inverse (←) : Déplacer la vue du PDF déplace le curseur dans la source

Cette fonctionnalité utilise SyncTeX pour coordonner entre la source LaTeX et la sortie PDF.

", + "editor.latex.pdf_controls.sync_help.content": "

Mode Manuel :

  • Utilisez Alt+Retour (Option+Retour sur Mac) dans le document source pour sauter à l'emplacement correspondant dans le PDF
  • Double-cliquez dans le PDF ou sur le bouton \"Sync\" pour la recherche inverse vers la source

Mode Automatique :

  • Synchronisation Avant ({forwardIcon}): Synchronise automatiquement des changements de position du curseur dans la source vers le PDF
  • Synchronisation Inverse ({inverseIcon}): Faire défiler le PDF change la position du curseur dans la source

Cette fonctionnalité utilise SyncTeX pour coordonner entre le source LaTeX et la sortie PDF.

", "editor.latex.pdf_controls.sync_help.title": "Aide à la synchronisation LaTeX", "editor.latex.pdf_embed.title": "PDF - Natif", "editor.latex.pdf_embed.title.short": "PDF (natif)", @@ -608,6 +608,8 @@ "editor.table_of_contents.name": "Table des matières", "editor.table_of_contents.short": "Contenu", "editor.terminal.cmd.help.title": "Afficher la documentation pour utiliser le terminal Linux dans CoCalc.", + "editor.toggle_pdf_dark_mode.label": "Basculer le mode sombre PDF", + "editor.toggle_pdf_dark_mode.title": "Désactiver le mode sombre du PDF pour voir le fichier original", "file_actions.compress.name": "Compresser", "file_actions.copy.name": "Copier", "file_actions.create.name": "Créer", diff --git a/src/packages/frontend/i18n/trans/he_IL.json b/src/packages/frontend/i18n/trans/he_IL.json index ff3c51e3482..9520dfb5827 100644 --- a/src/packages/frontend/i18n/trans/he_IL.json +++ b/src/packages/frontend/i18n/trans/he_IL.json @@ -595,7 +595,7 @@ "editor.latex.pdf_controls.forward_sync.tooltip": "סנכרון אוטומטי ממקור ל-PDF: הזזת הסמן מגלגלת את ה-PDF", "editor.latex.pdf_controls.inverse_sync.tooltip": "סנכרון אוטומטי מ-PDF למקור: גלילת ה-PDF מזיזה את הסמן", "editor.latex.pdf_controls.sync_button.tooltip": "סנכרון הפוך חד-פעמי לעורך המקור", - "editor.latex.pdf_controls.sync_help.content": "

מצב ידני:

  • השתמש ב-ALT+Return במסמך המקור כדי לקפוץ למיקום המתאים ב-PDF
  • לחץ פעמיים ב-PDF או על כפתור \"סנכרון\" לחיפוש הפוך למקור

מצב אוטומטי:

  • סנכרון קדימה (→): מסנכרן אוטומטית משינויים בסמן במקור ל-PDF
  • סנכרון הפוך (←): תזוזת התצוגה ב-PDF מזיזה את הסמן במקור

פונקציונליות זו משתמשת ב-SyncTeX כדי לתאם בין מקור LaTeX לפלט PDF.

", + "editor.latex.pdf_controls.sync_help.content": "

מצב ידני:

  • השתמש ב-Alt+Return (Option+Return במק) במסמך המקור כדי לקפוץ למיקום המתאים ב-PDF
  • לחץ פעמיים ב-PDF או על כפתור \"סנכרון\" לחיפוש הפוך למקור

מצב אוטומטי:

  • סנכרון קדימה ({forwardIcon}): מסנכרן אוטומטית משינויים במיקום הסמן במקור ל-PDF
  • סנכרון הפוך ({inverseIcon}): גלילת ה-PDF משנה את מיקום הסמן במקור

פונקציונליות זו משתמשת ב-SyncTeX כדי לתאם בין מקור LaTeX לפלט PDF.

", "editor.latex.pdf_controls.sync_help.title": "עזרה לסנכרון LaTeX", "editor.latex.pdf_embed.title": "PDF - ילידי", "editor.latex.pdf_embed.title.short": "PDF (מקורי)", @@ -608,6 +608,8 @@ "editor.table_of_contents.name": "תוכן העניינים", "editor.table_of_contents.short": "תוכן", "editor.terminal.cmd.help.title": "הצג תיעוד לשימוש בטרמינל לינוקס ב-CoCalc", + "editor.toggle_pdf_dark_mode.label": "החלף מצב כהה עבור PDF", + "editor.toggle_pdf_dark_mode.title": "כבה את מצב החושך של ה-PDF, כדי לראות את הקובץ המקורי", "file_actions.compress.name": "דחוס", "file_actions.copy.name": "העתק", "file_actions.create.name": "צור", diff --git a/src/packages/frontend/i18n/trans/hi_IN.json b/src/packages/frontend/i18n/trans/hi_IN.json index 07f370dc0e7..5ab58d16cdd 100644 --- a/src/packages/frontend/i18n/trans/hi_IN.json +++ b/src/packages/frontend/i18n/trans/hi_IN.json @@ -595,7 +595,7 @@ "editor.latex.pdf_controls.forward_sync.tooltip": "स्रोत से PDF के लिए ऑटो-सिंक: कर्सर चलाएं PDF को स्क्रॉल करें", "editor.latex.pdf_controls.inverse_sync.tooltip": "पीडीएफ से स्रोत तक ऑटो-सिंक: पीडीएफ स्क्रॉलिंग कर्सर को स्थानांतरित करती है", "editor.latex.pdf_controls.sync_button.tooltip": "स्रोत संपादक के लिए एक बार का उल्टा समन्वयन", - "editor.latex.pdf_controls.sync_help.content": "

मैन्युअल मोड:

  • स्रोत दस्तावेज़ में ALT+Return का उपयोग करके संबंधित PDF स्थान पर जाएं
  • PDF में डबल-क्लिक करें या स्रोत के लिए इनवर्स सर्च हेतु \"सिंक\" बटन दबाएं

स्वचालित मोड:

  • फॉरवर्ड सिंक (→): स्रोत में कर्सर परिवर्तन से PDF तक स्वतः सिंक करता है
  • इनवर्स सिंक (←): PDF व्यूइंग क्षेत्र को हिलाने से स्रोत में कर्सर हिलता है

यह कार्यक्षमता LaTeX स्रोत और PDF आउटपुट के बीच समन्वय के लिए SyncTeX का उपयोग करती है।

", + "editor.latex.pdf_controls.sync_help.content": "

मैनुअल मोड:

  • स्रोत दस्तावेज़ में संबंधित PDF स्थान पर जाने के लिए Alt+Return (Option+Return मैक पर) का उपयोग करें
  • स्रोत की ओर उलट खोज के लिए PDF में डबल-क्लिक करें या \"सिंक\" बटन का उपयोग करें

स्वचालित मोड:

  • फॉरवर्ड सिंक ({forwardIcon}): स्रोत में कर्सर स्थिति परिवर्तन से PDF तक स्वचालित रूप से सिंक होता है
  • इनवर्स सिंक ({inverseIcon}): PDF स्क्रॉलिंग से स्रोत में कर्सर स्थिति बदलती है

यह कार्यक्षमता LaTeX स्रोत और PDF आउटपुट के बीच समन्वय के लिए SyncTeX का उपयोग करती है।

", "editor.latex.pdf_controls.sync_help.title": "LaTeX सिंक सहायता", "editor.latex.pdf_embed.title": "PDF - नेटिव", "editor.latex.pdf_embed.title.short": "पीडीएफ (मूल)", @@ -608,6 +608,8 @@ "editor.table_of_contents.name": "सामग्री सूची", "editor.table_of_contents.short": "सामग्री", "editor.terminal.cmd.help.title": "CoCalc में Linux टर्मिनल का उपयोग करने के लिए दस्तावेज़ दिखाएं.", + "editor.toggle_pdf_dark_mode.label": "पीडीएफ डार्क मोड टॉगल करें", + "editor.toggle_pdf_dark_mode.title": "पीडीएफ के डार्क मोड को बंद करें, मूल फ़ाइल देखने के लिए", "file_actions.compress.name": "संपीड़ित करें", "file_actions.copy.name": "कॉपी", "file_actions.create.name": "बनाएँ", diff --git a/src/packages/frontend/i18n/trans/hu_HU.json b/src/packages/frontend/i18n/trans/hu_HU.json index 1cdddfad1c4..e67d114da13 100644 --- a/src/packages/frontend/i18n/trans/hu_HU.json +++ b/src/packages/frontend/i18n/trans/hu_HU.json @@ -595,7 +595,7 @@ "editor.latex.pdf_controls.forward_sync.tooltip": "Automatikus szinkronizálás forrásból PDF-be: a kurzor mozgatása görgeti a PDF-et", "editor.latex.pdf_controls.inverse_sync.tooltip": "Automatikus szinkronizálás PDF-ről forrásra: a PDF görgetése mozgatja a kurzort", "editor.latex.pdf_controls.sync_button.tooltip": "Egyszeri fordított szinkronizálás a forrásszerkesztőbe", - "editor.latex.pdf_controls.sync_help.content": "

Kézi mód:

  • Használja az ALT+Return billentyűket a forrásdokumentumban, hogy a megfelelő PDF helyre ugorjon
  • Kattintson duplán a PDF-ben vagy a \"Sync\" gombra, hogy visszakeressen a forráshoz

Automatikus mód:

  • Előre szinkronizálás (→): Automatikusan szinkronizál a kurzor változásaitól a forrásból a PDF-be
  • Visszafelé szinkronizálás (←): Ha a PDF nézetablakot mozgatja, a kurzor a forrásban mozog

Ez a funkció a SyncTeX-et használja a LaTeX forrás és a PDF kimenet közötti koordinációhoz.

", + "editor.latex.pdf_controls.sync_help.content": "

Kézi mód:

  • Használja a Alt+Return (Option+Return Mac-en) parancsot a forrásdokumentumban, hogy az adott PDF helyre ugorjon
  • Dupla kattintás a PDF-en vagy a \"Sync\" gomb az inverz kereséshez a forrásban

Automatikus mód:

  • Előre szinkronizálás ({forwardIcon}): Automatikusan szinkronizál a kurzor pozíciójának változásakor a forrásból a PDF-be
  • Inverz szinkronizálás ({inverseIcon}): A PDF görgetése megváltoztatja a kurzor pozícióját a forrásban

Ez a funkció a SyncTeX-et használja a LaTeX forrás és a PDF kimenet közötti koordinációhoz.

", "editor.latex.pdf_controls.sync_help.title": "LaTeX szinkronizálási súgó", "editor.latex.pdf_embed.title": "PDF - Natív", "editor.latex.pdf_embed.title.short": "PDF (natív)", @@ -608,6 +608,8 @@ "editor.table_of_contents.name": "Tartalomjegyzék", "editor.table_of_contents.short": "Tartalom", "editor.terminal.cmd.help.title": "Dokumentáció megjelenítése a Linux terminál használatához a CoCalc-ban.", + "editor.toggle_pdf_dark_mode.label": "PDF sötét mód váltása", + "editor.toggle_pdf_dark_mode.title": "Kapcsolja ki a PDF sötét módját, hogy lássa az eredeti fájlt", "file_actions.compress.name": "Tömörít", "file_actions.copy.name": "Másolás", "file_actions.create.name": "Létrehozás", diff --git a/src/packages/frontend/i18n/trans/it_IT.json b/src/packages/frontend/i18n/trans/it_IT.json index c9737e19686..77a853d94c8 100644 --- a/src/packages/frontend/i18n/trans/it_IT.json +++ b/src/packages/frontend/i18n/trans/it_IT.json @@ -595,7 +595,7 @@ "editor.latex.pdf_controls.forward_sync.tooltip": "Sincronizzazione automatica da sorgente a PDF: il cursore scorre il PDF", "editor.latex.pdf_controls.inverse_sync.tooltip": "Sincronizzazione automatica da PDF a sorgente: lo scorrimento del PDF sposta il cursore", "editor.latex.pdf_controls.sync_button.tooltip": "Sincronizzazione inversa una tantum all'editor di origine", - "editor.latex.pdf_controls.sync_help.content": "

Modalità Manuale:

  • Usa ALT+Return nel documento sorgente per saltare alla posizione corrispondente nel PDF
  • Fai doppio clic nel PDF o sul pulsante \"Sync\" per la ricerca inversa alla sorgente

Modalità Automatica:

  • Sync Avanti (→): Sincronizza automaticamente dai cambiamenti del cursore nella sorgente al PDF
  • Sync Inverso (←): Spostare la visualizzazione del PDF sposta il cursore nella sorgente

Questa funzionalità utilizza SyncTeX per coordinare tra il sorgente LaTeX e l'output PDF.

", + "editor.latex.pdf_controls.sync_help.content": "

Modalità manuale:

  • Usa Alt+Return (Option+Return su Mac) nel documento sorgente per passare alla posizione corrispondente nel PDF
  • Fai doppio clic nel PDF o sul pulsante \"Sync\" per la ricerca inversa al sorgente

Modalità automatica:

  • Sincronizzazione diretta ({forwardIcon}): Sincronizza automaticamente dalle modifiche della posizione del cursore nel sorgente al PDF
  • Sincronizzazione inversa ({inverseIcon}): Scorrendo il PDF cambia la posizione del cursore nel sorgente

Questa funzionalità utilizza SyncTeX per coordinare tra il sorgente LaTeX e l'output PDF.

", "editor.latex.pdf_controls.sync_help.title": "Aiuto Sincronizzazione LaTeX", "editor.latex.pdf_embed.title": "PDF - Nativo", "editor.latex.pdf_embed.title.short": "PDF (nativo)", @@ -608,6 +608,8 @@ "editor.table_of_contents.name": "Indice", "editor.table_of_contents.short": "Contenuti", "editor.terminal.cmd.help.title": "Mostra la documentazione per l'utilizzo del Terminale Linux in CoCalc.", + "editor.toggle_pdf_dark_mode.label": "Attiva/disattiva modalità scura PDF", + "editor.toggle_pdf_dark_mode.title": "Disattiva la modalità scura del PDF per vedere il file originale", "file_actions.compress.name": "Comprimi", "file_actions.copy.name": "Copia", "file_actions.create.name": "Crea", diff --git a/src/packages/frontend/i18n/trans/ja_JP.json b/src/packages/frontend/i18n/trans/ja_JP.json index 334106d5929..fa844abb889 100644 --- a/src/packages/frontend/i18n/trans/ja_JP.json +++ b/src/packages/frontend/i18n/trans/ja_JP.json @@ -595,7 +595,7 @@ "editor.latex.pdf_controls.forward_sync.tooltip": "ソースからPDFへの自動同期: カーソルが移動するとPDFがスクロールします", "editor.latex.pdf_controls.inverse_sync.tooltip": "PDFからソースへの自動同期: PDFのスクロールでカーソルが移動します", "editor.latex.pdf_controls.sync_button.tooltip": "ソースエディタへの一度限りの逆同期", - "editor.latex.pdf_controls.sync_help.content": "

手動モード:

  • ソースドキュメントで ALT+Return を使用して対応するPDFの位置にジャンプします
  • PDF内をダブルクリックまたは「同期」ボタンで逆方向の検索をソースに行います

自動モード:

  • 順方向同期 (→): ソース内のカーソル変更からPDFへ自動で同期します
  • 逆方向同期 (←): PDFのビューポートを移動するとソース内のカーソルが移動します

この機能はSyncTeXを使用してLaTeXソースとPDF出力を連携させます。

", + "editor.latex.pdf_controls.sync_help.content": "

手動モード:

  • ソースドキュメントでAlt+Return(MacではOption+Return)を使用して対応するPDFの位置にジャンプ
  • PDFをダブルクリックするか、「Sync」ボタンをクリックして逆検索をソースに行う

自動モード:

  • 順方向同期 ({forwardIcon}):ソースでのカーソル位置の変更からPDFへの同期を自動的に行う
  • 逆方向同期 ({inverseIcon}):PDFをスクロールするとソースのカーソル位置が変更される

この機能は、LaTeXソースとPDF出力の間を調整するためにSyncTeXを使用します。

", "editor.latex.pdf_controls.sync_help.title": "LaTeX同期ヘルプ", "editor.latex.pdf_embed.title": "PDF - ネイティブ", "editor.latex.pdf_embed.title.short": "PDF(ネイティブ)", @@ -608,6 +608,8 @@ "editor.table_of_contents.name": "目次", "editor.table_of_contents.short": "目次", "editor.terminal.cmd.help.title": "CoCalcでLinuxターミナルを使用するためのドキュメントを表示。", + "editor.toggle_pdf_dark_mode.label": "PDFダークモードを切り替え", + "editor.toggle_pdf_dark_mode.title": "PDFのダークモードをオフにして、元のファイルを表示", "file_actions.compress.name": "圧縮", "file_actions.copy.name": "コピー", "file_actions.create.name": "作成", diff --git a/src/packages/frontend/i18n/trans/ko_KR.json b/src/packages/frontend/i18n/trans/ko_KR.json index b0b3ff3d4d5..b9c3db2a399 100644 --- a/src/packages/frontend/i18n/trans/ko_KR.json +++ b/src/packages/frontend/i18n/trans/ko_KR.json @@ -595,7 +595,7 @@ "editor.latex.pdf_controls.forward_sync.tooltip": "소스에서 PDF로 자동 동기화: 커서 이동 시 PDF 스크롤", "editor.latex.pdf_controls.inverse_sync.tooltip": "PDF에서 소스로 자동 동기화: PDF 스크롤이 커서를 이동시킵니다", "editor.latex.pdf_controls.sync_button.tooltip": "소스 편집기로 일회성 역동기화", - "editor.latex.pdf_controls.sync_help.content": "

수동 모드:

  • 소스 문서에서 ALT+Return을 사용하여 해당 PDF 위치로 이동
  • PDF에서 더블 클릭하거나 \"동기화\" 버튼을 눌러 소스로 역검색

자동 모드:

  • 전방 동기화 (→): 소스의 커서 변경 사항을 PDF로 자동 동기화
  • 역방 동기화 (←): PDF 뷰포트를 이동하면 소스의 커서가 이동

이 기능은 LaTeX 소스와 PDF 출력 간의 조정을 위해 SyncTeX를 사용합니다.

", + "editor.latex.pdf_controls.sync_help.content": "

수동 모드:

  • 소스 문서에서 Alt+Return (Option+Return on Mac)을 사용하여 해당 PDF 위치로 이동
  • PDF에서 더블 클릭하거나 \"동기화\" 버튼을 사용하여 소스를 역방향 검색

자동 모드:

  • 앞방향 동기화 ({forwardIcon}): 소스의 커서 위치 변경 시 자동으로 PDF와 동기화
  • 역방향 동기화 ({inverseIcon}): PDF 스크롤 시 소스의 커서 위치가 변경됨

이 기능은 LaTeX 소스와 PDF 출력 간의 조정을 위해 SyncTeX를 사용합니다.

", "editor.latex.pdf_controls.sync_help.title": "LaTeX 동기화 도움말", "editor.latex.pdf_embed.title": "PDF - 본래", "editor.latex.pdf_embed.title.short": "PDF (네이티브)", @@ -608,6 +608,8 @@ "editor.table_of_contents.name": "목차", "editor.table_of_contents.short": "목차", "editor.terminal.cmd.help.title": "CoCalc에서 Linux 터미널 사용 설명서 보기", + "editor.toggle_pdf_dark_mode.label": "PDF 다크 모드 전환", + "editor.toggle_pdf_dark_mode.title": "PDF의 다크 모드를 끄고 원본 파일을 확인하세요", "file_actions.compress.name": "압축", "file_actions.copy.name": "복사", "file_actions.create.name": "생성", diff --git a/src/packages/frontend/i18n/trans/nl_NL.json b/src/packages/frontend/i18n/trans/nl_NL.json index 07e5b6b4767..08782822bd2 100644 --- a/src/packages/frontend/i18n/trans/nl_NL.json +++ b/src/packages/frontend/i18n/trans/nl_NL.json @@ -595,7 +595,7 @@ "editor.latex.pdf_controls.forward_sync.tooltip": "Auto-sync van bron naar PDF: cursor beweegt scrollt de PDF", "editor.latex.pdf_controls.inverse_sync.tooltip": "Automatisch synchroniseren van PDF naar bron: PDF scrollen verplaatst de cursor", "editor.latex.pdf_controls.sync_button.tooltip": "Eenmalige inverse synchronisatie naar de broneditor", - "editor.latex.pdf_controls.sync_help.content": "

Handmatige modus:

  • Gebruik ALT+Return in het brondocument om naar de overeenkomstige PDF-locatie te springen
  • Dubbelklik in de PDF of op de \"Sync\"-knop voor inverse zoekopdracht naar de bron

Automatische modus:

  • Voorwaartse synchronisatie (→): Synchroniseert automatisch van cursorwijzigingen in de bron naar PDF
  • Inverse synchronisatie (←): Het verplaatsen van het PDF-venster verplaatst de cursor in de bron

Deze functionaliteit gebruikt SyncTeX om te coördineren tussen LaTeX-bron en PDF-uitvoer.

", + "editor.latex.pdf_controls.sync_help.content": "

Handmatige Modus:

  • Gebruik Alt+Return (Option+Return op Mac) in het bronbestand om naar de overeenkomstige locatie in de PDF te springen
  • Dubbelklik in de PDF of de \"Sync\"-knop voor inverse zoekopdracht naar de bron

Automatische Modus:

  • Voorwaartse Sync ({forwardIcon}): Synchroniseert automatisch van cursorpositie veranderingen in de bron naar de PDF
  • Inverse Sync ({inverseIcon}): Scrollen in de PDF wijzigt de cursorpositie in de bron

Deze functionaliteit gebruikt SyncTeX om te coördineren tussen LaTeX-bron en PDF-uitvoer.

", "editor.latex.pdf_controls.sync_help.title": "LaTeX Sync Hulp", "editor.latex.pdf_embed.title": "PDF - Native", "editor.latex.pdf_embed.title.short": "PDF (native)", @@ -608,6 +608,8 @@ "editor.table_of_contents.name": "Inhoudsopgave", "editor.table_of_contents.short": "Inhoud", "editor.terminal.cmd.help.title": "Toon documentatie voor het gebruik van de Linux Terminal in CoCalc.", + "editor.toggle_pdf_dark_mode.label": "Schakel PDF Donkere Modus in", + "editor.toggle_pdf_dark_mode.title": "Donkere modus van PDF uitschakelen om het originele bestand te zien", "file_actions.compress.name": "Comprimeer", "file_actions.copy.name": "Kopiëren", "file_actions.create.name": "Creëer", diff --git a/src/packages/frontend/i18n/trans/pl_PL.json b/src/packages/frontend/i18n/trans/pl_PL.json index 0fcc6645ac3..ee2974c908b 100644 --- a/src/packages/frontend/i18n/trans/pl_PL.json +++ b/src/packages/frontend/i18n/trans/pl_PL.json @@ -595,7 +595,7 @@ "editor.latex.pdf_controls.forward_sync.tooltip": "Automatyczna synchronizacja ze źródła do PDF: kursor przesuwa przewijanie PDF", "editor.latex.pdf_controls.inverse_sync.tooltip": "Auto-sync z PDF do źródła: przewijanie PDF przesuwa kursor", "editor.latex.pdf_controls.sync_button.tooltip": "Jednorazowa synchronizacja wsteczna do edytora źródłowego", - "editor.latex.pdf_controls.sync_help.content": "

Tryb ręczny:

  • Użyj ALT+Return w dokumencie źródłowym, aby przeskoczyć do odpowiadającej lokalizacji w PDF
  • Kliknij dwukrotnie w PDF lub przycisk \"Synchronizuj\" dla wyszukiwania odwrotnego do źródła

Tryb automatyczny:

  • Synchronizacja do przodu (→): Automatycznie synchronizuje zmiany kursora w źródle z PDF
  • Synchronizacja odwrotna (←): Przesuwanie widoku PDF przesuwa kursor w źródle

Ta funkcjonalność wykorzystuje SyncTeX do koordynacji między źródłem LaTeX a wyjściem PDF.

", + "editor.latex.pdf_controls.sync_help.content": "

Tryb ręczny:

  • Użyj Alt+Return (Option+Return na Macu) w dokumencie źródłowym, aby przejść do odpowiedniej lokalizacji w PDF
  • Kliknij dwukrotnie w PDF lub przycisk „Sync”, aby wykonać odwrotne wyszukiwanie w źródle

Tryb automatyczny:

  • Synchronizacja do przodu ({forwardIcon}): Automatyczna synchronizacja zmian pozycji kursora ze źródła do PDF
  • Synchronizacja odwrotna ({inverseIcon}): Przewijanie PDF zmienia pozycję kursora w źródle

Ta funkcjonalność wykorzystuje SyncTeX do koordynacji między źródłem LaTeX a wyjściem PDF.

", "editor.latex.pdf_controls.sync_help.title": "Pomoc synchronizacji LaTeX", "editor.latex.pdf_embed.title": "PDF - Rodzimy", "editor.latex.pdf_embed.title.short": "PDF (rodzimy)", @@ -608,6 +608,8 @@ "editor.table_of_contents.name": "Spis treści", "editor.table_of_contents.short": "Spis treści", "editor.terminal.cmd.help.title": "Pokaż dokumentację dotyczącą używania terminala Linux w CoCalc", + "editor.toggle_pdf_dark_mode.label": "Przełącz Tryb Ciemny PDF", + "editor.toggle_pdf_dark_mode.title": "Wyłącz tryb ciemny PDF, aby zobaczyć oryginalny plik", "file_actions.compress.name": "Kompresuj", "file_actions.copy.name": "Kopiuj", "file_actions.create.name": "Utwórz", diff --git a/src/packages/frontend/i18n/trans/pt_BR.json b/src/packages/frontend/i18n/trans/pt_BR.json index 681223b7e34..2595f0ef8f5 100644 --- a/src/packages/frontend/i18n/trans/pt_BR.json +++ b/src/packages/frontend/i18n/trans/pt_BR.json @@ -595,7 +595,7 @@ "editor.latex.pdf_controls.forward_sync.tooltip": "Sincronização automática da fonte para PDF: movimentos do cursor rolam o PDF", "editor.latex.pdf_controls.inverse_sync.tooltip": "Sincronização automática do PDF para a fonte: rolar o PDF move o cursor", "editor.latex.pdf_controls.sync_button.tooltip": "Sincronização inversa única para o editor de origem", - "editor.latex.pdf_controls.sync_help.content": "

Modo Manual:

  • Use ALT+Return no documento de origem para pular para a localização correspondente no PDF
  • Clique duas vezes no PDF ou no botão \"Sync\" para busca inversa para a origem

Modo Automático:

  • Sincronização Direta (→): Sincroniza automaticamente das mudanças do cursor na origem para o PDF
  • Sincronização Inversa (←): Movendo a visualização do PDF move o cursor na origem

Essa funcionalidade usa SyncTeX para coordenar entre a origem LaTeX e a saída PDF.

", + "editor.latex.pdf_controls.sync_help.content": "

Modo Manual:

  • Use Alt+Return (Option+Return no Mac) no documento fonte para pular para a localização correspondente no PDF
  • Clique duas vezes no PDF ou no botão \"Sync\" para pesquisa inversa na fonte

Modo Automático:

  • Sincronização Direta ({forwardIcon}): Sincroniza automaticamente a partir das mudanças de posição do cursor na fonte para o PDF
  • Sincronização Inversa ({inverseIcon}): Rolagem do PDF altera a posição do cursor na fonte

Esta funcionalidade utiliza SyncTeX para coordenar entre a fonte LaTeX e o resultado em PDF.

", "editor.latex.pdf_controls.sync_help.title": "Ajuda de Sincronização LaTeX", "editor.latex.pdf_embed.title": "PDF - Nativo", "editor.latex.pdf_embed.title.short": "PDF (nativo)", @@ -608,6 +608,8 @@ "editor.table_of_contents.name": "Índice", "editor.table_of_contents.short": "Conteúdo", "editor.terminal.cmd.help.title": "Mostrar documentação para usar o Terminal Linux no CoCalc.", + "editor.toggle_pdf_dark_mode.label": "Alternar Modo Escuro do PDF", + "editor.toggle_pdf_dark_mode.title": "Desativar o modo escuro do PDF para ver o arquivo original", "file_actions.compress.name": "Comprimir", "file_actions.copy.name": "Copiar", "file_actions.create.name": "Criar", diff --git a/src/packages/frontend/i18n/trans/pt_PT.json b/src/packages/frontend/i18n/trans/pt_PT.json index 07a15d7cbd2..c058d567c4d 100644 --- a/src/packages/frontend/i18n/trans/pt_PT.json +++ b/src/packages/frontend/i18n/trans/pt_PT.json @@ -595,7 +595,7 @@ "editor.latex.pdf_controls.forward_sync.tooltip": "Sincronização automática da origem para o PDF: mover o cursor faz rolar o PDF", "editor.latex.pdf_controls.inverse_sync.tooltip": "Sincronização automática do PDF para a fonte: deslocar o PDF move o cursor", "editor.latex.pdf_controls.sync_button.tooltip": "Sincronização inversa única para o editor de origem", - "editor.latex.pdf_controls.sync_help.content": "

Modo Manual:

  • Use ALT+Return no documento de origem para saltar para a localização correspondente no PDF
  • Clique duas vezes no PDF ou no botão \"Sincronizar\" para pesquisa inversa para a origem

Modo Automático:

  • Sincronização Direta (→): Sincroniza automaticamente as alterações do cursor na origem para o PDF
  • Sincronização Inversa (←): Mover a vista do PDF move o cursor na origem

Esta funcionalidade usa SyncTeX para coordenar entre a origem LaTeX e a saída PDF.

", + "editor.latex.pdf_controls.sync_help.content": "

Modo Manual:

  • Use Alt+Return (Option+Return no Mac) no documento de origem para saltar para a localização correspondente no PDF
  • Clique duas vezes no PDF ou no botão \"Sincronizar\" para pesquisa inversa na origem

Modo Automático:

  • Sincronização Direta ({forwardIcon}): Sincroniza automaticamente a partir de alterações na posição do cursor na origem para o PDF
  • Sincronização Inversa ({inverseIcon}): Ao percorrer o PDF, a posição do cursor na origem é alterada

Esta funcionalidade utiliza SyncTeX para coordenar entre a fonte LaTeX e a saída PDF.

", "editor.latex.pdf_controls.sync_help.title": "Ajuda de Sincronização LaTeX", "editor.latex.pdf_embed.title": "PDF - Nativo", "editor.latex.pdf_embed.title.short": "PDF (nativo)", @@ -608,6 +608,8 @@ "editor.table_of_contents.name": "Índice", "editor.table_of_contents.short": "Conteúdos", "editor.terminal.cmd.help.title": "Mostrar documentação para usar o Terminal Linux no CoCalc", + "editor.toggle_pdf_dark_mode.label": "Alternar Modo Escuro do PDF", + "editor.toggle_pdf_dark_mode.title": "Desativar o modo escuro do PDF, para ver o ficheiro original", "file_actions.compress.name": "Comprimir", "file_actions.copy.name": "Copiar", "file_actions.create.name": "Criar", diff --git a/src/packages/frontend/i18n/trans/ru_RU.json b/src/packages/frontend/i18n/trans/ru_RU.json index 4e8cca91e34..7fbe7b52124 100644 --- a/src/packages/frontend/i18n/trans/ru_RU.json +++ b/src/packages/frontend/i18n/trans/ru_RU.json @@ -595,7 +595,7 @@ "editor.latex.pdf_controls.forward_sync.tooltip": "Автосинхронизация из источника в PDF: перемещение курсора прокручивает PDF", "editor.latex.pdf_controls.inverse_sync.tooltip": "Автосинхронизация из PDF в исходник: прокрутка PDF перемещает курсор", "editor.latex.pdf_controls.sync_button.tooltip": "Одноразовая обратная синхронизация с исходным редактором", - "editor.latex.pdf_controls.sync_help.content": "

Ручной режим:

  • Используйте ALT+Return в исходном документе, чтобы перейти к соответствующему месту в PDF
  • Дважды щелкните в PDF или кнопку \"Синхронизация\" для обратного поиска в исходнике

Автоматический режим:

  • Прямая синхронизация (→): Автоматически синхронизирует изменения курсора в исходнике с PDF
  • Обратная синхронизация (←): Перемещение области просмотра PDF перемещает курсор в исходнике

Эта функция использует SyncTeX для координации между исходным кодом LaTeX и выводом PDF.

", + "editor.latex.pdf_controls.sync_help.content": "

Ручной режим:

  • Используйте Alt+Return (Option+Return на Mac) в исходном документе, чтобы перейти к соответствующему месту в PDF
  • Дважды щелкните на PDF или на кнопку \"Синхронизировать\" для обратного поиска в исходник

Автоматический режим:

  • Прямая синхронизация ({forwardIcon}): Автоматически синхронизирует изменения позиции курсора в исходнике с PDF
  • Обратная синхронизация ({inverseIcon}): Прокрутка PDF изменяет позицию курсора в исходнике

Эта функциональность использует SyncTeX для координации между исходным кодом LaTeX и PDF-выводом.

", "editor.latex.pdf_controls.sync_help.title": "Справка по синхронизации LaTeX", "editor.latex.pdf_embed.title": "PDF - Оригинал", "editor.latex.pdf_embed.title.short": "PDF (родной)", @@ -608,6 +608,8 @@ "editor.table_of_contents.name": "Оглавление", "editor.table_of_contents.short": "Содержание", "editor.terminal.cmd.help.title": "Показать документацию по использованию терминала Linux в CoCalc", + "editor.toggle_pdf_dark_mode.label": "Переключить тёмный режим PDF", + "editor.toggle_pdf_dark_mode.title": "Выключите темный режим PDF, чтобы увидеть оригинальный файл", "file_actions.compress.name": "Сжать", "file_actions.copy.name": "Копировать", "file_actions.create.name": "Создать", diff --git a/src/packages/frontend/i18n/trans/tr_TR.json b/src/packages/frontend/i18n/trans/tr_TR.json index 6e90758db08..b8e0e243eaa 100644 --- a/src/packages/frontend/i18n/trans/tr_TR.json +++ b/src/packages/frontend/i18n/trans/tr_TR.json @@ -595,7 +595,7 @@ "editor.latex.pdf_controls.forward_sync.tooltip": "Kaynaktan PDF'ye otomatik senkronizasyon: imleç hareketleri PDF'yi kaydırır", "editor.latex.pdf_controls.inverse_sync.tooltip": "PDF'den kaynağa otomatik senkronizasyon: PDF kaydırma imleci hareket ettirir", "editor.latex.pdf_controls.sync_button.tooltip": "Kaynak düzenleyiciye tek seferlik ters senkronizasyon", - "editor.latex.pdf_controls.sync_help.content": "

Manuel Mod:

  • Kaynak belgede ilgili PDF konumuna atlamak için ALT+Return kullanın
  • PDF'de çift tıklayın veya kaynağa ters arama için \"Sync\" düğmesini kullanın

Otomatik Mod:

  • İleri Eşitleme (→): Kaynaktaki imleç değişikliklerinden PDF'ye otomatik olarak eşitlenir
  • Ters Eşitleme (←): PDF görünüm alanını hareket ettirmek, kaynaktaki imleci hareket ettirir

Bu işlevsellik, LaTeX kaynağı ile PDF çıktısı arasında eşgüdüm sağlamak için SyncTeX kullanır.

", + "editor.latex.pdf_controls.sync_help.content": "

Manuel Mod:

  • Kaynak belgede Alt+Return (Option+Return Mac'te) kullanarak ilgili PDF konumuna atlayın
  • PDF'de çift tıklayın veya kaynak dosyaya ters arama için \"Senkronize Et\" butonunu kullanın

Otomatik Mod:

  • İleri Senkronizasyon ({forwardIcon}): Kaynakta imleç konumu değişikliklerinden PDF'ye otomatik olarak senkronize eder
  • Ters Senkronizasyon ({inverseIcon}): PDF'yi kaydırmak kaynakta imleç konumunu değiştirir

Bu işlevsellik, LaTeX kaynağı ve PDF çıktısı arasında koordinasyon sağlamak için SyncTeX kullanır.

", "editor.latex.pdf_controls.sync_help.title": "LaTeX Senkronizasyon Yardımı", "editor.latex.pdf_embed.title": "PDF - Yerel", "editor.latex.pdf_embed.title.short": "PDF (yerel)", @@ -608,6 +608,8 @@ "editor.table_of_contents.name": "İçindekiler", "editor.table_of_contents.short": "İçindekiler", "editor.terminal.cmd.help.title": "CoCalc'ta Linux Terminalini kullanma belgelerini göster.", + "editor.toggle_pdf_dark_mode.label": "PDF Koyu Modu Değiştir", + "editor.toggle_pdf_dark_mode.title": "PDF'nin karanlık modunu kapat, orijinal dosyayı görmek için", "file_actions.compress.name": "Sıkıştır", "file_actions.copy.name": "Kopyala", "file_actions.create.name": "Oluştur", diff --git a/src/packages/frontend/i18n/trans/zh_CN.json b/src/packages/frontend/i18n/trans/zh_CN.json index 58624606e69..13737772113 100644 --- a/src/packages/frontend/i18n/trans/zh_CN.json +++ b/src/packages/frontend/i18n/trans/zh_CN.json @@ -595,7 +595,7 @@ "editor.latex.pdf_controls.forward_sync.tooltip": "从源自动同步到PDF:光标移动滚动PDF", "editor.latex.pdf_controls.inverse_sync.tooltip": "从PDF自动同步到源:PDF滚动移动光标", "editor.latex.pdf_controls.sync_button.tooltip": "一次性反向同步到源编辑器", - "editor.latex.pdf_controls.sync_help.content": "

手动模式:

  • 在源文档中使用 ALT+Return 跳转到相应的 PDF 位置
  • 双击 PDF 或点击“同步”按钮进行反向搜索到源文档

自动模式:

  • 正向同步 (→):光标变化时自动从源文档同步到 PDF
  • 反向同步 (←):移动 PDF 视图会移动源文档中的光标

此功能使用 SyncTeX 在 LaTeX 源代码和 PDF 输出之间进行协调。

", + "editor.latex.pdf_controls.sync_help.content": "

手动模式:

  • 在源文档中使用Alt+Return(Mac 上为Option+Return)跳转到相应的 PDF 位置
  • 在 PDF 中双击或点击“同步”按钮进行反向搜索到源文档

自动模式:

  • 前向同步 ({forwardIcon}):从源文档中的光标位置变化自动同步到 PDF
  • 反向同步 ({inverseIcon}):滚动 PDF 会改变源文档中的光标位置

此功能使用 SyncTeX 协调 LaTeX 源文件和 PDF 输出。

", "editor.latex.pdf_controls.sync_help.title": "LaTeX同步帮助", "editor.latex.pdf_embed.title": "PDF - 原生", "editor.latex.pdf_embed.title.short": "PDF(原生)", @@ -608,6 +608,8 @@ "editor.table_of_contents.name": "目录", "editor.table_of_contents.short": "内容", "editor.terminal.cmd.help.title": "显示在 CoCalc 中使用 Linux 终端的文档", + "editor.toggle_pdf_dark_mode.label": "切换 PDF 暗模式", + "editor.toggle_pdf_dark_mode.title": "关闭PDF的暗模式,以查看原始文件", "file_actions.compress.name": "压缩", "file_actions.copy.name": "复制", "file_actions.create.name": "创建", From 018fede02d3eb93cc2d003b3b3a8b5d93c1cba86 Mon Sep 17 00:00:00 2001 From: Harald Schilly Date: Thu, 9 Oct 2025 10:32:30 +0200 Subject: [PATCH 3/3] frontend/latex: reinstate explicit update_pdf calls, with debouncing, and manual PDF reload in output controls --- .../frame-editors/latex-editor/actions.ts | 54 +++++++++++++++---- .../latex-editor/output-control-build.tsx | 11 ++++ .../frame-editors/latex-editor/pdf-watcher.ts | 3 +- 3 files changed, 56 insertions(+), 12 deletions(-) diff --git a/src/packages/frontend/frame-editors/latex-editor/actions.ts b/src/packages/frontend/frame-editors/latex-editor/actions.ts index db39725cc32..0261fed9dbf 100644 --- a/src/packages/frontend/frame-editors/latex-editor/actions.ts +++ b/src/packages/frontend/frame-editors/latex-editor/actions.ts @@ -144,6 +144,9 @@ export class Actions extends BaseActions { // PDF file watcher - watches directory for PDF file changes private pdf_watcher?: PDFWatcher; + // Debounced version - initialized in _init2() + update_pdf: (time: number, force: boolean) => void; + // Auto-sync function for cursor position changes (forward sync: source → PDF) private async handle_cursor_sync_to_pdf( line: number, @@ -179,6 +182,11 @@ export class Actions extends BaseActions { _init2(): void { this.set_gutter = this.set_gutter.bind(this); + // Debounce update_pdf with 500ms delay, trailing only, has to work when PDF watcher fires during the build + this.update_pdf = debounce(this._update_pdf.bind(this), 500, { + leading: false, + trailing: true, + }); if (!this.is_public) { this.init_bad_filename(); this.init_ext_filename(); // safe to set before syncstring init @@ -210,7 +218,10 @@ export class Actions extends BaseActions { this.pdf_watcher = new PDFWatcher( this.project_id, pdfPath, - this.update_pdf.bind(this), + // We ignore the PDFs timestamp (mtime) and use last_save_time for consistency with build-triggered updates + (_mtime: number, force: boolean) => { + this.update_pdf(this.last_save_time(), force); + }, ); await this.pdf_watcher.init(); } @@ -882,13 +893,15 @@ export class Actions extends BaseActions { if (this._has_frame_of_type("word_count")) { run_word_count = this.word_count(time, force); } - await this.run_latex(time, force); + // update_pdf=false, because it is deferred until the end + await this.run_latex(time, force, false); // ... and then patch the synctex file to align the source line numberings if (this.knitr) { await this.run_patch_synctex(time, force); } const s = this.store.unsafe_getIn(["build_logs", "latex", "stdout"]); + let update_pdf = true; if (typeof s == "string") { const is_sagetex = s.indexOf("sagetex.sty") != -1; const is_pythontex = @@ -896,8 +909,9 @@ export class Actions extends BaseActions { if (is_sagetex || is_pythontex) { if (this.ensure_output_directory_disabled()) { // rebuild if build command changed - await this.run_latex(time, true); + await this.run_latex(time, true, false); } + update_pdf = false; if (is_sagetex) { await this.run_sagetex(time, force); } @@ -908,6 +922,12 @@ export class Actions extends BaseActions { } } + // we suppress a cycle of loading the PDF if sagetex or pythontex runs above + // because these two trigger a rebuild and update_pdf on their own at the end + if (update_pdf) { + this.update_pdf(time, force); + } + if (run_word_count != null) { // and finally, wait for word count to finish -- to make clear the whole operation is done await run_word_count; @@ -994,7 +1014,11 @@ export class Actions extends BaseActions { } } - private async run_latex(time: number, force: boolean): Promise { + private async run_latex( + time: number, + force: boolean, + update_pdf: boolean = true, + ): Promise { if (this.is_stopping) return; let output: BuildLog; let build_command: string | string[]; @@ -1051,6 +1075,10 @@ export class Actions extends BaseActions { this.check_for_fatal_error(); this.update_gutters(); this.update_gutters_soon(); + // Explicit PDF reload after latex compilation + if (update_pdf) { + this.update_pdf(time, force); + } } // this *merges* errors from log into an eventually already existing this.parsed_output_log @@ -1186,7 +1214,7 @@ export class Actions extends BaseActions { }); } - update_pdf(time: number, force: boolean): void { + private _update_pdf(time: number, force: boolean): void { const timestamp = this.make_timestamp(time, force); // forget currently cached pdf this._forget_pdf_document(); @@ -1230,11 +1258,13 @@ export class Actions extends BaseActions { this.get_output_directory(), ); if (hash === this._last_sagetex_hash) { - // no change - nothing to do + // no change - nothing to do except updating the pdf preview + this.update_pdf(time, force); return; } } catch (err) { this.set_error(err); + this.update_pdf(time, force); return; } finally { this.set_status(""); @@ -1264,6 +1294,7 @@ export class Actions extends BaseActions { await this.run_latex(time + 1, force); } catch (err) { this.set_error(err); + this.update_pdf(time, force); } finally { this._last_sagetex_hash = hash; this.set_status(""); @@ -1303,6 +1334,7 @@ export class Actions extends BaseActions { } catch (err) { this.set_error(err); // this.setState({ pythontex_error: true }); + this.update_pdf(time, force); return; } finally { this.set_status(""); @@ -1469,15 +1501,15 @@ export class Actions extends BaseActions { _get_most_recent_output_panel(): string | undefined { let result = this._get_most_recent_active_frame_id_of_type("output"); - console.log( - "LaTeX: _get_most_recent_output_panel() via active history returning", - result, - ); + // console.log( + // "LaTeX: _get_most_recent_output_panel() via active history returning", + // result, + // ); // If no recently active output panel found, look for any output panel if (!result) { result = this._get_any_frame_id_of_type("output"); - console.log("LaTeX: _get_any_frame_id_of_type() returning", result); + //console.log("LaTeX: _get_any_frame_id_of_type() returning", result); } return result; diff --git a/src/packages/frontend/frame-editors/latex-editor/output-control-build.tsx b/src/packages/frontend/frame-editors/latex-editor/output-control-build.tsx index f571f6ae4b6..a4ad5aa6a71 100644 --- a/src/packages/frontend/frame-editors/latex-editor/output-control-build.tsx +++ b/src/packages/frontend/frame-editors/latex-editor/output-control-build.tsx @@ -22,6 +22,7 @@ import { BUILD_ON_SAVE_ICON_ENABLED, BUILD_ON_SAVE_LABEL, } from "@cocalc/frontend/frame-editors/frame-tree/commands/generic-commands"; +import { server_time } from "@cocalc/frontend/frame-editors/generic/client"; import { editor, IntlMessage } from "@cocalc/frontend/i18n"; import { DARK_MODE_ICON } from "@cocalc/util/consts/ui"; @@ -67,6 +68,10 @@ export function BuildControls({ actions, id, narrow }: BuildControlsProps) { set_account_table({ editor_settings: { build_on_save: !buildOnSave } }); }; + const handleReloadPdf = () => { + actions.update_pdf(server_time().valueOf(), true); + }; + const buildMenuItems: MenuProps["items"] = [ { key: "force-build", @@ -83,6 +88,12 @@ export function BuildControls({ actions, id, narrow }: BuildControlsProps) { { type: "divider", }, + { + key: "reload-pdf", + label: "Reload PDF", + icon: , + onClick: handleReloadPdf, + }, { key: "download-pdf", label: intl.formatMessage(COMMANDS.download_pdf.label as IntlMessage), diff --git a/src/packages/frontend/frame-editors/latex-editor/pdf-watcher.ts b/src/packages/frontend/frame-editors/latex-editor/pdf-watcher.ts index 337380c01c0..7a2a09e618f 100644 --- a/src/packages/frontend/frame-editors/latex-editor/pdf-watcher.ts +++ b/src/packages/frontend/frame-editors/latex-editor/pdf-watcher.ts @@ -50,10 +50,11 @@ export class PDFWatcher { // Listen for directory changes this.directory_listings.on("change", async (paths: string[]) => { + if (this.directory_listings == null) return; if (paths.includes(this.watch_dir)) { try { const updatedFiles: DirectoryListingEntry[] | undefined = - await this.directory_listings!.get(this.watch_dir); + await this.directory_listings.get(this.watch_dir); const updatedPdfFile = updatedFiles?.find( (f) => f.name === this.pdf_filename, );