qownnotes / scripts

QOwnNotes script repository
http://www.qownnotes.org
GNU General Public License v3.0
102 stars 78 forks source link

[SUPPORT] LateX Math results in very aliased images #220

Closed ElectronicRU closed 4 months ago

ElectronicRU commented 7 months ago

Script name

LateX Math

Script authors

@r00tr4v3n @Aganel

Expected behavior

I'm using LateX Math script with no config changes other than #000000 foreground. I'm expecting it to look something like inserting an image generated by hand using klatexmath.

Actual behavior

The text is aliased to the point of math operators being unreadable.

Steps to reproduce

Probably not universal and a personal technical issue.

Screenshot from 2024-02-02 02-20-44

Output from the debug section in the settings dialog

QOwnNotes Debug Information

General Info

Current Date: пт февр. 2 02:21:10 2024 Version: 24.1.4 Build date: Jan 18 2024 Build number: 1075 Platform: linux Operating System: Ubuntu 23.10 Build architecture: x86_64 Current architecture: x86_64 Release: Launchpad PPA Qt Version (build): 5.15.10 Qt Version (runtime): 5.15.10 Portable mode: no Settings path / key: /home/alex/.config/PBE/QOwnNotes.conf Application database path: /home/alex/.local/share/PBE/QOwnNotes/QOwnNotes.sqlite Application arguments: /usr/bin/QOwnNotes Qt Debug: 0 Locale (system): en_US Locale (interface): empty Primary screen resolution: 1920x1080 Icon theme: breeze-dark-qownnotes Notes in current note folder: 4 Calendar items: 0 Enabled scripts: 1

Server Info

serverUrl: empty appIsValid: yes notesPathExists: empty serverVersion: empty appVersion: empty

Spellchecking

Enabled: true Selected language: auto Language codes: en_AU, en_CA, en_GB, en_US, en_ZA, ru_RU Language names: Australian English (Australia), Canadian English (Canada), British English (United Kingdom), American English (United States), English (South Africa), русский (Россия) Application dictionaries path: /home/alex/.local/share/PBE/QOwnNotes/dicts

Note folders

currentNoteFolderId: 1

Note folder default

id: 1 isCurrent: yes activeTagId: 0 localPath: /home/alex/Notes remotePath: Notes cloudConnectionId: 1 isShowSubfolders: no isUseGit: no allowDifferentNoteFileName: no activeNoteSubFolder name: empty database file: /home/alex/Notes/notes.sqlite

Cloud connections

Cloud connection Default

id: 1 isCurrent: yes serverUrl: empty username: empty accountId: empty

Enabled scripts

Script Latex Math

id: 1 path: /home/alex/.local/share/PBE/QOwnNotes/scripts/latex-math/latex-math.qml variablesJson:

{
    "customPreamble": "",
    "executable": "/usr/bin/klatexformula",
    "formulaBgColor": "-",
    "formulaColor": "#ffffff",
    "formulaPrefix": "",
    "settingDPI": 1200,
    "settingImageSize": 20,
    "usepackages": "amsmath,amssymb,amsfonts"
}

identifier: latex-math version: 0.0.6 minAppVersion: 20.8.0

Settings

Debug/fakeOldVersionNumber (bool): false Debug/fileLogging (bool): false Editor/CurrentSchemaKey (QString): EditorColorSchema-cdbf28fc-1ddc-4d13-bb21-6a4043316a2f Editor/autoBracketClosing (bool): true Editor/autoBracketRemoval (bool): true Editor/disableCursorBlinking (bool): false Editor/editorWidthInDFMOnly (bool): true Editor/highlightCurrentLine (bool): true Editor/indentSize (int): 4 Editor/removeTrailingSpaces (bool): false Editor/showLineNumbers (bool): false Editor/useTabIndent (bool): false Editor/vimMode (bool): false FileDialog/LastPath (QString): /home/alex FileDialog/LastPath-InsertImage (QString): /home/alex ImageDialog/disableCopying (bool): false ImageDialog/geometry (QByteArray): <binary data> IssueAssistantDialog/geometry (QByteArray): <binary data> LastUpdateCheck (QDateTime): 2024-02-02T01:42:03.820 MainWindow/mainToolBar.iconSize (int): 24 MainWindow/noteTextEdit.code.font (QString): monospace,11,-1,2,50,0,0,0,0,0 MainWindow/noteTextEdit.font (QString): Ubuntu,11,-1,5,50,0,0,0,0,0 MainWindow/noteTextView.code.font (QString): monospace,11,-1,2,50,0,0,0,0,0 MainWindow/noteTextView.font (QString): Ubuntu,11,-1,5,50,0,0,0,0,0 MainWindow/noteTextView.ignoreCodeFontSize (bool): true MainWindow/noteTextView.refreshDebounceTime (int): 600 MainWindow/noteTextView.rtl (bool): false MainWindow/noteTextView.underline (bool): true MainWindow/noteTextView.useEditorStyles (bool): true MainWindow/noteTextView.useInternalExportStyling (bool): true MessageBoxOverride/linux-dark-mode (int): 16384 NoteFolder-1/NoteTabNameList (QStringList): Notes on DzenDzen2 NoteFolder-1/NoteTabStickinessList (QStringList): empty NoteFolder-1/NoteTabSubFolderPathDataList (QStringList): empty NoteHistory-1 (QVariantList): <variant list with 3 item(s)> NoteHistoryCurrentIndex-1 (int): 2 PiwikClientId (QString): <hidden> ScriptRepositoryDialog/geometry (QByteArray): <binary data> ScriptRepositoryDialog/mainSplitterState (QByteArray): <binary data> SearchEngineId (int): 2 SettingsDialog/geometry (QByteArray): <binary data> SettingsDialog/mainSplitterState (QByteArray): <binary data> ShowSystemTray (bool): false StartHidden (bool): false WelcomeDialog/geometry (QByteArray): <binary data> acceptAllExternalModifications (bool): false allowNoteEditing (bool): true allowOnlyOneAppInstance (bool): true appMetrics/disableAppHeartbeat (bool): false appMetrics/disableTracking (bool): false appMetrics/notificationShown (bool): true autoReadOnlyMode (bool): false autoReadOnlyModeTimeout (int): 30 automaticNoteFolderDatabaseClosing (bool): false checkSpelling (bool): true closeTodoListAfterSave (bool): false cryptoKey (qlonglong): <hidden> currentNoteFolderId (int): 1 currentWorkspace (QString): initial cursorWidth (int): 1 darkMode (bool): true darkModeColors (bool): true darkModeIconTheme (bool): true darkModeTrayIcon (bool): true defaultNoteFileExtension (QString): md demoNotesCreated (bool): true disableAutomaticUpdateDialog (bool): true disableSavedSearchesAutoCompletion (bool): false dockWasInitializedOnce (bool): true enableNoteTree (bool): false enableSocketServer (bool): true enableWebAppSupport (bool): false externalEditorPath (QString): empty fullyHighlightedBlockquotes (bool): false gitCommitInterval (int): 30 gitExecutablePath (QString): empty gitLogCommand (QString): empty guiFirstRunInit (bool): true ignoreAllExternalModifications (bool): false ignoreAllExternalNoteFolderChanges (bool): false ignoreNoteSubFolders (QString): ^\. ignoredNoteFiles (QString): empty imageScaleDown (bool): false imageScaleDownMaximumHeight (int): 1024 imageScaleDownMaximumWidth (int): 1024 initialLayoutIdentifier (QString): minimal insertTimeFormat (QString): empty interfaceFontSize (int): 11 interfaceLanguage (QString): empty internalIconTheme (bool): false itemHeight (int): 17 legacyLinking (bool): false localTrash/autoCleanupDays (int): 30 localTrash/autoCleanupEnabled (bool): true localTrash/supportEnabled (bool): true markdownHighlightingEnabled (bool): true navigationPanelAutoSelect (bool): true navigationPanelHideSearch (bool): false networking/ignoreSSLErrors (bool): true networking/proxyType (int): 2 newNoteAskHeadline (bool): false noteEditIsCentralWidget (bool): true noteFileExtensionList (QStringList): md, txt noteListPreview (bool): false noteSaveIntervalTime (int): 10 noteSubfoldersPanelDisplayAsFullTree (bool): true noteSubfoldersPanelHideSearch (bool): false noteSubfoldersPanelOrder (int): 0 noteSubfoldersPanelShowFullPath (bool): false noteSubfoldersPanelShowNotesRecursively (bool): false noteSubfoldersPanelShowRootFolderName (bool): true noteSubfoldersPanelSort (int): 0 noteSubfoldersPanelTabsUnsetAllNotesSelection (bool): false notesPanelOrder (int): 0 notesPanelSort (int): 1 notesPath (QString): /home/alex/Notes notifyAllExternalModifications (bool): false overrideInterfaceFontSize (bool): false ownCloud/supportEnabled (bool): false ownCloud/todoCalendarBackend (int): 3 ownCloud/todoCalendarCalDAVPassword (QString): <hidden> ownCloud/todoCalendarCalDAVServerUrl (QString): empty ownCloud/todoCalendarCalDAVUsername (QString): empty ownCloud/todoCalendarCloudConnectionId (int): 1 ownCloud/todoCalendarDisplayNameList (QStringList): empty ownCloud/todoCalendarEnabledList (QStringList): empty ownCloud/todoCalendarEnabledUrlList (QStringList): empty ownCloud/todoCalendarUrlList (QStringList): empty ownCloudInfo/appIsValid (bool): true ownCloudInfo/connectionErrorMessage (QString): empty ownCloudInfo/notesPathExistsText (QString): empty ownCloudInfo/serverVersion (QString): empty restoreCursorPosition (bool): true restoreLastNoteAtStartup (bool): true restoreNoteTabs (bool): true savedSearches/noteFolder-1 (QStringList): Note 2024-02-02T01.42.35, Notes on DzenDzen2 showMatches (bool): true showMenuBar (bool): true showStatusBar (bool): true spellCheckLanguage (QString): auto startInReadOnlyMode (bool): false systemIconTheme (bool): false taggingShowNotesRecursively (bool): false tagsPanelHideNoteCount (bool): false tagsPanelHideSearch (bool): false tagsPanelOrder (int): 0 tagsPanelSort (int): 0 todoCalendarSupport (bool): true toolbar/1/items (QStringList): action_New_note, action_Find_note, action_Remove_note, action_Open_note_in_external_editor, actionShow_local_trash, actionAllow_note_editing, , action_Back_in_note_history, action_Forward_in_note_history, , action_Find_text_in_note, actionReplace_in_current_note, , actionShow_versions, actionShow_trash, actionShare_note, , actionShow_Todo_List toolbar/1/name (QString): mainToolBar toolbar/1/title (QString): main toolbar toolbar/2/items (QStringList): actionFormat_text_bold, actionFormat_text_italic, actionStrike_out_text, actionInsert_code_block, actionInsert_block_quote toolbar/2/name (QString): formattingToolbar toolbar/2/title (QString): formatting toolbar toolbar/3/items (QStringList): actionInsert_text_link, actionInsert_image, actionInsert_current_time toolbar/3/name (QString): insertingToolbar toolbar/3/title (QString): inserting toolbar toolbar/4/items (QStringList): action_Encrypt_note, actionEdit_encrypted_note, actionDecrypt_note toolbar/4/name (QString): encryptionToolbar toolbar/4/title (QString): encryption toolbar toolbar/5/items (QStringList): actionWorkspaceComboBox, actionStore_as_new_workspace, actionRemove_current_workspace, actionRename_current_workspace, actionSwitch_to_previous_workspace, actionUnlock_panels, , actionToggle_distraction_free_mode, action_Increase_note_text_size, action_Decrease_note_text_size, action_Reset_note_text_size toolbar/5/name (QString): windowToolbar toolbar/5/title (QString): window toolbar toolbar/6/items (QStringList): action_Quit toolbar/6/name (QString): quitToolbar toolbar/6/title (QString): quit toolbar toolbar/size (int): 6 useNoteFolderButtons (bool): false useUNIXNewline (bool): false webAppClientService/serverUrl (QString): wss://app.qownnotes.org webAppClientService/token (QString): <hidden> webSocketServerService/bookmarksNoteName (QString): Bookmarks webSocketServerService/bookmarksTag (QString): bookmarks webSocketServerService/commandSnippetsNoteName (QString): Commands webSocketServerService/commandSnippetsTag (QString): commands webSocketServerService/port (int): 22222 workspace-initial/name (QString): Minimal workspace-initial/noteSubFolderDockWidgetVisible (QString): true workspace-initial/windowState (QByteArray): <binary data> workspaces (QStringList): initial

