TeX - LaTeX Asked by user221144 on March 24, 2021
I have a problem when I use input{}
command with pdf_tex
files generated by Inkscape in subfolders. It appears an error that says
! Package pdftex.def Error: File `X.pdf’ not found: using draft setting.
However, when I use input{}
command with pdf_tex
in files in the same folder, then main document trouble doesn’t appear. The above description originally happened in a report with a Masterfile and in chapter I wrote the input command (using graphicspath{images/}
)
I attach a MWE with the same error and the same preamble that the Masterfile and part of the log file with the error. BTW I am using MiKTeX and Windows 10 (versions installed this 2020).
Code:
%==================================PAQUETES INICIALES==================================%
%------------------------Clase de documento y configuraciones--------------------------%
documentclass[10pt,a4paper,twoside]{report}
%--------------------------------------------------------------------------------------%
%-----------------------------Paquetes generales texto---------------------------------%
usepackage{lmodern} %para codificaciones vectoriales T1 en vez de bitmap%
usepackage[T1]{fontenc} %para poder copiar texto desde pdf con tildes%
usepackage[utf8x]{inputenc} %tildes sin código%
usepackage[spanish,mexico]{babel} %idiomas y cuadro->tabla%
usepackage{anyfontsize} %cualquier tamaño de letra%
%--------------------------------------------------------------------------------------%
%-----------------------------Márgenes modificados-------------------------------------%
usepackage[top=3cm,bottom=3cm]{geometry}
setlengthoddsidemargin{dimexpr(paperwidth-textwidth)/2 - 1inrelax} %Para márgenes
%laterales iguales en twoside document%
setlengthevensidemargin{oddsidemargin}
%--------------------------------------------------------------------------------------%
%--------------------------------Paquetes matemáticos----------------------------------%
usepackage{amssymb,amsfonts,amsmath} %librerías matemáticas, símbolos y fuentes%
%--------------------------------------------------------------------------------------%
%----------------------------Paquetes gráficos y figuras-------------------------------%
usepackage{graphicx} %gráficos%
%usepackage{subfigure} %subfiguras%
usepackage{float} %colocar figuras en posición arbitraria%
usepackage{calc} %imagenes vectoriales svg%
%--------------------------------------------------------------------------------------%
%----------------------------Paquetes estilo y color-----------------------------------%
usepackage[svgnames,x11names]{xcolor} %Paquetes de color%
usepackage{color}
%colores por nombre en archivo y tablas%
usepackage{fancyhdr} %cabeceras y pies de página%
usepackage{fancybox} %cajas para parrafos, paginas, ecn, etc%
usepackage{titlesec} %cambia estilo de capítulos%
%--------------------------------------------------------------------------------------%
%--------------Paquetes manipulación(tablas, listas, hipervínculos...)-----------------%
usepackage{enumitem} %%listas identadas y numeradas%
usepackage{nicematrix} % Paquete bonito para tablas, arreglos y figuras%
usepackage{tikz} %Paquete super bonito para dibujar, por ahora auxiliar de nicematrix%
usepackage{makecell} %para multirenglones makerowcell{Parte 1Parte2}%
% saltos de linea en celdas de tablas makecell{Parte 1Parte2}%
usepackage{booktabs} %Para utilizar comandos de tablas elegantes%
usepackage[export]{adjustbox} %Para ajustar altura de tablas%
usepackage[colorlinks=true, linkcolor=blue, citecolor=green, bookmarks=true]{hyperref}
%referencias dentro del propio documento%
%======================================================================================%
begin{document}
Pablito clavó un clavito en la calva de un calvito
begin{figure}[H] %It appears correctly
centering
def svgwidth{4cm}
input{Mandala1.pdf_tex}
end{figure}
vspace{1cm}
begin{figure}[H] %It appears correctly
centering
def svgscale{0.2}
input{Mandala1.pdf_tex}
end{figure}
begin{figure}[H]
centering
def svgscale{0.4}
input{images/musica.pdf_tex} %It doesn't appear -> Error
end{figure}
end{document}
Part of log file:
...
File: uni-0.def 2013/05/13 UCS: Unicode data U+0000..U+00FF
)
(Mandala1.pdf_tex
<Mandala1.pdf, id=6, page=1, 623.32722pt x 622.83313pt>
File: Mandala1.pdf Graphic file (type pdf)
<use Mandala1.pdf, page 1>
Package pdftex.def Info: Mandala1.pdf , page1 used on input line 56.
(pdftex.def) Requested size: 113.81102pt x 113.72073pt.
) (Mandala1.pdf_tex
File: Mandala1.pdf Graphic file (type pdf)
<use Mandala1.pdf, page 1>
Package pdftex.def Info: Mandala1.pdf , page1 used on input line 56.
(pdftex.def) Requested size: 124.66353pt x 124.5644pt.
) (images/musica.pdf_tex
LaTeX Warning: File `musica.pdf' not found on input line 56.
! Package pdftex.def Error: File `musica.pdf' not found: using draft setting.
1
See the pdftex.def package documentation for explanation.
Type H <return> for immediate help.
...
l.56 ...ics[width=unitlength,page=1]{musica.pdf}}
%
Try typing <return> to proceed.
If that doesn't work, type X <return> to quit.
...
If you want to include a file which in turn includes other files with relative paths, you can use the import
package and either import
or subimport
. In your example you would use
usepackage{import}
...
import{images}{musica.pdf_tex}
instead of
input{images/musica.pdf_tex}
Correct answer by Skillmon on March 24, 2021
Get help from others!
Recent Questions
Recent Answers
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP