Skip to content

Commit

Permalink
Added Dark Mode support for PDF Viewer
Browse files Browse the repository at this point in the history
  • Loading branch information
sanjib-sen committed Nov 12, 2022
1 parent 015d82f commit d4a3ccd
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 3 deletions.
4 changes: 4 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,10 @@
"-output-directory=PDF", // to change the output directory
"%DOC%"
],
// Remove / comment the next 3 lines to remove dark view for pdf
"latex-workshop.view.pdf.color.dark.pageColorsBackground": "#171717", // For Dark Viewwer
"latex-workshop.view.pdf.color.dark.pageColorsForeground":"#FFFFFF", // For Dark Viewer
"latex-workshop.view.pdf.color.dark.backgroundColor":"#171717", // For Dark Viewer
"editor.formatOnSave": true,
"latex-workshop.latex.pdfWatch.delay": 500,
"latex-workshop.latex.watch.delay": 500,
Expand Down
16 changes: 13 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
- [To use with LuaLatex or any other Tex program](#to-use-with-lualatex-or-any-other-tex-program)
- [Grammarly](#grammarly)
- [Live Collaboration](#live-collaboration)
- [PDF Viewer Dark Mode](#pdf-viewer-dark-mode)
- [Configuration](#configuration)
- [More Features and Configuration](#more-features-and-configurations)
- [Contribution](#contribution)
Expand Down Expand Up @@ -112,20 +113,29 @@ This editor uses Grammarly Free account to check grammar and spelling. However i
Just click on the **Live Share** Sidebar button and you are good to go
![Collaboration](images/collaborate.png)

## PDF Viewer Dark Mode

The pdf viewer will preview the pdf in Dark Mode by default if your Operating System is in Dark Mode. To view the pdf in Normal mode in os-wide dark mode just remove or comment these lines from `./.devcontainer/devcontainer.json`.

```json
"latex-workshop.view.pdf.color.dark.pageColorsBackground":"#171717",
"latex-workshop.view.pdf.color.dark.pageColorsForeground":"#FFFFFF",
"latex-workshop.view.pdf.color.dark.backgroundColor":"#171717",
```

## Configuration

- To change the output directory change the following properties in `./.devcontainer/devcontainer.json`

```json
"latex-workshop.latex.outDir": "<YourDirectoryName>",
...
"latex-workshop.latex.magic.args": ["-output-directory=<YourDirectoryName>",..],
"latex-workshop.latex.magic.args": ["-output-directory=<YourDirectoryName>",],
```

- If you do not need the Live Collaboration at all, you can just **remove** the `"ms-vsliveshare.vsliveshare"` extension from the extension list in `./.devcontainer/devcontainer.json`

```json
"extensions": [..,"ms-vsliveshare.vsliveshare"]
"extensions": ["ms-vsliveshare.vsliveshare",]
```

- Other configurations (e.g. PDF Generation Delay, Auto Saving etc.) can be modified in `./.devcontainer/devcontainer.json`. Check the [Wiki](https://github.com/James-Yu/LaTeX-Workshop/wiki)
Expand Down
Binary file modified images/screenshot.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit d4a3ccd

Please sign in to comment.