TransWikia.com

What is the trick of Pandoc for includegraphics from url?

TeX - LaTeX Asked by tres.14159 on January 21, 2021

I am reading the latex file, it is the output of pandoc from markdown file.

$ pandoc --self-contained test2.md -o test2.late

And the markdown file has:

![El pinguino de linux](pinguino.svg)

Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.

![El pinguino de linux](https://upload.wikimedia.org/wikipedia/commons/3/35/Tux.svg)

And the latex file is:

% Options for packages loaded elsewhere
PassOptionsToPackage{unicode}{hyperref}
PassOptionsToPackage{hyphens}{url}
%
documentclass[
]{article}
usepackage{lmodern}
usepackage{amsmath}
usepackage{ifxetex,ifluatex}
ifnum 0ifxetex 1fiifluatex 1fi=0 % if pdftex
  usepackage[T1]{fontenc}
  usepackage[utf8]{inputenc}
  usepackage{textcomp} % provide euro and other symbols
  usepackage{amssymb}
else % if luatex or xetex
  usepackage{unicode-math}
  defaultfontfeatures{Scale=MatchLowercase}
  defaultfontfeatures[rmfamily]{Ligatures=TeX,Scale=1}
fi
% Use upquote if available, for straight quotes in verbatim environments
IfFileExists{upquote.sty}{usepackage{upquote}}{}
IfFileExists{microtype.sty}{% use microtype if available
  usepackage[]{microtype}
  UseMicrotypeSet[protrusion]{basicmath} % disable protrusion for tt fonts
}{}
makeatletter
@ifundefined{KOMAClassName}{% if non-KOMA class
  IfFileExists{parskip.sty}{%
    usepackage{parskip}
  }{% else
    setlength{parindent}{0pt}
    setlength{parskip}{6pt plus 2pt minus 1pt}}
}{% if KOMA class
  KOMAoptions{parskip=half}}
makeatother
usepackage{xcolor}
IfFileExists{xurl.sty}{usepackage{xurl}}{} % add URL line breaks if available
IfFileExists{bookmark.sty}{usepackage{bookmark}}{usepackage{hyperref}}
hypersetup{
  hidelinks,
  pdfcreator={LaTeX via pandoc}}
urlstyle{same} % disable monospaced font for URLs
usepackage{graphicx}
makeatletter
defmaxwidth{ifdimGin@nat@width>linewidthlinewidthelseGin@nat@widthfi}
defmaxheight{ifdimGin@nat@height>textheighttextheightelseGin@nat@heightfi}
makeatother
% Scale images if necessary, so that they will not overflow the page
% margins by default, and it is still possible to overwrite the defaults
% using explicit options in includegraphics[width, height, ...]{}
setkeys{Gin}{width=maxwidth,height=maxheight,keepaspectratio}
% Set default figure placement to htbp
makeatletter
deffps@figure{htbp}
makeatother
setlength{emergencystretch}{3em} % prevent overfull lines
providecommand{tightlist}{%
  setlength{itemsep}{0pt}setlength{parskip}{0pt}}
setcounter{secnumdepth}{-maxdimen} % remove section numbering
ifluatex
  usepackage{selnolig}  % disable illegal ligatures
fi

author{}
date{}

begin{document}

begin{figure}
centering
includegraphics{pinguino.svg}
caption{El pinguino de linux}
end{figure}

Lorem Ipsum is simply dummy text of the printing and typesetting
industry. Lorem Ipsum has been the industry's standard dummy text ever
since the 1500s, when an unknown printer took a galley of type and
scrambled it to make a type specimen book. It has survived not only five
centuries, but also the leap into electronic typesetting, remaining
essentially unchanged. It was popularised in the 1960s with the release
of Letraset sheets containing Lorem Ipsum passages, and more recently
with desktop publishing software like Aldus PageMaker including versions
of Lorem Ipsum.

begin{figure}
centering
includegraphics{https://upload.wikimedia.org/wikipedia/commons/3/35/Tux.svg}
caption{El pinguino de linux}
end{figure}

end{document}

I am newbie with latex and I don’t see the trick to include graphics from url.

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP