Tag Info

Hot answers tagged

10

Reading filenames from another file can be tricky as soon as there are special characters in the file name, such as _ etc. This uses \readline, which changes the catcodes accordingly and stores the read file name to a list, here called \mylist. To display the graphics, it's 'sufficient' to define a list processor, basically doing \includegraphics. ( I ...


5

There's a limit for graphics dimensions, bounded above by \maxdimen (16384pt); in the case of the height for images, the limit is around 574cm to 576cm for some of the images I tested. For example, \documentclass{article} \usepackage{graphicx} \begin{document} \includegraphics[height=576cm,width=2cm]{example-image-a} \end{document} triggers the ...


5

This is by no means a solution. It's just a really dirty workaround, but it might be good enough if you are in a hurry. \documentclass{article} \usepackage{graphicx} \usepackage{accsupp} \newcommand\squelchgraphics[2][]{% \BeginAccSupp{method=plain,ActualText={}}\includegraphics[#1]{#2}\EndAccSupp{}} \begin{document} ...


2

Something like this may work (untested) \usepackage{etoolbox,graphicx} \newcommand\HandlePic[1]{% \includegraphics[width=3cm]{#1} \par } \forcsvlist\HandlePic{A,B,C} Each item in the list is given one by one to the handler. Just an addition to Christians solution. Here is a POC using the verbatim package to misuse \verbatiminput ...


2

The command \includegraphics[page=n,viewport=x y X Y,clip]{filename} extracts page n from filename.pdf and clips it to a rectangular viewport with corners at (x,y) and (X,Y). Coordinates are relative to the origin of the bounding box. Since the clipping is arbitrary, performing it by mere deletion of the objects in the input document would be impossible. A ...


2

When the logo is stored as Vector Art in the pdf (The case in OP), you can use Inkscape to do the job: Import the pdf into inkscape. Select the object that appears, right-click and select "ungroup" as many times as needed to disentangle the bit you want from all the others. Delete everything except the desired graphic. Go into "Document Properties" and ...


2

Better lie! The following tells LaTeX that the box containing the image is 0pt in width, but then puts an image with width .5\paperwidth inside. This corrects the centring and prevents complaints about overfull boxes. (It should therefore only be used when you are sure you do not want to hear TeX's warnings!) \documentclass[12pt]{article} ...


2

\includegraphics[quiet... %%%%%


1

Use a tabular: \documentclass{article} \begin{document}‎‎ \noindent \begin{tabular}{@{}cccc@{}} & & \rule{3cm}{15pt} \\ & & \rule{3cm}{15pt} \\ \rule{1cm}{3cm} & \rule{1cm}{3cm} & \rule{3cm}{3cm} \\ \end{tabular} \end{document} Instead of the \rules, place your tikzpictures.


1

This is surely not the most efficient or elegant way but I was curious whether this might work. bashful allows you to run scripts from within a LaTeX document provided, of course, that you compile with shell escape enabled. Put the following in myimagewidth.sh: #!/bin/sh - pdfinfo $1.pdf | grep "Page size" | sed -e 's/^Page size:[[:space:]]*//' -e 's/ ...


1

It seems rather pointless to include an image like this but anyway tex can allow boxes bigger than \maxdimen so long as you never do any arithmetic on the lengths: \documentclass[10pt,notitlepage]{article} \usepackage{graphicx} \begin{document} \centering \mbox{\pdfimage height \textheight{image.pdf}} \end{document}


1

I am not sure whether it is as elegant as \graphicspath, but another idea may be to have a command pointing to the relative path of the document. In the document, you can do \makeatletter% \ifx\mypath\@empty% \xdef\mypath{.}% \fi% \makeatother% right at the document's beginning, which sets the path to . (the current folder) if it has not been defined. In ...


1

What are the problems you are facing when you use wrapfig? The following code works: \documentclass[10pt,a4paper,twocolumn]{report} \usepackage[utf8]{inputenc} \usepackage{wrapfig,lipsum} \begin{document} \textbf{Title} \lipsum[2] \noindent \begin{wrapfigure}[2]{l}{20pt} \vspace{-1\intextsep}\rule{20pt}{20pt} \end{wrapfigure} \textbf{Title} \lipsum[2] ...



Only top voted, non community-wiki answers of a minimum length are eligible