New answers tagged

0

There are a number of ways of tackling this depending on how your directories are laid out. If you directory tree looks like -foo -foo1.tex -foo2.tex -baz.pdf -baz.eps -bar -bar1.tex -qux.pdf where the files in the foo and bar directories have unique names, then you can specify the TEXINPUT environment variable to include the sub-directories. ...


1

You can use \graphicspath{{foo}}\input{foo/1} .. \graphicspath{{bar}}\input{bar/1}


1

You specify \fancyhead[CO] multiple times. Only the last one is used as the previous one gets overwritten. Try putting everything you want to center into one \fancyhead[CO] and try to achieve the "image above title" fe. with \\ or similar, ie.: \fancyhead[CO]{% \parbox{1.5cm}{\includegraphics[width=2cm]{C:/My_path/my_pic.png}}\\ {\Large ...


1

With use of \sbox{...} you can measures the size of left images and then accommodate your image with legend to its height: \documentclass{article} \usepackage{subcaption} \usepackage{graphicx} \begin{document} \begin{figure} \begin{subfigure}[b]{0.5\textwidth} \centering \includegraphics[width=0.9\textwidth,trim=3mm 4mm 50mm 2mm, ...


1

The reason for the legend being offset like this is because the [b] option to the subfigure environment tells it to align the contents at the bottom; hence why the bottom of the legend is sitting at the same level as the bottom of the (c). If you want to align to each subfigures centres, use [c] and if you want to top of each subfigure to line up, use ...


2

Use width=\columnwidth and load package caption: \begin{frame} \begin{columns}[t] \column{.5\textwidth} \includegraphics[width=\columnwidth,height=3cm]{example-image-golden} \captionof{figure}{foo} \includegraphics[width=\columnwidth,height=3cm]{example-image-golden} \captionof{figure}{bar} ...


2

Not there are always issues with minipages. If fact, I found this the easiest approach for this type of cover. I left a MWE as the first page of the book document, since this would be suitable when the goal is the own PDF instead of the hard copy. (Sorry, no scientists nor tigers here, I found only landscapes and a pussycat in the image-gallery directory ...


4

I'm a co-founder of Overleaf. Yep, that's a bug. Thanks for the MWE --- we'll try to get that fixed! In the mean time, if you change the trim or something else on the page, the preview will update. And, as you noticed, the PDF itself will show the right image if you download it.


8

You may also try the textpos-package. It has a good manual, and is easy to learn, even if you learn by trial and error. If you like me is not skilled in Tikz, maybe you find textpos easier to use. I have made the cover page, but you will have to link to your own files. Probably, you should harmonise the high and width of all picture in an external program, ...


6

Here's an example using images from my own computer. You can use your own. \documentclass[10pt]{book} \usepackage{graphicx} \usepackage{tikz} \usetikzlibrary{calc} \newcommand\myhoffset{0.75in} \newcommand\mytitlesep{1.00cm} \newcommand\portraitscalefactor{85/100} \newcommand\portraitheight{\dimexpr1in*\portraitscalefactor} ...


9

Something like this? Note that the images on the left are not all the same width because the images I used have different proportions. Provided yours have the same height:width ratio, they will match in width. \documentclass[letterpaper]{article} \usepackage[scale=1]{geometry} \usepackage{tikz,calc} \usetikzlibrary{positioning,calc} ...


0

For me title page comes in the first page itself. Minipages are even when the first minipage width as {0.18\textwidth} and the second one as {0.85\textwidth}. Between the two minipages environments write the command \hspace{-0.3cm}and execute the code you will the desired result.


2

As I suggested in my comment, I wouldn't recommend include pictures of tables. I understand that creating large tables with the tabular environment can be somewhat tedious, but if you are tabulating data files, there is pgfplotstable that can be immensely helpful (it is distributed with PGFplots). Here's a small example of how it can be used: ...


1

I would recommend the background package for this. Admittedly, this is mostly because I know it mostly works. (However, it turns out, there is also a good reason to use something other than xwatermark if using a KOMA class. See below.) Solution with background package For example: \documentclass[11pt,ngerman,a4paper]{scrartcl} \usepackage{background} ...


1

Kyle, my suggestion perfectly work: Above image is generated by: \documentclass[12pt]{report} \usepackage{graphicx} \begin{document} \begin{figure}[h!]\centering \includegraphics[scale= 0.3]{example-image} \caption{A part of an MRS.} \label{fig:MRS} \end{figure} \end{document} If this doesn't happen with your real image, than it has blank space on the ...


4

Package caption for such cases define macro \ContinuedFloat- To the float, which is continuation of previous one, you only add this macto after begin{figure}: \documentclass[11 pt]{book} \usepackage[draft]{pgf} \usepackage{lipsum} \usepackage{float} \usepackage{caption}% <-- added \begin{document} \lipsum[1-2] \begin{figure}[h] \centering ...


2

You can set the content in the sequence that you want them layered. With the above in mind, we can set the image in the Left header, which will be followed by setting of the Centred header: \documentclass{article} \usepackage{graphicx,fancyhdr,xcolor,lipsum} \fancyhead[C]{\textcolor{white}{\thepage}} ...


4

Here's one way: \documentclass{article} \usepackage{fancyhdr,stackengine,xcolor,graphicx} \fancypagestyle{mystyle}{ \chead{\stackinset{c}{}{c}{}{\textcolor{red}{\thepage}}{% \includegraphics[width=1cm]{example-image}}} } \pagestyle{mystyle} \begin{document} My text \end{document}


1

The underlying cause are different coordinate-system conventions: Both DVI and PostScript have the origin in the top-left corner of the page, whereas PDF unfortunately moved it to the bottom-left corner. So any program that converts between PostScript and PDF (or DVI and PDF) has to assume a paper height, and shift all coordinates by that height. ...


3

With \begin{columns}[T] you can have the columns aligned to the top. \documentclass[14pt,handout,t]{beamer} \usepackage{lmodern} \addtobeamertemplate{frametitle}{\vspace*{2cm}}{\vspace*{1mm}} \geometry{paperwidth=297mm,paperheight=210mm} \usepackage{graphicx} \usepackage{lipsum} \setbeamersize{text margin left=100pt,text margin right=100pt} \begin{document} ...


2

The reference point of an image is at its bottom. Add some space in the left column, \vspace{\topsep} is the same as what's added by the itemize environment in the right column. In other cases you can use \vspace{0pt}. \documentclass[14pt,handout,t]{beamer} \usepackage{lipsum} \geometry{paperwidth=297mm,paperheight=210mm} \setbeamersize{text margin ...


1

Here's a solution that uses the [h!] position specifier to direct LaTeX to make the figure environment non-floating. Of course, this method won't work if there's not enough space remaining in the column to actually insert the two side-by-side images and their captions. Instead of absolute widths for the minipages and images, I'd use relative widths, e.g., ...


4

A common misunderstanding is that figures or tables have to be placed in an environment of the same name to let them float away. They can be placed in situ (given enough space is available), just dropping the figure or table environment. If a caption is needed (the \label command in the MWE is useless without \caption, then \captionof by the caption package ...


3

Here's a nested tabular approach. Depending on the real size of the photo there's some adaption to be done, of course, as well as left/right alignment (e.g. dropping the center environment) and the geometry of the page, e.g. the top margin. \documentclass[a4paper,12pt]{letter} \usepackage{graphicx} %\graphicspath{ {C:/Users/asus_user/Pictures/} } ...


1

You can use the column environment and create appropriate columns for the desired effect. Here is the code I used to generate the picture \begin{columns}[T] \column{0.43\linewidth}\begin{block}{Assumption} \begin{itemize} \item Text. \item Text. \item Text. \item Text. \end{itemize} \end{block} \column{0.5\linewidth} \begin{figure}[p] \centering ...


2

You can grab the floatrow documentation code: \floatsetup[widefloat]{margins=hangleft} \begin{figure*}% \begin{floatrow}[4] \ffigbox {\caption{Figure~I in the row (\texttt{floatrow}), ``column'' width}% \label{fig:row:Dog}} {\input{TheDog.picture}} \ffigbox[\FBwidth] {\caption{Figure~II in the row (\texttt{floatrow}), ...


1

In your answer you just show the colorbar in log values, but didn't "transform" the meta data. To do so use meta expr={log10(\thisrowno{2})}. But then the \foreach loop does result in an error, because the meta expr doens't get expanded. To overcome this issue replace the loop with \pgfplotsinvokeforeach. So that others can reproduce that it works, I have ...


1

I've found how to have a log axis, I should have read the colorbar part in the manual better. I just had to add ymode=log: colorbar style={ylabel=$C_{ligne,si}$,ymode=log,ytick={1e-6,1e-5,1e-4,1e-3}}, Here is the end result: Now the problem is, the axis changed, but the colors are incorrect: the colors in the figure have not changed even though the ...


2

How about \documentclass[preprint,12pt,authoryear]{elsarticle} \begin{document} \begin{figure} \caption{abc} \label{fig:abc} \includegraphics[width=\textwidth]{<filename>} \end{figure} \end{document} Simply use a real filename, of an image file encoded in a supported format, instead of <filename>.


2

Since it's not so easy to get rid of the skips, rules, and boxes the \caption command would use, I would use \phantomcaption instead (for managing the counter and label) and typeset the sub-caption on my own, e.g.: \documentclass{article} \usepackage{graphicx} \usepackage{caption,subcaption} \usepackage{stackengine} \begin{document} \begin{figure} ...


1

Some manual work, but this seems to be what you're looking for. Note that subfigure has been obsolete for several years and subfig is much better, if not subcaption that, however, has quite a different syntax. \documentclass{article} \usepackage{graphicx} \usepackage{subfig} \begin{document} \begin{figure}[htp] \centering ...


1

You could define a \centerbox command which you wrap around all the images you want to include. Technically, it's not the label "(a)" which is off, but the images only get placed with zero offset. That's what you can change with a \raisebox. \documentclass{article} \usepackage{graphicx} \usepackage{subfigure} ...


0

Just remove also the \makeletterhead instruction (the documentation explains how to make your own). For the rules, you can set their thickness with \Headlinewd and \Footlinewd. \documentclass[10pt,stdletter,dateno,sigleft]{newlfm} \usepackage{charter} % Use the Charter font for the document text \newlfmP{sigsize=50pt} % Slightly decrease the height of ...


0

Here is a very simple adaptation that replicates your newlfm letter inside the article document class: \documentclass{article} \usepackage{charter} % Use the Charter font for the document text \usepackage[margin=1in]{geometry} \setlength{\parindent}{0pt}% No paragraph indent \setlength{\parskip}{.5\baselineskip} \pagestyle{empty}% No headers/footers ...


0

Commenting the \newsavebox{\Luiuc}\sbox{\Luiuc}{\parbox[b]{1.75in}{\vspace{0.5in} \includegraphics[width=1.2\linewidth]{logo.png}}} % Company/institution logo at the top left of the page won't work, since \makeatletter requires this box later on. Rather omit the \includegraphics macro there and use it later on, since it provides some spacing (but this ...


0

I saw this issue with a jpeg file. By changing its extension from .JPG to .jpg (yes, just capital to lower) the error went away. $ pdflatex --verion pdflatex: unrecognized option '--verion' This is pdfTeX, Version 3.1415926-2.5-1.40.14 (TeX Live 2013/Debian) restricted \write18 enabled.


3

As suggested by Thomas, you can use tables instead. ConTeXt has different table mechanisms. Personally, I find the natural tables environment to be most versatile. Here is how to achieve what you want using natural tables: \defineexternalfigure[vhs][width=3cm] \startsetups collection \setupTABLE[frame=off, align={midle,lohi}] \stopsetups \starttext ...


1

I can tell you what's the simplest way for me. I use Inkscape to do the drawings and export as pstricks (Save As: "Latex + pstricks macros). I took me ~5 mins to do the drawing. Everything in the mydiagram definition is generated by Inkcape. \documentclass{minimal} \usepackage{pstricks} \newcommand*{\mydiagram}{% ...


2

After cropping the image, I've used the following latex code: \begin{figure} \centering\includegraphics[scale=0.4]{Figure5_RPC_Problem_1}\caption{Wider than figure text. Wider than figure text.Wider than figure text.Wider than figure text.Wider than figure text.Wider than figure text.Wider than figure text.Wider than figure text.Wider than figure text.Wider ...


1

If you want to use a pstricks export with pdflatex, you have to: 1) load auto-pst-pdf (after pstricks) 2) Launch pdflatex with the --enable-write18 switch (MiKTeX) or --shell-escape (TeX Live, MacTeX).


0

After trying several failing options pstricks export, which failed to work properly with pdflatex tikz output with \include and resizebox, the following works: Output your diagram as "LaTeX pgf macros (.tex)" Create a \begin{adjustbox} environment (with the \usepackage{adjustbox} header) \input the file into this environment (you could also copy-paste ...


1

You can do that with a simple \raisebox command: \documentclass[paper=a4, oneside, fontsize=12pt]{scrartcl} \usepackage[utf8]{inputenx} \usepackage[T1]{fontenc} \usepackage{textcomp} \usepackage[ngerman, english]{babel} \parindent3mm %% page geometry \usepackage[a4paper, left=30mm, right=30mm, top=25mm, bottom=30mm]{geometry} %% Selection of the fonts ...


1

Add \usepackage[export]{adjustbox} and use \includegraphics[width=0.16\textwidth,valign=t]{DonEK} Example: \documentclass[paper=a4, oneside, fontsize=12pt]{scrartcl} \usepackage[utf8]{inputenx} \usepackage[T1]{fontenc} \usepackage{textcomp} \usepackage[ngerman, english]{babel} \usepackage{graphicx} \usepackage[export]{adjustbox} \parindent3mm %% page ...


2

Complete example, using the \tooltip macro from this post (go there for further information about its usage and PDF reader compatibility): \documentclass[12pt]{scrbook} \usepackage{mwe} %example images \usepackage{tikz} %for building a graph %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % optimized for Adobe Reader ...


10

I use quite often trim without clip to move graphics a bit around or change the spacing before and after a graphic or get a graphic in the background: \documentclass[10pt]{article} \usepackage{graphicx,lipsum} \begin{document} \includegraphics[trim=5cm 4.5cm 0cm 0cm,width=3cm]{example-image}\lipsum*[1] \end{document}


10

The original idea was that trim was just a way of adjusting the bounding box by specifying offsets from the edges rather than a new bounding box with bb, so like the bb key it adjusts the size latex leaves but if the image is really bigger than that it would over/under print the surroundings. clip clips. It's a long time ago and i can't remember all the ...


1

You cannot mix some text (section title) and sidewaysfigure on the same page. In your case, if the image is shorter than rest of vertical place on the page and you like to have both on the same page, just can rotate only image: \documentclass[a4paper]{report} %\usepackage{float} \usepackage[margin=25mm,showframe]{geometry} %\usepackage{rotating} ...


0

Another possibility is use multirow package: \documentclass{article} \usepackage{multirow,tabularx}% <-- added multirow \usepackage[demo]{graphicx} \usepackage{fancyhdr} \usepackage[a4paper, portrait, margin=1in, headheight=73pt, includehead]{geometry} \usepackage{ucs} \usepackage[utf8x]{inputenc} \usepackage[T1,T2A]{fontenc} \usepackage[russian]{babel} ...


0

Here is a way, with a simple \raisebox. I also added input encoding, and had to change some parameters with geometry: \documentclass{article} \usepackage{tabularx} \usepackage[demo]{graphicx} \usepackage{fancyhdr} \usepackage[a4paper, portrait, margin=1in, headheight=73pt, includehead]{geometry} \usepackage{ucs} \usepackage[utf8x]{inputenc} ...


1

I would edit the \header code and add something like the following: \node [anchor=north] at (name.east) {% \includegraphics[height=2.5cm, width = 2.5cm, right]{picture.png}% }; You can adjust the position with [xshift=5em] after (name.east)



Top 50 recent answers are included