i´m trying to compile a pdf in mardown, but generate the next error - latex

i´m working on rmardown, i´m trying to compile in pdf, but the console show me an error.
! Package inputenc Error: Unicode character ^^S (U+0013)
(inputenc) not set up for use with LaTeX.
Try other LaTeX engines instead (e.g., xelatex) if you are using pdflatex. See https://bookdown.org/yihui/rmarkdown-cookbook/latex-unicode.html
Error: LaTeX failed to compile Modelos-de-volatilidad.tex. See https://yihui.org/tinytex/r/#debugging for debugging tips. See Modelos-de-volatilidad.log for more info.
Ejecución interrumpida
i have install MIKTEX.

Check for the error in the line where it is happening. There's surely one character that LaTeX is not processing. Comment or cut the line and run again. I have had a similar issue when copy pasting from a pdf into LaTeX.

Related

I got this "error missing $" in overleaf how can I solve it?

I am using $\pi(x|D)=\exp(-\mathcal{U}(x))$ this expression in overleaf, but I got the error "missing $". The problem is using the symbol "|", when I delete this character it works perfectly. How can I solve this problem?
So, just did a quick check in my local MiKTeX installation. The line does indeed compile just fine. You may have some missing packages, or an error elsewhere in your document. Minimal working example:
\documentclass[a4paper,11pt]{article}
\begin{document}
$\pi(x|D)=\exp(-\mathcal{U}(x))$
\end{document}

error: (type 1): cannot open file for reading 'ugmm8a.pfb' in LaTeX (font depreciated)

I have been trying to compile my latex code in overleaf.com, but it keeps giving the errors as follows, and it does not point in which line of the code the error is located in:
It seems like a font issue there and here is the raw log of the error:
{/usr/local/texlive/2021/texmf-dist/fonts/enc/dvips/ly1/texnansi.enc}
! error: (type 1): cannot open file for reading 'ugmm8a.pfb'
! ==> Fatal error occurred, no output PDF file produced!
I need to solve this error to get my output document.
The urw-garamond fonts works just fine with texlive2021, you just need the ugmr8a.pfb from https://www.ctan.org/tex-archive/fonts/urw/garamond
https://www.overleaf.com/read/cmvfrqrkrnrq
(... however it might give better results not to use such a legacy font if you're already using lualatex, overleaf has many good fonts installed https://www.overleaf.com/learn/latex/Questions/Which_OTF_or_TTF_fonts_are_supported_via_fontspec%3F)
I have found the solution to this problem by myself.
Turns out the solution was just to change the Compiler (TeX Live) version of the overleaf.com project from 2021 to 2016 (since the 'ugmm8a.pfb' font got depreciated in the later version).
Hence I had to press the Menu option in the Top Left of my project, and then change the "TeX Live version" from 2021 to 2016 as shown in the screenshot below:
And after this one change when I recompiled, my document was successfully outputted without any errors.
As an additional info to people who are facing similar issues check this post by overleaf.com on how to add new fonts that do not exist on their server to your project: https://www.overleaf.com/learn/latex/XeLaTeX#Using_fonts_not_installed_on_Overleaf.27s_servers:_Google_Fonts_example

Chinese fonts in English Document of Latex

I would like to ask how to write some Chinese characters (simplified) within an English Latex document? I followed some methods suggested online but none of them are working for me. I am using Texworks to compile my document (pdfLatex).
\usepackage{CJKutf8}
\documentclass{article}
\usepackage{CJKutf8}
\begin{document}
\begin{CJK}{UTF8}{bsmi}
你好吗
\end{CJK}
\end{document}
another method is mentioned here,
\usepackage{CJKutf8}
\newcommand{\zh}[1]{\begin{CJK}{UTF8}{gbsn}#1\end{CJK}}
insert whatever Chinese characters you like into the document by typing
\zh{中文}
The error I receive is as following when using the method of CJKutf8 with pdfLaTeX mentioned here,
The log file hopefully contains the information to get MiKTeX going again:
C:\Users\muhd_\AppData\Local\MiKTeX\2.9\miktex\log\miktex-makepk.log
)
!pdfTeX error: miktex-pdftex.exe (file bsmiu30): Font bsmiu30 at 600 not found
==> Fatal error occurred, no output PDF file produced!
Log file is attached here.
The first error in the log file
The process terminated due to an access violation.
suggests that there are some problems with permissions while trying to create the necessary files to use the font for the Chinese letters.
Based on this answer https://tex.stackexchange.com/a/419809/36296 the problem can be fixed by either runing updmap from the command line or Refresh font map files from within the miktex console (in user mode).

missing `subfigure.sty'

I install texstudio by download texstudio-qt4_2.12.14-1_amd64.deb on ubuntu16.04, but I get this erros:
File `subfigure.sty' not found. \RequirePackage
I download subfigure from https://ctan.org/pkg/subfigure and make and move it to /usr/share/texlive/texmf-dist/tex/latex but still not working, how to fix this?
TeX maintains an internal TeX database for file search that is managed by the kpathsea set of tools. It requires a specific command to refresh the database. Try running sudo texhash
BTW, subfigure is no longer maintained and is considered as deprecated. From ctan subfigure page:
The pack­age is now con­sid­ered ob­so­lete: it was su­per­seded by sub­fig, but users may find the more re­cent sub­cap­tion pack­age more sat­is­fac­tory.
For a new document, I would advice you to switch to another package.

Error while generating make latexpdf with sphinx

I am currently using sphinx 1.4.9 for documents creation. While giving make latexpdf, I get the following error.
(/usr/share/texmf/tex/latex/upquote/upquote.sty)
(/usr/share/texmf/tex/latex/float/float.sty)
(/usr/share/texmf/tex/latex/graphics/graphicx.sty
(/usr/share/texmf/tex/latex/graphics/graphics.sty
(/usr/share/texmf/tex/latex/graphics/trig.sty)
(/usr/lib/texmf/tex/latex/config/graphics.cfg)))
(/usr/share/texmf/tex/plain/misc/pdfcolor.tex)
(/usr/share/texmf/tex/latex/hyperref/hyperref.sty
(/usr/share/texmf/tex/latex/hyperref/pd1enc.def)
(/usr/lib/texmf/tex/latex/config/hyperref.cfg)
(/usr/share/texmf/tex/latex/oberdiek/kvoptions.sty)
****! Package keyval Error: pdfencoding undefined.****
See the keyval package documentation for explanation.
I have searched for pdfencoding in the sphinx.egg, also it only appears in sphinx.sty.
but I don't know how to define this pdfencoding. whether to edit conf.py or how to do.
Your hyperref is outdated. Sphinx 1.4.x series was tested to work with Ubuntu Precise (Debian/TeXLive 2009). I can not try it but here is a hack which may help you out. However, perhaps other parts will fail as your TeX install is really old...
put
'passoptionstopackages' : """
\\let\\originalPassOptionsToPackage\\PassOptionsToPackage
\\makeatletter
\\def\\PassOptionsToPackage#1{%
\\def\\#tempa{#1}\\def\\#tempb{pdfencoding=unicode}%
\\ifx\\#tempa\\#tempb\\expandafter\\#gobbletwo
\\else\\expandafter\\originalPassOptionsToPackage\\fi {#1}}
\\makeatother
""",
inside the latex_elements configuration variable of conf.py. Could work ...

Resources