Miktex on Windows Vista - windows-vista

I have some problems with Miktex installed on Windows Vista Business SP1/32 bit. I use miktex 2.7, ghostscript, and texniccenter 1 beta 7.50. When I compile a document with the following profiles: Latex=>DVI, Latex=>PDF everything works fine; the system crashes when I compile with profiles Latex=>PS and Latex=>PS=>PDF. The error is reported into a window that states: "Dvi-to-Postscript converter has stopped working". What can I do? I need Latex=>PS=>PDF to include my images into the final PDF.
Thanks in advance,
Yet another LaTeX user

If everything you need is images, you could still compile directly to PDF. You only need to have an image in PNG or JPG format, and use the following code:
%in the document preamble
\usepackage{graphicx}
%in the document, in the place where you want to put your image
\includegraphics{image_filename_without_extension}
When the image is a PNG or JPG file (there are some more, I don't remember which ones ATM), you can compile the file with pdfLaTeX, but not with the normal LaTeX (i.e. you can produce a PDF, but not DVI or PS).
Of course normally, if everything works fine, it's nice to have one copy of the image in EPS, and another in, say, PNG -- this way you can compile easily both to PDF, and to PS.
Hope that helps.

Thanks for reply. I have solved the problem: the dvi crashed because I have installed Miktex with the User Account Control enabled. I have disabled it, reinstalled and now it's working (with UAC still disabled).

Related

Ghostscript PDF fonts becomes boxes in Adobe Illustrator where as its output is fine when opened in Adobe Acrobat

I need to convert the PDF of RGB color space to Grayscale using commandline tool supporting for Windows and Linux.
When i used Ghostscript the conversion is happening but when the output is opened in illustrator the fonts were shown as boxes.
Is there any solution option available in Ghostscript to overcome this font issue.
Is there any other commandline tool available for this conversion.
The font encoding is always built in is there any ways available to change it as ANSI encoding.Screenshot of font issue on illustrator VS the working scenario on acrobat
Pictures of the problem really don't help. You need to provide the following:
The version of Ghostscript you are using, and the platform (Linux, Windows etc), the word size of the version of Ghostscript and where you sourced this version of Ghostscript from (official Ghostscript download page, package, self-built binary).
An example file to reproduce the problem
The exact command line you used to reproduce the problem, and any supporting files required.
I suspect that your problem is that the original PDF file does not include the fonts that it uses, and that you have left SubsetFonts as true, and have left the AlwaysEmbed and NeverEmbed arrays untouched. This will mean that the new PDF file also does not include the fonts, which means that any PDF consumer must use a substitute font. The 'boxes' you refer to are /.notdef glyphs which are used when the font does not contain the glyph being requested.
Having the Encoding 'built-in' doesn't help with anything at all, it's the presence or absence of the fonts which matters. No, you can't change the encoding to 'ANSI', if you do that (assuming it isn't already WinAnsiEncoding) you'll see very similar problems to the ones you are complaining of here. You would also need to change the text character codes in the PDF file to be able to change the Encoding.
You could also raise this as a bug at https://bugs.ghostscript.com, where you will also have to supply an example file (as simple as possible) and all the other information listed above.

Convert Markdown to pdf with images on mac

