Convert dvi to odt filetype - type-conversion

Is there a software or a linux command to convert .dvi filetype to a .odt filetype? As I understand, the .dvi file is a machine readable file format which is used to render a document.
I am using MXLinux 5.16.0.

Related

vscode the file is not displayed in the editor because it is either binary or uses an unsupported text encoding

I am trying to work by importing the photo2cartoon project from github into my vscode.
https://github.com/kairess/photo2cartoon
But some files are not read in vscode.(model_mobilefacenet,photo2cartoon_weights.pt)
When I try to open it I get the message (the file is not displayed in the editor because it is either binary or uses an unsupported text encoding)
if i click (open anyway)
and my vscode terminal say
but the files are in the same directory
how to fix this problem

VSCode: How to export a python file that was imported from a Jupyter Notebook back to Jupyter format?

Probably a silly question, but I couldn't find it. Visual Studio Code editor has a really nice way to work with Jupyter Notebooks. I can edit the cells directly in vscode and run them. Now it would be easy to work with version control.
But I couldn't find a way to convert it back to a Notebook! How do I generate a notebook back from the generated python file?
I understand that the notebook wouldn't have the output cells in it.
There is an option in the interactive Python window that has the notebook output:
This is really cool, now you can work in a Python file and have a really nice interface with your version configuration system (Git).
Yes, it was a silly question :-)
The Jupytext library supports the percent-based cell format used by VSCode-Python, as well as other text-based notebook interchange formats:
https://github.com/mwouts/jupytext
If you need more control over how conversion to ipynb is done (or you need to have cross-references) then you can give a try to Pandoctools. It can export VSCode *.py documents to any Pandoc output format or to Jupyter notebook.
For example you can create and register Jupyter kernel. For example is can be named "nn". That should be the same kernel that you selected in VSCode (there you select it by path but VSCode still uses installed kernels specs under the hood). Then add hat to the Python file, split document to cells, provide settings and set Markdown cells (commented metadata line would export to pdf instead of ipynb; I recommend to open ipynb in nteract native app):
"""
---
kernels-map:
py: nn
jupyter:
kernelspec:
display_name: nn
language: python
name: nn
pandoctools:
# out: "*.pdf"
out: "*.ipynb"
...
# Markdown section title 1
Some **static** Markdown text.
"""
# %% {echo=False}
import IPython.display as ds
import math
import sugartex as stex
# %% {markdown}
"""
# Markdown section title 2
The quick brown Fox jumps over the lazy dog.
"""
# %%
ds.Markdown(stex.pre(f'''
Some **dynamic** Markdown text with SugarTeX formula: ˎα^˱{math.pi:1.3f}˲ˎ.
It works because of the `Markdown` display option and `sugartex` Pandoc filter.
Acually `stex.pre` is redundant here but it is needed when the text is imported
or read from somewhere instead of being written in the same document.
'''))
Then convert the file via pandoctools: drag and drop file to pandoctools shortcut/executable or "open with" pandoctools executable.
Also see:
Two introduction articles are at the beginning of this README,
examples of input to output conversion that have cross-references!
how to use Pandoctools and it's CLI,
how to use Knitty that collects Jupyter outputs and change it's settings.
Use jupytext library:
Install:
pip install jupytext
Now open CMD or internal terminal to the folder with your .py file
Run this:
jupytext --set-formats py:percent,ipynb filename.ipynb

Tesseract 3.04.00 on mac, ERROR "can not open input file"

I am working in a Terminal on OSX. The file name is sample and it is a png file. Tesseract creates an out.txt file in my current directory, but it's empty. I have tried commands with different file types, such as tiff, and also tried entering the full input file path, but the same error occurs.
What does the error mean?
eugeneprokopenko$ tesseract sample out
Tesseract Open Source OCR Engine v3.04.00 with Leptonica
ERROR: Can not open input file sample
Error during processing.

Can I convert markdown file to emacs org file?

I can use org-md-export-to-markdown, make md to org.
but I want to convert markdown file to emacs org file, any tools ?
Here's the Pandoc command to convert from the command line:
pandoc -f markdown -t org -o newfile.org original-file.markdown
From This question on the Emacs Stack Exchange.

Export to pdf/image with Syntax highlightning - emacs

I have a file open in Emacs which highlights the syntax and I want to share the file (with syntax highlighting) with another person who does not use Emacs.
Is it possible to export the file open in Emacs with syntax highlightning?
Any target format is ok: e.g. HTML, PDF, Image
You can use the command M-x htmlfontify-buffer to create an html file with syntax highlighting from any buffer.
It's included in standard Emacs, definitely in version 24, I'm not sure about 23.
You can use htmlize-buffer that comes with 'htmlize.el' (find it at http://fly.srk.fer.hr/~hniksic/emacs/htmlize.el.cgi (dead link?) or install from MELPA or download from the htmlize Github project. This will create a HTML file with all the syntax highlighting of your current buffer.