\Includegraphics

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

\Includegraphics

Daniele Giorgio Degiorgi
Hi,

 

Using Windows 10 and Miktex 2.9 I have following problem using inside a
document

 

\includegraphics[scale=1]{../Musica/Argerich, Martha (b.1941)/Argerich
Chopin 2/Folder.jpg}

\href{../Musica/Argerich, Martha (b.1941)/Argerich Chopin 2/01
\Piece.wma}{Play}

 

The picture is included in PDF and clicking on Play a player is started.

 

There is just a problem:

 

Left to the picture in pdf document appear the text "Martha
(b.1941)/Argerich Chopin 2/Folder.jpg", that is the part of the path
following the first blank in the path of the picture.

 

Is there a way to avoid this problem?

 

Is there possibly a bug in the graphic package?

 

I could solve the problem removing the blanks from the directories or
creating symbolic links, but I would prefer a TeX-only solution, as the
other solutions need a lot of works.

 

 

Many thanks for any hint,

 

 

Daniel

 

 

 

------------------------------------------------------------------------------
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are
consuming the most bandwidth. Provides multi-vendor support for NetFlow,
J-Flow, sFlow and other flows. Make informed decisions using capacity planning
reports.http://sdm.link/zohodev2dev
_______________________________________________
Q: How can I leave the mailing list?
A: See http://docs.miktex.org/faq/support.html#leavingml
Reply | Threaded
Open this post in threaded view
|

Re: \Includegraphics

Ulrike Fischer-2
Am Sat, 16 Jul 2016 15:36:53 +0200 schrieb Daniele Giorgio Degiorgi:


> Left to the picture in pdf document appear the text "Martha
> (b.1941)/Argerich Chopin 2/Folder.jpg", that is the part of the path
> following the first blank in the path of the picture.

> Is there a way to avoid this problem?

You can try the grffile package. You can also try to quote the path:

