Tag Info

Hot answers tagged

10

I used scipy to transform the heightmap to a data matrix and then wrote the coordinates and the height values to a file. Exact height profile #!/usr/bin/python import numpy as np from scipy import misc matrix = misc.imread('536ws.jpg',flatten=True) x,y = matrix.shape mesh = "" for i in range(0,x): for j in range(0,y): mesh += "%d\t%d\t%d\n" ...


9

An image inserted with \includegraphics is just like a big letter. You can achieve your aim by removing the interline glue that TeX inserts. Interacting with paragraphs might be complicated, so it's better to resort to lower level commands, in this case: \newcommand{\twoobjects}[2]{% \leavevmode\vbox{\hbox{#1}\nointerlineskip\hbox{#2}}% } Full example: ...


7

You can use endfloat, telling it that it shouldn't process the delayed floats: \documentclass{article} \usepackage{graphicx} %%% Remove the next two lines if you want the figures at their place \usepackage[figuresonly,nolists,nomarkers]{endfloat} \renewcommand{\processdelayedfloats}{} \usepackage{lipsum}% mock text \begin{document} \lipsum[1] ...


7

Assume you have a document containing your two-side document (I'll use lipsum50.pdf, since it contains 50 paragraphs of Lorem Ipsum style dummy text). Now create a stand-alone document with the following layout: \documentclass{article} \usepackage{eso-pic,graphicx} \begin{document} \AddToShipoutPictureFG*{ ...


4

standalone is meant for producing images that stand alone literally. Using geometry package and trying to impose a4paper is meaning less. You should use one of the standard classes like article here. Most possibly, you will be needing a caption for your figure so it makes sense to use the figure environment that allows you to put a caption. Then, you can use ...


4

You could create an emulation of what \newcommand with two optional argument does, but I think it's better using xparse and expl3 for this: \documentclass{article} \usepackage{xparse} \ExplSyntaxOn \NewDocumentCommand{\createCMDSH}{mmmm} { \guuk_create_cmdsh:cxx { #3#2 } { #1 } { #4 } } \cs_new_protected:Nn \guuk_create_cmdsh:Nnn { ...


4

\documentclass{article} \usepackage{graphicx} \usepackage{subcaption} \def\LW{\dimexpr.25\linewidth-.5em} \begin{document} \begin{figure} \parbox{\LW}{\includegraphics[width=\linewidth]{example-image-a}}\hfill% \parbox{\LW}{\subcaption{This is the A example image}}\hfill% \parbox{\LW}{\includegraphics[width=\linewidth]{example-image-b}}\hfill% ...


3

I've downloaded the images you've posted and they are in letter paper format. If you want to include them in a a4 paper document you have to decide if you want to stretch them to fill the whole page or to have some blank space above and below them. In the first case, you can use \thispagestyle{empty} \begin{tikzpicture}[remember picture,overlay] ...


3

\documentclass{article} \usepackage{graphicx} \usepackage[export]{adjustbox} \begin{document} \begin{figure} \includegraphics[width=.2\textwidth,valign=m]{example-image-a} \begin{minipage}{.2\textwidth} \caption{an image} \end{minipage} \hfill \includegraphics[width=.2\textwidth,valign=m]{example-image-b} \begin{minipage}{.2\textwidth} \caption{another ...


3

\documentclass{article} \usepackage{graphicx,lipsum} %-------------------------------------------------- \newsavebox\mtbox \newcommand{\mtgraphics}[1]{% \sbox\mtbox{\includegraphics{#1}}% \null% \dimen255=\dimexpr\pagegoal-\pagetotal-\baselineskip\relax% \ifdim\dimen255>\ht\mtbox \usebox\mtbox \else \dimen254=\dimen255% ...


2

You combine the \newcommand syntax of parameter declarations with \xdef primitive. But primitive commands have normal and elegant syntax without square brackets. \def\createCMDM#1#2#3#4{% I don't understand why #3 is merged with #2 \expandafter\@ifdefinable\csname #3#2\endcsname{% \expandafter\gdef\csname #3#2\endcsname##1{% ...


2

Use \graphicspath in the preamble as in: \documentclass{article} \usepackage{graphicx} \graphicspath{{./img/},{./pictures/}} \begin{document} \includegraphics{one} %picture named one in directory img \includegraphics{two} %picture named two in directory img \includegraphics{three} %picture named three in directory pictures \end{document} ...


2

Probably the easiest way is using the background package. Hopefully, this does not count as "heavy weight":) Here's how I would do it: \documentclass{article} \usepackage{background} \usepackage{graphicx} \usepackage{mwe} \backgroundsetup{placement=top, contents={\includegraphics[width=\textwidth,height=2truemm]{example-image-a}} } \begin{document} ...


1

As @sigur has already pointed out in a comment, you need to adjust the way you specify the width of the second image. You may also want to align the minipages in a way that both captions are at the same level; this can be done, e.g., by setting the location specifier [b] for the two minipage environments. A separate comment: Since the two minipages occur ...


1

The 0pt optional argument can be changed, even to a negative number if an overlap is desired. \documentclass{article} \usepackage{stackengine,graphicx} \begin{document} \stackon[0pt]{\includegraphics[width=3in]{example-image-A}}% {\includegraphics[width=3in]{example-image-B}} \end{document}


1

The spaces in the file name of the image are the problem. The following should work, assuming you rename the image accordingly. Furthermore, you should use \centering instead of \begin{center}...\end{center} in images to avoid additional white-space: \begin{figure} \centering \includegraphics[scale=0.8]{example_flow_diagram.png} \caption{example flow ...


1

\inlcludepdf always inserts the content on separate pages, because it inserts the pdf-document into your document. If you want the pdf to appear on a page within your document you have to use \includegraphics, which works perfectly fine with pdf files as images in pdflatex. \usepackage{graphicx} \subsection{Kopie des Projektantrages} ...


1

This solves the problem :-) \includepdf[pages=1,pagecommand={\subsection{Kopie des Projektantrages} \thispagestyle{empty}}, fitpaper=true]{\antrag} \includepdf[pages=2-,pagecommand={\thispagestyle{empty}}, fitpaper=true]{\antrag}


1

The easiest way to align things vertically is to use a tabular. You can also force them to be vertically aligned by restricting the available space using \parbox or a minipage. In both case there will still be a small gap which can be removed by tweaking. \documentclass{article} \usepackage{graphicx} \usepackage{mwe} \newlength{\desired} ...


1

To fit the whole page Thi is the easy part. With the geometry package you can set an unnoticed margin and then fix the size the image to \textwidth (that now is almost the same that \paperwidth) and \textheight (~ \paperheight). This can produce some distortion if the image have not exactly the same height/width ratio that the paper (e.g. scanned ...


1

I won't provide explanations but suggest you to read pgfmanual. There are nice tutorials there as commented by darthbith. What you want can be easily done. \documentclass[tikz,border=4]{standalone} \usepackage{siunitx} \usetikzlibrary{positioning} \tikzset{mynode/.style={draw,text width=1in,align=center} } \begin{document} \begin{tikzpicture} ...



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