System environment

HOME: /home/alex LANG: en_US.UTF-8 LC_ADDRESS: ru_RU.UTF-8 LC_IDENTIFICATION: ru_RU.UTF-8 LC_MEASUREMENT: ru_RU.UTF-8 LC_MONETARY: ru_RU.UTF-8 LC_NAME: ru_RU.UTF-8 LC_NUMERIC: ru_RU.UTF-8 LC_PAPER: ru_RU.UTF-8 LC_TELEPHONE: ru_RU.UTF-8 LC_TIME: ru_RU.UTF-8 LOGNAME: alex PATH: /home/alex/.local/venv/bin:/home/alex/.juliaup/bin:/home/alex/.local/venv/bin:/home/alex/.local/bin:/home/alex/bin:/home/alex/.cargo/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/snap/bin SHELL: /usr/bin/fish SYSTEMD_EXEC_PID: 34725 USER: alex XDG_DATA_DIRS: /home/alex/.local/share/flatpak/exports/share:/var/lib/flatpak/exports/share:/usr/local/share/:/usr/share/:/var/lib/snapd/desktop XDG_RUNTIME_DIR: /run/user/1000 GTK_MODULES: gail:atk-bridge QT_ACCESSIBILITY: 1 QTWEBENGINE_DICTIONARIES_PATH: /usr/share/hunspell-bdic/ DBUS_SESSION_BUS_ADDRESS: unix:path=/run/user/1000/bus DESKTOP_SESSION: ubuntu GDMSESSION: ubuntu GNOME_DESKTOP_SESSION_ID: this-is-deprecated GNOME_SHELL_SESSION_MODE: ubuntu LD_LIBRARY_PATH: /home/alex/opt/cgate/lib NVM_DIR: /home/alex/.nvm N_PREFIX: /home/alex/.local PWD: /home/alex QT_IM_MODULE: ibus SESSION_MANAGER: local/mirror:@/tmp/.ICE-unix/34709,unix/mirror:/tmp/.ICE-unix/34709 SHLVL: 0 SSH_AGENT_PID: 34623 SSH_AUTH_SOCK: /run/user/1000/keyring/ssh USERNAME: alex VIRTUAL_ENV: /home/alex/.local/venv XDG_CURRENT_DESKTOP: ubuntu:GNOME XDG_MENU_PREFIX: gnome- XDG_SESSION_CLASS: user XDG_SESSION_DESKTOP: ubuntu XDG_SESSION_TYPE: wayland XMODIFIERS: @im=ibus _OLD_FISH_PROMPT_OVERRIDE: /home/alex/.local/venv _OLD_VIRTUAL_PATH: /home/alex/.juliaup/bin:/home/alex/.local/venv/bin:/home/alex/.local/bin:/home/alex/bin:/home/alex/.cargo/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/snap/bin MANAGERPID: 34389 INVOCATION_ID: 2147196ff24743c5942a781967a5a644 JOURNAL_STREAM: 8:63534 GJS_DEBUG_OUTPUT: stderr GJS_DEBUG_TOPICS: JS ERROR;JS LOG GNOME_SETUP_DISPLAY: :1 DISPLAY: :0 XAUTHORITY: /run/user/1000/.mutter-Xwaylandauth.HWP1H2 WAYLAND_DISPLAY: wayland-0 GIO_LAUNCHED_DESKTOP_FILE: /usr/share/applications/PBE.QOwnNotes.desktop XDG_ACTIVATION_TOKEN: gnome-shell/QOwnNotes/34725-7-mirror_TIME106024865 GIO_LAUNCHED_DESKTOP_FILE_PID: 3150467

Relevant log output in the Log panel

None.

pbek commented 7 months ago

Can you please mention the authors of the script (like advised in the issue template). You will find the authors in the Script repository.

ElectronicRU commented 7 months ago

Yeah, my bad.

r00tr4v3n commented 7 months ago

Does reducing the dpi change anything?

ElectronicRU commented 7 months ago

No, it doesn't seem like changing the DPI fixes the issue. Frankly, it looks to me like the rich text display on my platform cannot handle height=xxx images (inserting images resizes the actual image data), but I'm not sure if that's true or why that would happen.

esrevinue commented 6 months ago

I would like to add that I am experiencing the exact same issue. Has anyone found a solution to this yet? I am also running on a linux system not dissimilar to ElectronicRU's computer.

github-actions[bot] commented 5 months ago

This issue is stale because it has been open for 30 days with no activity.

github-actions[bot] commented 4 months ago

This issue was closed because it has been inactive for 14 days since being marked as stale.

ElectronicRU commented 4 months ago

Welp.