\includegraphics[scale=1]{"../Musica/Argerich, Martha
(b.1941)/Argerich Chopin 2/Folder.jpg"}

> Is there possibly a bug in the graphic package?

No.

> I could solve the problem removing the blanks from the directories or
> creating symbolic links, but I would prefer a TeX-only solution, as the
> other solutions need a lot of works.


In the long run you can avoid a lot of (time consuming) problems by
avoiding funning things like blanks, non-ascii-chars, commas,
parentheses etc in paths and file names. Every tex solution to such
problems are at least in parts OS dependant and so can break if you
move e.g. to a mac or linux.



--
Ulrike Fischer
http://www.troubleshooting-tex.de/


------------------------------------------------------------------------------
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are
consuming the most bandwidth. Provides multi-vendor support for NetFlow,
J-Flow, sFlow and other flows. Make informed decisions using capacity planning
reports.http://sdm.link/zohodev2dev
_______________________________________________
Q: How can I leave the mailing list?
A: See http://docs.miktex.org/faq/support.html#leavingml
Reply | Threaded
Open this post in threaded view
|

Re: \Includegraphics

Daniele Giorgio Degiorgi-2
Many thanks for your answer,

I avoid normally to use blanks and special chars in filenames, but I use
Windows Media Player to store ripped CD's and using spaces and special chars
in album names, artist names and track titles does not seem to be a wrong
option. Unfortunately, they are almost verbatim used as directory and file
names: I have to live with them.

Following your hint, I now use

\usepackage[utf8]{inputenc}
\usepackage[X2,T1]{fontenc}
\usepackage[pdftex,colorlinks,pagebackref,citecolor=blue]{hyperref}
\usepackage{graphicx}
\usepackage[space,extendedchars]{grffile}

This solves also the possibility to use accented letters both in \href and
\includegraphics

Many thanks again,

Daniel



-----Original Message-----
From: Ulrike Fischer [mailto:[hidden email]]
Sent: 16 July, 2016 16:28
To: [hidden email]
Subject: Re: [MiKTeX] \Includegraphics

Am Sat, 16 Jul 2016 15:36:53 +0200 schrieb Daniele Giorgio Degiorgi:


> Left to the picture in pdf document appear the text "Martha
> (b.1941)/Argerich Chopin 2/Folder.jpg", that is the part of the path
> following the first blank in the path of the picture.

> Is there a way to avoid this problem?

You can try the grffile package. You can also try to quote the path:

\includegraphics[scale=1]{"../Musica/Argerich, Martha (b.1941)/Argerich
Chopin 2/Folder.jpg"}

> Is there possibly a bug in the graphic package?

No.

> I could solve the problem removing the blanks from the directories or
> creating symbolic links, but I would prefer a TeX-only solution, as
> the other solutions need a lot of works.


In the long run you can avoid a lot of (time consuming) problems by avoiding
funning things like blanks, non-ascii-chars, commas, parentheses etc in
paths and file names. Every tex solution to such problems are at least in
parts OS dependant and so can break if you move e.g. to a mac or linux.



--
Ulrike Fischer
http://www.troubleshooting-tex.de/


----------------------------------------------------------------------------
--
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are
consuming the most bandwidth. Provides multi-vendor support for NetFlow,
J-Flow, sFlow and other flows. Make informed decisions using capacity
planning reports.http://sdm.link/zohodev2dev
_______________________________________________
Q: How can I leave the mailing list?
A: See http://docs.miktex.org/faq/support.html#leavingml


------------------------------------------------------------------------------
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are
consuming the most bandwidth. Provides multi-vendor support for NetFlow,
J-Flow, sFlow and other flows. Make informed decisions using capacity planning
reports.http://sdm.link/zohodev2dev
_______________________________________________
Q: How can I leave the mailing list?
A: See http://docs.miktex.org/faq/support.html#leavingml
Reply | Threaded
Open this post in threaded view
|

Re: \Includegraphics

Daniele Giorgio Degiorgi
Using

\usepackage{musixtex}
\usepackage[utf8]{inputenc}
\usepackage[X2,T1]{fontenc}
\usepackage[pdftex,colorlinks,pagebackref,citecolor=blue]{hyperref}
\usepackage{graphicx}
\usepackage[space,extendedchars]{grffile}

Solved most of the problems, but it remains a problem with tilded characters
like ã (U+00E3) and ñ (U+00F1).
Unless all other accented letters (like éèàöüä), the direct use of ã (and ñ)
as utf-8 character works in \includegraphics but fails in \href, as it
expands as ~a (and ~n) in the latter.

I could solve the problem using  \%C3\%A3 in \href without great effort, as
all the \href's with problems are generated with a program who reads the
Windows Media Player repository.
Note that I need two different coding, as \%C3\%A3 does not work in
\includegraphics.

Now the question: are there better methods to avoid this tilde problem?
Could it be a small bug in hyperref package in the effort of support tilde
alone?

Many thanks for any help,


Daniel





------------------------------------------------------------------------------
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are
consuming the most bandwidth. Provides multi-vendor support for NetFlow,
J-Flow, sFlow and other flows. Make informed decisions using capacity planning
reports.http://sdm.link/zohodev2dev
_______________________________________________
Q: How can I leave the mailing list?
A: See http://docs.miktex.org/faq/support.html#leavingml
Reply | Threaded
Open this post in threaded view
|

Re: \Includegraphics

Ulrike Fischer-2
Am Wed, 20 Jul 2016 15:28:18 +0200 schrieb Daniele Giorgio Degiorgi:

> Unless all other accented letters (like éèàöüä), the direct use of ã (and ñ)
> as utf-8 character works in \includegraphics but fails in \href, as it
> expands as ~a (and ~n) in the latter

urls can contain tildes ~ and the support of \href for this tilde
clash with the support for ñ which internally is defined as \~n.

You can try something like this. But be aware that the fact the link
now looks okay, doesn't imply that you get a working link -- it
depends on the encoding of the file names the OS - if it e.g. uses
composites instead of single glyphs it probably won't work.



\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[colorlinks,pagebackref,citecolor=blue]{hyperref}

\let\mytildeaccent\~
\DeclareUnicodeCharacter{00F1}{\mytildeaccent n}

\begin{document}
\href{äöüñ}{äöüñ}
\end{document}


--
Ulrike Fischer
http://www.troubleshooting-tex.de/


------------------------------------------------------------------------------
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are
consuming the most bandwidth. Provides multi-vendor support for NetFlow,
J-Flow, sFlow and other flows. Make informed decisions using capacity planning
reports.http://sdm.link/zohodev2dev
_______________________________________________
Q: How can I leave the mailing list?
A: See http://docs.miktex.org/faq/support.html#leavingml