Okular は KDE Plasma デスクトップに搭載されている、PDF ファイルが表示可能な汎用文書ビューアです。 SyncTeX への対応、ファイルの自動更新機能もあり、PostScript を PDF としてインポートできます。 初期設定では無効になっていますが、ファイルをタブで開く機能もあります。
Windows, macOS, Linux
から Okular のインストーラーをダウンロードしてインストールできます。
Microsoft Store からインストールすることもできます。Okular - Windows に無料でダウンロードしてインストールする | Microsoft Store を参照してください。
winget でインストールすることもできます。https://winget.run/pkg/KDE/Okular や https://github.com/microsoft/winget-pkgs/tree/master/manifests/k/KDE/Okular を参照してください。
Scoop でインストールすることもできます。https://scoop.sh/#/apps?q=okular&s=0&d=1&o=true を参照してください。
Chocolatey でインストールすることもできます。https://chocolatey.org/packages/okular を参照してください。
MSYS2 でインストールすることもできます。
を参照してください。
ほとんどのディストリビューションではパッケージ管理システムからインストールできます.
ファイルをタブで開くようにするには以下の設定を行います。
[設定(S)] > [Okular を設定(O)...] > [全般]
全般オプション
プログラムの機能: ☑ Open new files in tabs
☑ Switch to existing tab if file is already open
$ okular --help-all
使い方: okular [オプション] urls
Okular, 汎用文書ビューア
オプション:
-h, --help Displays help on commandline options.
--help-all Displays help, including generic Qt
options.
-v, --version バージョン情報を表示する。
--author 作者に関する情報を表示します。
--license ライセンス情報を表示します。
--desktopfile <ファイル名> このアプリケーションのデスクトップエントリのベースファイル名です。
-p, --page <number> 表示する文書のページ
--presentation 文書をプレゼンテーションモードで開く
--print Start with print dialog
--print-and-exit Start with print dialog and exit after
printing
--unique 1 つのインスタンスのみ許可
--noraise Not raise window
--find <string> Find a string on the text
--editor-cmd <string> Sets the external editor command
--qmljsdebugger <value> Activates the QML/JS debugger with a
specified port. The value must be of
format port:1234[,block]. "block" makes
the application wait for a connection.
--platform <platformName[:options]> QPA plugin. See QGuiApplication
documentation for available options for
each plugin.
--platformpluginpath <path> Path to the platform plugins.
--platformtheme <theme> Platform theme.
--plugin <plugin> Additional plugins to load, can be
specified multiple times.
--qwindowgeometry <geometry> Window geometry for the main window,
using the X11-syntax, like 100x100+50+50.
--qwindowicon <icon> Default window icon.
--qwindowtitle <title> Title of the first window.
--reverse Sets the application's layout direction
to Qt::RightToLeft (debugging helper).
--session <session> Restores the application from an earlier
session.
引数:
urls 開く文書。標準入力から読む場合は “-” を指定してください。
[ファイル(F)] > [PostScript を PDF としてインポート(I)...]
TeX ファイルの 30 行目に対応する PDF ファイルの該当する箇所にジャンプしたい場合は
$ okular --unique "file:hoge.pdf#src:30 `pwd`/hoge.tex"
のように実行します.
[設定(S)] > [Okular を設定(O)...] > [エディタ]
例えば Windows 版の TeXstudio の場合は エディタ の項目に
カスタム
"C:\Program Files\texstudio\texstudio.exe" -line %l "%f"
を設定します.
Okular 上で Shift + 左クリックを実行すると TeXstudio が起動して TeX 文書の対応する行にジャンプします.
Okular 22.03.80 (2022-03-12) 以降ではコマンドラインオプションから設定できるようになりました。--> Adds option editor-cmd to the commandline