This is driving me crazy. I have a jupyter notebook with images and I'm trying to convert it to a pdf on my mac. I've installed pandoc and macTex, but when I try to convert it to pdf the images disappear. Also the formatting for my tables gets messed up. I've tried saving it as a markdown and converting it, but I get the same problem. If I convert to html the images disappear but the table formatting is correct. I've also tried converting it in the terminal with nbconvert, but the images still disappeared. And I tried converting the markdown file with rstudio, but still the images disappeared. I've tried two versions of the code to reference images. The versions are below, both display fine in the jupyter notebook but the first one throws an error and the second one the images disappear. I've googled around, it seems to be a common issue but I'm not seeing a lot of solutions. I really can't believe this is this difficult. Any solution is greatly appreciated.
code with errors:
![Stars_Boxplot](Stars_Boxplot.PNG)
code disappears when rendered:
<img src="Stars_Boxplot.PNG">
Update Solution:
![Stars_Boxplot](/Users/Desktop///Project Research//Stars_Boxplot.PNG)
The issue was it had to be an absolute reference and I had a space in my file path.

Convert Jupyter notebook to PDF - pdflatex not found on PATH

I'm trying to download my Jupyter notebook as a PDF from the web interface by going to:
File -> Download as -> PDF via LaTeX
However, I get this error:
nbconvert failed: pdflatex not found on PATH
I have both pandoc and MacTex installed. Additionally, in the terminal the pdflatex is set.
$ which pdflatex
/Library/TeX/Distributions/.DefaultTeX/Contents/Programs/texbin/pdflatex
I'm running on Mac OS X El Capitan using Jupyter 4.2.0 with Python 2.7.11
Print it to pdf using your browser (ctrl+p). It is simple and the "you print what you see" approach is great to share a reports/analysis with people that do not code or use the jupyter enviroment. Not publication ready by any means but gets the job done. Just make sure your plots and figures are not on interactive mode otherwise they will not be displayed (set them to %matplotlib inline).
I always had trouble with exporting my jupyter nb to pdf through latex. Quick search and you see that A LOT of people do. I could get some stuff worked out but the formatting was lackluster with code and plots not displayed the way I wanted. I eventually accepted that the jupyter notebook could not produce "publish-ready" pdfs easily. When I want that, I generate plots/figures/code on jupyter and call them on a latex file.
You may want to hide some of your code from the pdf, set the resolution of your plots and add some extensions to improve your jupyter documents.
If you really want to make your publications from inside jupyter, this tutorial has some great tips.
I've had a lot of luck exporting to HTML instead of pdf. HTML is similarly viewable by any non-developers in your organization, assuming they have a browser, and you can make use of some excellent tools like toc2, which gives your viewers a table of contents so they can stay oriented with what they are reading. You can also link to specific sections using the "#" symbol to do header links. Similarly, HTML supports interactive plotting like those available through plotly, so that end-users can zoom into graphs and other figures. Encourage you to give it a shot. Example code with nbconvert below:
jupyter nbconvert --to html --template toc2 --TemplateExporter.exclude_input=True "<path-to-ipynb>"
If its really necessary to have a pdf, you can then open your html in Chrome or Firefox and print to pdf that way. Hope it helps!

How to use the existing Png-Shell-Thumbnail for my file types?

I am currently writing an application working with specially prepared image data. Another tool prepares the images (basically PNGs with additional data stored in the meta-data section). Now my tool works with these files, but not with all PNGs, so "we" decided to use a different file extension. So far, so good.
Now, because I am a lazy sack I implemented some file type registration to allow double-clicking on the file and opening it in my application (no problem at all).
And here is my Question:
It would be cool if the windows explorer could still show me the thumbnail previews for my files. Since they basically are still PNG files, it should be possible without writing my own shell extension (at least I believe so).
I quickly tried to copy all registry keys and values from HKCR.png to HKCR.mInDat (my file name ext) and it worked. However, I would prefere knowning what I am doing ;-)
Which of the registry settings are responsible for the thumbnail preview control and which can I use to get the preview for my file types?
I tried to google it, but I failed, since it seems I am unable to come up with the right buzz-words to find the info I need. Please, help me.
Thank you!
Yours,
3of4
Simple:
[HKEY_CLASSES_ROOT\.apng]
#="apng"
"Content Type"="image/png"
"PerceivedType"="image"
[HKEY_CLASSES_ROOT\apng\shellex\{BB2E617C-0920-11d1-9A0B-00C04FC2D6C1}]
#="{3F30C968-480A-4C6C-862D-EFC0897BB84B}"

Emacs under Windows and PNG files

Would anyone have any pointers on getting PNG images to display in Emacs 23 under Win32?.. I have installed the gnuwin32 set of utilities, including libpng and zlib; C:\Program Files\GnuWin32\bin is in path. JPG files started working but not PNGs. I'd appreciate any hints on getting this to work.
EDIT: PNG thumbnails actually display fine (e.g. in dired via C-t C-t). However, opening them fails (opens as garbage in fundamental mode, and M-x image-mode says "invalid image specification").
You have to copy one of these dlls "libpng12d.dll" "libpng12.dll" "libpng.dll" "libpng13d.dll" "libpng13.dll" to your emacs-23.1/bin/ directory. They require zlib1.dll which you have to copy as well. I did the same thing for jpeg62.dll and giflib4.dll and now my emacs supports jpg, gif and png files. For some reason it does not work if I simply put these dlls in the path.
You can check (image-type-available-p 'png) to see if png is supported. image-library-alist maps image type to a list of dlls which support it.
According to the official manual:
3.3 How do I get image support?
Emacs has built in support for XBM and PBM/PGM/PPM images. This is sufficient to see the monochrome splash screen and tool-bar icons. Since 22.2, the official precompiled binaries for Windows have bundled libXpm, which is required to display the color versions of those images.
Emacs is compiled to recognize JPEG, PNG, GIF and TIFF images also, but displaying these image types require external DLLs which are not bundled with Emacs. See Other useful ports.
Those dlls for the various image formats are (as far as I know) - XPM (xpm4.dll), PNG (libpng13.dll, zlib1.dll), JPEG (jpeg62.dll), TIFF (libtiff3.dll) and GIF (giflib4.dll);
Starting with Emacs 25 the Emacs Windows download directory includes -deps zip packages, that can be extracted to your emacs installation folder and include image libraries for PNG, SVG, JPEG, GIF, TIFF and more.
See also this emacs.stackexchange answer.
To display which version of the PNG dll your Emacs for Windows version requires, you can evaluate (cdr (assq 'png dynamic-library-alist))

Resources