Questions tagged [adjustbox]

{adjustbox} package allows to adjust general (La)TeX material in several ways using a key=value interface. It got inspired by the interface of \includegraphics from the graphicx package. This package also loads the trimclip package whose code was once included in this package.

Filter by
Sorted by
Tagged with
38 votes
1 answer
41k views

Cropping/Trimming an image with includegraphics by specifying percentages

Say I have an image my_image.png that I am loading in my LaTeX document using: \begin{figure} \includegraphics[width=0.5cm]{my_image.png}} \end{figure} Is there a way of telling LaTeX to only render ...
Amelio Vazquez-Reina's user avatar
20 votes
3 answers
10k views

How to scale and then trim an image?

I am trying to create a document that requires the inclusion of images at a precise size (h x w inches). I would like to reuse the document template, so I would like to create a command that would ...
Amaru's user avatar
  • 301
18 votes
4 answers
35k views

! LaTeX Error: File `adjustbox.sty' not found on Ubuntu 10.04.2

I have install $ sudo apt-get install texlive-full on Ubuntu 10.04.2 but when I run I got this error about adjustbox. ! LaTeX Error: File `adjustbox.sty' not found Is there anyone know how to ...
Sarawut's user avatar
  • 181
15 votes
1 answer
17k views

Why does adjust box not resize to the dimensions given

Hi looking to understand this a little better. Why does adjustbox not resize the text in the following example so that it fits the dimensions I think I'm specifying. e.g a 4in x 4in box. Am I doing ...
Tahnoon Pasha's user avatar
13 votes
4 answers
1k views

How to cut off part of a letter

I want to cut off the very top left part of an uppercase R. I tried using \adjustbox, but it cuts off the whole top part, which is not what I want. Here's the MWE, the corresponding output and the ...
noibe's user avatar
  • 2,084
11 votes
2 answers
16k views

Frame option in includegraphics makes an overfull \hbox

I'm using the adjust package to add the frame option in \includegraphics command. The package is loaded in this way: \usepackage[export]{adjustbox} Now I can write the following command: \...
eang's user avatar
  • 247
9 votes
1 answer
6k views

error '\clipbox already defined' when use package adjustbox

