Does anyone know how to convert .tex files to .pdf in windows? I tried cygwin but it said the command "pdflatex" was not recognised
Thanks
Philip
There's no reason to complicate things with Cygwin. Go download and install a TeX distribution for Windows - I personally use TeX Live, but various other distributions are available, such as MikTeX or W32TeX.
If you want to use UTF-8 for your bibliography, and you're using BibTeX, I recommend using bibtexu instead of the regular bibtex (since bibtex doesn't actually support UTF-8). There's a download on the W32TeX site.
If you need to stick with cygwin, install texlive and texlive-collection-latex
The following command worked for me, under cygwin. I installed pandoc 1.13.2 and MiKTeX 2.9.5105 64-bit. Then I ran:
pandoc -s \
--latex-engine='C:\Program Files\MiKTeX 2.9\miktex\bin\x64\pdflatex.exe' \
-f markdown_github -t latex \
"my-file.md" -o "my-file.pdf"
The key here is that I gave the full path for MiKText's pdflatex.exe in the --latex-engine key, in quotes, using the windows path (as the pandoc I installed is the windows pandoc, it requires windows-style paths to find resources).
I used -f markdown_github because of the file format of my-file.md
I used -t latext but that's optional AFAIK.
Installing tetex(and optionally tetex-extra) package in Cygwin worked for me.
MikTex and texify work for me under plain Windows.
Related
Problem
I have a zip-file that I would like to unzip on Ubuntu with the correct filenames (they contain æ,ø,å).
What I have tried:
1. Unrar in Windows 10 - WORKS!
Everything works as expected and filenames are correct.
2. Unzip in Ubuntu
unzip file.zip
The characters æ,ø and å are missing from the filenames, where 'æ' has been replaces with 'C'.
I attempt to detect the encoding of the zip-file, but it doesn't seem to tell me anything.
file file.zip
3. Unzip with encoding in Ubuntu
I attempt to unpack the file using various encodings that are often used for æ,ø,å-containing texts.
unzip -O UTF-8 file.zip
unzip -O ISO-8859-1 file.zip
unzip -O windows-1257 file.zip
None work...
4. Unzip using 7zip in Ubuntu
It is suggested that 7zip may fix the problem, but no..
7z x file.zip
5. Unzip using 7zip and danish language setting in Ubuntu
It is suggested that I change the ubuntu language settings and then try again.
saveLang=$LANG
export LANG=da_DK
7z x file.zip
export LANG=$saveLang
This also does not work.
6. Unzip using Python3 in Ubuntu - WORKS!
The unzip works correctly if I use Python3 for the purpose, but there must be an easier way?
import zipfile
with zipfile.ZipFile('file.zip', "r") as z:
z.extractall("/home/xxxx/")
7. Next step
I am considering finding a list of "ALL" encodings, and then just extracting the filenames and going through them manually. Something along the line of this...
while read p; do
echo "$p"
unzip -j -O $p file.zip
done <encodings.txt
Conclusion
Windows and Python3 seems to have some MAGIC under the hood that I cannot replicate. Do you guys have any suggestions to what this "MAGIC" is?
How do I identify the encoding of the filenames of a zip-file?
Where can I get a list of all encodings for step 7.
Is there any easy way to solve this problem without having to write e.g. a python script?
The key piece of information you provided was that unrar on windows was able to create the filenames correctly. So unless unrar is doing some encoding detection under the hood, that meant that there is a good chance that the encoding used in the zip files matches the default codepage used on your Windows setup.
Using chcp on Windows you see that your codepage is
Active code page: 850
It's then a simple matter of telling unzip that the encoding used in the zip file is CP850
unzip -O CP850 file.zip
When trying to add annotations to images in ImageMagick, It failed with the following message:
convert: unable to read font `(null)' # error/annotate.c/RenderFreetype...
How do I make Imagemagick find these fonts?
The solution that worked for me was given by Neville in this post:
Create an imagemagick configuration folder: mkdir ~/.magick
Save this Perl script as /tmp/script.pl
Make the script executable: chmod +x /tmp/script.pl
Run the script locally and redirect the output to the file type.xml in ~/.magick: /tmp/script.pl > ~/.magick/type.xml
This solved the fonts problem, while installing fondu, the imagemagick pkg file and some other tricks didn't.
Great! Now I can annotate some flickr cats with the image size and resolution (I want this for finding the optimal resolution for an app I'm working on).
Adopting Adam Matan's answer, here's how I got this to work with imagemagick 7+ on macOS 10.12+ installed with homebrew. (This also assumes you have perl installed.)
Download the perl script and save it to /usr/local/bin/imagick_type_gen
Make the script executable:
chmod +x /usr/local/bin/imagick_type_gen
Find the font path for imagemagick by running convert -list font | grep Path. This should return where imagemagick is looking for fonts. The Apple path for me was this:
/usr/local/Cellar/imagemagick/7.0.7-22/etc/ImageMagick-7/type-apple.xml
Run imagick_type_gen and direct the output to the path above:
imagick_type_gen > /usr/local/Cellar/imagemagick/7.0.7-22/etc/ImageMagick-7/type-apple.xml
Run convert -list font | less to see the font names imagemagick will use, e.g., some fonts will be labeled as GeorgiaB instead of Georgia Bold. (hit q to quit)
imagemagick should now see the fonts you have installed on the your system.
The easiest way to solve this issue is copying the font you need to a ~/ folder, or anywhere your script is, then give the direct path:
convert -font "~/MyFont.ttc"
anyone know a free, stable commandline tool (besides ImageMagick) to convert .tif files and .pdf files to either .jpg or .png?
thanks Michelle
I prefer Imagemagick for Windows stuff, but IrfanView performs well, too. It looks like it has switches for command-line conversion of image formats, as well. See the "/convert" option.
tiff2png
On mac os x:
$ brew install tiff2png
$ tiff2png -compression 9 *.tif
I can't seem to figure this out. I have a .dot file, which is valid according to the syntax. How do I use graphviz to convert this into an image?
(note that I'm on Windows, not linux)
type: dot -Tps filename.dot -o outfile.ps
If you want to use the dot renderer. There are alternatives like neato and twopi. If graphiz isn't in your path, figure out where it is installed and run it from there.
You can change the output format by varying the value after -T and choosing an appropriate filename extension after -o.
If you're using windows, check out the installed tool called GVEdit, it makes the whole process slightly easier.
Go look at the graphviz site in the section called "User's Guides" for more detail on how to use the tools:
http://www.graphviz.org/documentation/
(See page 27 for output formatting for the dot command, for instance)
http://www.graphviz.org/pdf/dotguide.pdf
dot -Tps input.dot > output.eps
dot -Tpng input.dot > output.png
PostScript output seems always there. I am not sure if dot has PNG output by default. This may depend on how you have built it.
dot file.dot -Tpng -o image.png
This works on Windows and Linux. Graphviz must be installed.
There's also the online viewers:
http://www.webgraphviz.com/
https://dreampuf.github.io/GraphvizOnline/
https://github.com/mdaines/viz.js → emscripten → http://viz-js.com/
Using WASM port in ObservableHQ
https://sketchviz.com/new
Get the graphviz-2.24.msi Graphviz.org. Then get zgrviewer.
Zgrviewer requires java (probably 1.5+). You might have to set the paths to the Graphviz binaries in Zgrviewer's preferences.
File -> Open -> Open with dot -> SVG pipeline (standard) ...
Pick your .dot file.
You can zoom in, export, all kinds of fun stuff.
This should combine a lot of answers.
# Convert dot to png via graphviz
dot -Tpng filename.dot -o filename.png
# Convert dot to svg via graphviz
dot -Tsvg filename.dot -o filename.svg
# Convert dot to eps via graphviz
dot -Tps filename.dot -o filename.eps
Keep in mind that on OSX (MAC), you need to install homebrew to install graphviz to be able to use the dot commands above.
brew install graphviz
It is also possible to install Graphviz (and use the commands above) through the package manager functionality of conda if you have Anaconda installed.
conda install python-graphviz
You can also output your file in xdot format, then render it in a browser using canviz, a JavaScript library.
Canviz on code.google.com:
To see an example, there is a "Canviz Demo" link on the page above as of November 2, 2014.
You can use the VS code and install the Graphviz extension or,
Install Graphviz from
https://graphviz.gitlab.io/_pages/Download/Download_windows.html
Add C:\Program Files (x86)\Graphviz2.38\bin (or your_installation_path/ bin) to your system variable
PATH
Open cmd and go to the dir where you saved the .dot file
Use the command dot music-recommender.dot -Tpng -o image.png
there is no requirement of any conversion.
We can simply use xdot command in Linux which is an Interactive viewer for Graphviz dot files.
ex: xdot file.dot
for more infor:https://github.com/rakhimov/cppdep/wiki/How-to-view-or-work-with-Graphviz-Dot-files
For window user, Please run complete command to convert *.dot file to png:
C:\Program Files (x86)\Graphviz2.38\bin\dot.exe" -Tpng sampleTest.dot > sampletest.png.....
I have found a bug in solgraph that it is utilizing older version of solidity-parser that does not seem to be intelligent enough to capture new enhancement done for solidity programming language itself e.g. emit keyword for Event
You can use a very good online tool for it. Here is the link
dreampuf.github.io
Just replace the code inside editer with your code.
$ dot -T pdf filename.dot > filename.pdf
This works on my Windows 10.
I have a series of files named filename.part0.tar, filename.part1.tar, … filename.part8.tar.
I guess tar can create multiple volumes when archiving, but I can't seem to find a way to unarchive them on Windows. I've tried to untar them using 7zip (GUI & commandline), WinRAR, tar114 (which doesn't run on 64-bit Windows), WinZip, and ZenTar (a little utility I found).
All programs run through the part0 file, extracting 3 rar files, then quit reporting an error. None of the other part files are recognized as .tar, .rar, .zip, or .gz.
I've tried concatenating them using the DOS copy command, but that doesn't work, possibly because part0 thru part6 and part8 are each 100Mb, while part7 is 53Mb and therefore likely the last part. I've tried several different logical orders for the files in concatenation, but no joy.
Other than installing Linux, finding a live distro, or tracking down the guy who left these files for me, how can I untar these files?
Install 7-zip. Right click on the first tar. In the context menu, go to "7zip -> Extract Here".
Works like a charm, no command-line kung-fu needed:)
EDIT:
I only now noticed that you mention already having tried 7zip. It might have balked if you tried to "open" the tar by going "open with" -> 7zip - Their command-line for opening files is a little unorthodox, so you have to associate via 7zip instead of via the file association system built-in to windows. If you try the right click -> "7-zip" -> "extract here", though, that should work- I tested the solution myself (albeit on a 32-bit Windows box- Don't have a 64 available)
1) download gzip http://www.gzip.org/ for windows and unpack it
2) gzip -c filename.part0.tar > foo.gz
gzip -c filename.part1.tar >> foo.gz
...
gzip -c filename.part8.tar >> foo.gz
3) unpack foo.gz
worked for me
As above, I had the same issue and ran into this old thread. For me it was a severe case of RTFM when installing a Siebel VM . These instructions were straight from the manual:
cat \
OVM_EL5U3_X86_ORACLE11G_SIEBEL811ENU_SIA21111_PVM.tgz.1of3 \
OVM_EL5U3_X86_ORACLE11G_SIEBEL811ENU_SIA21111_PVM.tgz.2of3 \
OVM_EL5U3_X86_ORACLE11G_SIEBEL811ENU_SIA21111_PVM.tgz.3of3 \
| tar xzf –
Worked for me!
The tar -M switch should it for you on windows (I'm using tar.exe).
tar --help says:
-M, --multi-volume create/list/extract multi-volume archive
I found this thread because I had the same problem with these files. Yes, the same exact files you have. Here's the correct order: 042358617 (i.e. start with part0, then part4, etc.)
Concatenate in that order and you'll get a tarball you can unarchive. (I'm not on Windows, so I can't advise on what app to use.) Note that of the 19 items contained therein, 3 are zip files that some unarchive utilities will report as being corrupted. Other apps will allow you to extract 99% of their contents. Again, I'm not on Windows, so you'll have to experiment for yourself.
Enjoy! ;)
This works well for me with multivolume tar archives (numbered .tar.1, .tar.2 and so on) and even allows to --list or --get specific folders or files in them:
#!/bin/bash
TAR=/usr/bin/tar
ARCHIVE=bkup-01Jun
RPATH=home/user
RDEST=restore/
EXCLUDE=.*
mkdir -p $RDEST
$TAR vf $ARCHIVE.tar.1 -F 'echo '$ARCHIVE'.tar.${TAR_VOLUME} >&${TAR_FD}' -C $RDEST --get $RPATH --exclude "$EXCLUDE"
Copy to a script file, then just change the parameters:
TAR=location of tar binary
ARCHIVE=Archive base name (without .tar.multivolumenumber)
RPATH=path to restore (leave empty for full restore)
RDEST=restore destination folder (relative or absolute path)
EXCLUDE=files to exclude (with pattern matching)
Interesting thing for me is you really DON'T use the -M option, as this would only ask you questions (insert next volume etc.)
Hello perhaps would help.
I had the same problems ...
a save on my web site made automaticaly in Centos at 4 am create multiple file in multivolume tar format (saveblabla.tar, saveblabla.tar1.tar, saveblabla.tar2.tar,etc..)
after downloading this file on my PC (windows) i can't extract them with both windows cmd or 7zip (unknow error).
I thirst binary copy file to reassemble tar files. (above in that thread)
copy /b file1+file2+file3 destination
after that, 7zip worked !!! Thanks for you help