https://github.com/mildronize/latex-live-preview
Live Preview Latex for detecting both .tex and .bib
https://github.com/mildronize/latex-live-preview
Last synced: about 1 year ago
JSON representation
Live Preview Latex for detecting both .tex and .bib
- Host: GitHub
- URL: https://github.com/mildronize/latex-live-preview
- Owner: mildronize
- License: mit
- Created: 2015-09-23T20:04:22.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2016-02-18T17:10:25.000Z (over 10 years ago)
- Last Synced: 2025-01-23T10:15:42.292Z (over 1 year ago)
- Language: Python
- Homepage:
- Size: 10.7 KB
- Stars: 1
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Latex Live Preview
Latex Live Preview with watchdog
> Here is a first beta. It may be some bug.
## Feature
- Live Preview, when you save `.tex` or `.bib`
- Support only `evince` (pdf viewer).
- Show only `Error` and `Warning` message, for easily to debug. [Source
is adapted from Here](http://tex.stackexchange.com/questions/27878/pdflatex-bash-script-to-supress-all-output-except-error-messages)
- Automatic convert to pdf & clean junk files
## Dockerize this project
- Build this project
```
docker build -t mildronize/latex-live-preview .
```
- Run Latex with live preview on Docker
```
docker run --rm -it -v "$PWD:/src" mildronize/latex-live-preview /app/watchdog_latex [LATEX FILE NAME w/o extension]
```
## Prerequisite
```bash
$ sudo pip3 install watchdog
```
## Install
1. Clone this project.
```bash
git clone https://github.com/mildronize/latex-live-preview.git /tmp/latex-live-preview
```
1. copy `bin/watchdog_latex` and `bin/topdf` into your latex project:
```bash
$ cp /tmp/latex-live-preview/bin/{watchdog_latex, topdf} /path/to/your/project
```
## Usage
- Run `./watchdog_latex [LATEX FILE NAME w/o extension]`
- Save `.tex` or `.bib` when file is changed, the program will compile
latex to pdf
- If `.pdf` is exist, run `evince [LATE FILE NAME].pdf&` into background
- Enjoy! your writing with latex when you save, the pdf viewer will be
reload automatically
## Example usage
If I have `report.tex` , `ref.bib`, and `report.tex` import bib from
`ref.bib`.
- `./watchdog_latex report`
- Open pdf `evince report.pdf&`