I am trying draw table. I use adjustbox package. I loaded this package in separate file. That separate file contains the packages I use. \usepackage{inputenc} \usepackage{graphicx,color} \usepackage{...
Vijay's user avatar
  • 521
9 votes
2 answers
736 views

Precise alignment of a caption to the graphic, not wrapfigure

I'm a bit anal about caption positioning. In the following screenshots there are several issues: Figure (0.1): ✅ the image is correctly positioned at the very right (it touches the magenta line) ✅ ...
unDavide's user avatar
  • 265
9 votes
2 answers
10k views

How do I export adjustbox-parameters?

I have got two adjustboxes (from the adjustbox package). Now I need to give the second box the same totalheight as the one which the first box got. \documentclass{article} \usepackage{etex} \...
Stephen's user avatar
  • 14.9k
9 votes
1 answer
7k views

Adjustbox on a landscape page makes a table too small

I am trying to use adjustbox to scale down a table that is too large for a landscape page, but when I use it, the scaled table is much smaller than it needs to be relative to the size of the page. Any ...
Scott B's user avatar
  • 93
9 votes
1 answer
2k views

tcolorbox: How to create layout of single box on one side, multiple boxes on other?

I have three tcolorboxes where I would like the layout to be similar to this: I can make the titles of the first and second box align using the adjustbox package (as seen here), but I'm unsure how I ...
luser's user avatar
  • 267
9 votes
3 answers
25k views

rotate table (90 degrees) and stretch to fill whole page

I'd like to rotate a table (90 degrees) and stretch it to fill whole page. That's what I've got so far: \documentclass{book} \usepackage{tabularx} \usepackage{adjustbox} \begin{document} \...
Moldevort's user avatar
  • 1,295
9 votes
2 answers
2k views

Defining a centered shadowboxed listings environment

I'm trying to define a environment for code listings wrapped in a shadowbox and centered in the line. Using this code, I can generate the kind of output that I want: \documentclass[twocolumn]{...
Joshua Taylor's user avatar
8 votes
1 answer
4k views

How to scale a verbatim block in a user-defined environment?

In order to produce an ereader-friendly PDF with small page dimensions, I'd like to scale down some oversize verbatim blocks such as program output with lines too long for the small page. Then readers ...
Yar's user avatar
  • 183
7 votes
2 answers
308 views

Why adjustbox needs a tweak of raise=-0.3ex with enumitem?

The MWE below yields the desired results. But, is there a better way to get this alignment instead of the raise=-0.3ex: Without the raise=-0.3ex, the item number is not aligned with the text: Code: \...
Peter Grill's user avatar
7 votes
1 answer
12k views

Resizing table when using package {threeparttable}

I'm using the {threeparttable} package because I want to use table notes, but I'm having a problem resizing my tables. If I use {adjustbox} to enclose {tabular} (or {tabularx}), I get an error message:...
Mark Birtwistle's user avatar
7 votes
1 answer
2k views

Adjustbox ate my newlines

Apologies for the long MWE. Wanted to understand what I was doing wrong here. Trying to shrink this as part of a longer exercise in producing some slides. (This is the legend for a graphic referenced ...
Tahnoon Pasha's user avatar
7 votes
1 answer
2k views

Robust colored background for parts of the document

I would like to set off certain parts of my document by giving them a colored background. With the help of adjustbox I was able to write an environment that does more or less what I want: It puts its ...
alexis's user avatar
  • 7,981
6 votes
2 answers
4k views

Centering wide 2x2 figure using adjustbox

I have four large figures which I would like to tile 2x2. These figures will need to go beyond the \textwidth boundaries but I still want the 2x2 tile centered in the page. Looking at Center figure ...
user3756's user avatar
6 votes
1 answer
9k views

vertical aligning images in table with \adjustbox only works when not every image is in an \adjustbox

I'm trying to center all images vertically and horizontally within a table cell. Therefore I'm using the adjustbox packet. This is the code I use for my table: \begin{table}[b] \begin{center} \...
Flying Rocket's user avatar
6 votes
2 answers
3k views

"adjustbox" with Export option seems to break page selection (in "pdfpages")

I'd like to include some pages from a separate PDF with the right half trimmed off, but I don't know in advance the exact size of the pages. I tried a solution, using pdfpages to include from the PDF ...
Alex Watson's user avatar
6 votes
1 answer
1k views

Horizontal array of enumerated equations

This is for use in work assignments for math students. I'd like to post multiple parts for a given question, without sacrificing too much space for this. So I want a bunch of equations arrayed ...
MvG's user avatar
  • 2,643
6 votes
1 answer
10k views

Adjustbox not showing caption with key option chosen

I can't get a caption to show up in the following MWE. I've put caption at the end of the key list, and in the actual example the BLAH BLAH BLAH is replaced with an \input{table.tex} variant, but the ...
Tahnoon Pasha's user avatar
6 votes
1 answer
1k views

customized caption and label for adjustbox

The question is a follow up of the question posted here how to make adjustbox work correctly . \documentclass{scrartcl} \usepackage{adjustbox} \usepackage{wrapfig} \usepackage{lipsum} \usepackage{...
Kabira  K's user avatar
  • 1,337
6 votes
2 answers
8k views

Reference to figure label in adjustbox

\begin{figure} \begin{adjustbox}{addcode={\begin{minipage}{\width}}{\caption[bla] {% bla ..., fig. \protect\ref{fig:fig1}, ...bla. } \end{minipage}}} \includegraphics[scale=1]{figure.png} \end{...
Axel Axel's user avatar
6 votes
0 answers
230 views

Draft option with adjustbox package [closed]

I've been using the great labour-saving adjustbox package to excellent results. Nonetheless, when using the draft option with the \adjustimage command I do not get the expected result, namely, the ...
Marcos's user avatar
  • 5,422
5 votes
3 answers
1k views

Pass frame option to \includegraphics by default?

I'm a copy-editor and in my job I format papers for scientific journals. One of my task is (in some cases) to crop images to remove extra space between the images and the bounding box. Usually I use ...
Gabriele's user avatar
  • 1,925
5 votes
2 answers
11k views

How to fit a wide table landscape orientation

I have this simple code: I can build the table on landscape orientation, but when I insert the command adjustbox, there are some erros: Not in outer par mode undefined conttrol sequence ... Error ...
Wilmer's user avatar
  • 111
5 votes
1 answer
512 views

LaTeX align/distribute objects à la InDesign?

I'm trying to replicate, in LaTeX, InDesign's align and distribute tools. This is a snapshot of ID's toolbar: Say I want first to align vertically two objects (texts, graphics, boxes,...), and ...
NVaughan's user avatar
  • 8,175
5 votes
1 answer
1k views

how to align a two column box

I would like to ask you to share your idea with me regarding to align the following text inside the box. Thank you in advance \pagenumbering{gobble} \noindent\fbox{% \parbox{\textwidth}{% \...
Oliver's user avatar
  • 71
5 votes
1 answer
2k views

! LaTeX Error: File `adjustbox.sty' not found on Fedora 27

I was trying to save a Jupyter notebook as a pdf. I have run sudo dnf install texlive But am getting the error ! LaTeX Error: File `adjustbox.sty' not found.
birdsarah's user avatar
  • 201
5 votes
3 answers
600 views

Automatically resize tabular to avoid it being pushed to next page

Context My document has one title phrase and one table containing texts. I would like to have them both on one page. The table's content may change (sometimes more or less 2-or-3-lines-texts cells), ...
zezollo's user avatar
  • 491
5 votes
3 answers
409 views

How could a verbatimtab environment in a figure environment be resized (perhaps using the package adjustbox)?

How could a verbatimtab environment in a figure environment be resized (perhaps using the package adjustbox)? I have some code something like the following: \begin{figure}[htb] \centering \...
d3pd's user avatar
  • 1,718
5 votes
0 answers
3k views

Fitting TikZ picture in beamer: Difference between using \resizebox and \adjustbox? [closed]

\documentclass[10pt]{beamer} \usepackage{amsmath} \usepackage{amssymb} \usepackage[english]{babel} \usepackage{color} \usepackage{float} \usepackage[T1]{fontenc} \usepackage[latin1]{...
TCSGrad's user avatar
  • 872
4 votes
3 answers
14k views

Fit table into page

I have been trying to create a (simple) table via tablesgenerator with unsatisfying output so far. I would like to create the following table (Table 4. Summary of Selected....) but it wont fit into my ...
Galopito's user avatar
4 votes
2 answers
1k views

How to switch off "figure" in algorithm2e only in certain cases?

Suppose the following situation. Algorithm2e should have the global option "figure", i.e. an algorithm is included in Figures. However we need to switch off this property only in certain cases (to ...
Vladimir Parkhomenko's user avatar
4 votes
3 answers
332 views

Wrap text around rotated table and caption

I try to rotate a large table and also the corresponding caption. Around this rotated figure I want to wrap text. I have this MWE, but in this MWE the caption is not rotated and therefore needs a lot ...
jeiglsperger's user avatar
4 votes
3 answers
575 views

Position image next to a text within an adjustbox created in a newenvironment

I try to create a box with a gray background color, where there is a centered image on the left and a text on the right side of the box. It should look like the boxes created in here. Here's a short ...
j3ypi's user avatar
  • 167
4 votes
3 answers
2k views

Silencing overfull hbox warning for listing in adjustbox

I have the following in my document and it works as I expect, scaling the listing to fit the page, but it gives me a spurious Overfull \hbox warning that I would like to get rid of: \begin{adjustbox}{...
user11171's user avatar
  • 967
4 votes
2 answers
255 views

Restrict background color to varwidth's narrower width with adjustbox?

I want to wrap a frame, with background color, around each table, with its caption included within the frame. For the frame, I've adapted Martin Scharrer's answer to "Adding border around figure and ...
Jim Ratliff's user avatar
  • 1,049
4 votes
1 answer
74 views

adjustbox has a wrong reference at \ref

To rotate a table, I used \begin{adjustbox}. But \ref{} shows a wrong ID when I refer to it, and \centering doesn't work. How to fix it? Thanks! Here are the environment used in the tex file: \...
zlin's user avatar
  • 75
4 votes
1 answer
231 views

Clipped symbol in table caption

I want to place a clipped math symbol in table caption. This MWE works until I uncomment the marked line \documentclass{amsart} \usepackage{trimclip} \begin{document} \begin{table} \caption{Clipped ...
Anvita's user avatar
  • 237
4 votes
2 answers
3k views

Centering text in \adjustbox minipage with \hfill

I need to center text in a adjustbox package with a minipage keyword (see code below). I found I can do this by using two \dotfill or \hrulefill commands on either side of the text. Surprisingly, ...
MarcinKonowalczyk's user avatar
4 votes
3 answers
5k views

adjustbox and includegraphics page selection

I want to use the adjustbox package to include graphics in beamer presentations. I prefer it over graphicx because it has max size option which only scales the figure when its size is larger than a ...
Ignasi's user avatar
  • 137k
4 votes
1 answer
252 views

Text running out of fbox

I have the following piece of Latex code. I want the text to be inside that box but it is running outside. Can someone please help? \documentclass[]{article} \usepackage{varwidth} \usepackage{...
Shweta Aggrawal's user avatar
4 votes
2 answers
26k views

How to left-align a table in LaTeX with nonstandard document class

I need to align my table with the left margin of my page. The adjustbox package looks to be the solution, but I'm having difficulty implementing it. I realize my question is potentially a duplicate to ...
Edward's user avatar
  • 329
4 votes
1 answer
409 views

Itemize environment nested in adjustbox

I need to emphasize a dashed list of formulae by putting it into the colored box. I tried to use adjustbox package and the errors like "Something's wrong--perhaps a missing \item. \item [\bfseries 104:...
Rubisko's user avatar
  • 57
4 votes
1 answer
1k views

Cropping images to box

Is there any easy way in (Lua)LaTeX to crop an image to a specific bounding box, but only cropping on the one dimension which is too large for the box? A solution to crop on the height could be the ...
Jonatan Hjul's user avatar
4 votes
1 answer
2k views

Placement of figures inside an ntheorem environment

I would like to wrap text around a figure in a ntheorem like environment. Currently, I am trying to use the cutwin package, which was suggested e.g. in this question: How to wrap around a figure in a ...
Philipp's user avatar
  • 43
4 votes
3 answers
916 views

Making includegraphics placement conditional on width of graphic

As shown in the MWE below, I am using graphicsx in conjunction with adjustbox. I have a document with many figures and would like to automate the "inner" (as opposed to "center") placement of figures ...
user86012's user avatar

1
2 3 4 5