{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.

learn more… | top users | synonyms

5
votes
3answers
82 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 ...
3
votes
0answers
28 views

\maxsizebox resets color in TikZ \node

While trying to fix an issue in menukeys I think I found a possible bug in adjustbox: It seems to reset the text color in the node. In the following picture all words in the first line should be red, ...
2
votes
2answers
41 views

Minipage are not at same height with textbox

while using minipage, in the second column there is a text box. When I've used fbox in the second column then the text of the first column goes downward so height not remained same for both sides. ...
3
votes
1answer
30 views

delete predefined character area

Hey guardians of knowledge, I need to create special symbols by stacking letters and a reversed version of \u{}. The problem is that diacritics like \u{} come with a predefined character area (try ...
1
vote
2answers
81 views

Left Justification of Table Caption in Adjustbox Package

I want to change the position of table caption to left, i'd appreciate if someone could help, \documentclass[12pt,a4paper]{article} \usepackage{caption} ...
2
votes
1answer
45 views

listing in two-column mode

I want to place a listing, with colored background, in a two-columns document. For safety (for cases when the width of listing only slightly exceeds column width) I put the listing in a \maxsizebox. ...
3
votes
2answers
60 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 ...
1
vote
1answer
46 views

How to limit the size of figure+caption?

I do have my figures (and tables) sometimes with several lines long caption. I am trying to fill out my pages optimally, so I put the payload content in a \maxsizebox. In most cases it works fine, ...
2
votes
2answers
91 views

Fit text within a frame with fixed dimension (shrink only if needed)

My problem I want to define a frame with fixed dimensions (i.e. minimal size = maximal size = defined size), in which there is rich text (with potentially linebreaks, itemization, etc.). Moreover, I ...
3
votes
1answer
97 views

Problem with Tikzpicture and Adjustbox

I would like to place four tikzpictures on the same horizontal line but I am not able to set the tikzpictures on the same horizontal line (see the LaTeX code below). Using the code reported below, ...
2
votes
2answers
136 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, ...
2
votes
1answer
57 views

Various table formatting problems

I've been trying to format a table for my thesis for two days and it just doesn't work. I've already searched everywhere for answers but couldn't find them and/or understand them. Here's what I want ...
2
votes
1answer
84 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 ...
2
votes
2answers
67 views

How to change this table so that it fits in the available text block?

I'm trying to insert a table. If I scale the table via \resizbox, the glyphs are not readable as they are too small. How do I fit it so the contents are easily readable? \begin{table}[] ...
2
votes
2answers
137 views

Align itemize text with graphic and use caption

I would like to align the top of the text with a figure and add a caption with a label to it. But as soon as add caption=test,figure to the adjustbox the picture floats above the text. How do I ...
3
votes
2answers
237 views

Wrap a few lines of Algorithmic in a box

I have some pseudocode where I want to reveal an algorithm little-by-little. Currently I highlight the code that is revealed by coloring it red and this looks good onscreen. However, on print, this ...
4
votes
2answers
82 views

Fit table to textwidth AND textheight

The table below was too long to fit the textheight and not wide enough to fit the textwidth. I would prefer the height of the table to conform to the height specified by the commented-out line ...
4
votes
1answer
189 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 ...
2
votes
1answer
23 views

Documentation for \newadjustboxkey

The documentation for package adjustbox has a brief section describing \newadjustboxkey, but it provides no examples. I tried searching the internet, but Google provided only three results for the ...
2
votes
1answer
118 views

Background color around paperwidth figure

The question could have been subtitled: "how to force a caption to appear always on top of object float". I have a complex set of configurations and commands which I could resume to that MWE. % !TeX ...
2
votes
1answer
270 views

Referencing figure in adjustbox

I have rotated my figure to 90 degrees using adjustbox as follows: \begin{figure}[ht] \begin{adjustbox}{addcode={\begin{minipage}{\width}}{\caption{% My caption ...
4
votes
2answers
266 views

Control the size of an equation (in display mode)

There are several ways to show an equation. I'm trying to put a big equation in display mode (i.e.: \[ {\equation} \]) and to keep it's dimensions within the size that is reasonable, using adjustbox. ...
3
votes
1answer
161 views

minipage layout not correct

I want to generate a document with graph at left and tikz code at the right. I try to use two minipage but it seems it always layout it as up and down. The minipage is 0.45\textwidth, why latex still ...
3
votes
1answer
703 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} ...
5
votes
2answers
238 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 ...
4
votes
1answer
1k 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 ...
1
vote
1answer
119 views

Adjustbox MWE does not compile [closed]

This is taken from the adjustbox manual: \documentclass{article} \usepackage{adjustbox} \begin{document} Before \adjustbox{padding*=1ex 2ex 3ex 4ex,frame,margin*=1ex 2ex 3ex 4ex}{Text} After ...
4
votes
1answer
225 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 ...
0
votes
1answer
91 views

Adjustbox do not scale up smaller image does not work

I am trying to set the max width of an image by using the adjustbox package. What I want is that an image only scales DOWN to \linewidth if needed. But if it smaller than \linewidth then it should NOT ...
5
votes
1answer
219 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} ...
4
votes
1answer
319 views

How to make adjustbox work correctly with wrapfigure?

I have an adjustbox environment which gives colored background to content. It doesn't play nicely with wrapfigure. It overlaps with the content. Below is the mew. \documentclass{scrartcl} ...
1
vote
1answer
188 views

How to add vertical rule between two horizontally aligned minipages?

I need to have a vertical rule between the text and an image. paracol package breaks across pages. I do not want to have that. \documentclass[a5paper]{scrbook} \usepackage{adjustbox} ...
3
votes
2answers
94 views

Add rotated comment on margin

this is my MWE: \documentclass[a5paper]{book} \usepackage[ngerman]{babel} \usepackage{ucs} \usepackage[utf8x,utf8]{inputenc} \usepackage[T1]{fontenc} \usepackage[garamond]{mathdesign} ...
9
votes
4answers
5k views

Set size of \colorbox for a single character

my question is simple (or not) I want to set the size of the \colorbox command or \fcolorbox command for a single character. The problem is the next: As seen in the image, the height and width are ...
3
votes
1answer
524 views

adjustbox and includegraphics page selection

I want to use adjustbox package to include graphics in beamer presentations. I prefer it over graphicx because it has max size option which only scale when figure size is larger than certain size. ...
4
votes
3answers
486 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} ...
2
votes
1answer
84 views

Align downscaled graphics to the left

I include a PDF as a figure in my document, and the PDF is a great deal wider than the \linewidth. I use the adjustbox package to set the width to slightly more than \linewidth, but I can't figure out ...
3
votes
1answer
97 views

How can I use adjustbox in \sectionmark?

I want to use adjustbox in \sectionmark but it doesn't work. Is there a work-around for this? \documentclass{book} \usepackage{blindtext} \usepackage{adjustbox} \usepackage{fancyhdr} ...
2
votes
1answer
559 views

Right-justifying vertical subfigures in a two-column document

I am trying to include a pair of subfigures in my two-column document, stacked one on top of the other. I want them to be right-justified; to achieve this with individual figures I have been using ...
3
votes
1answer
428 views

Adjustbox does not reduce table and tikzpicture widths

I'm redesigning lecture notes for a university class since the students wanted to read the notes on their tablets, e-book readers, etc. So I've written a Makefile with different targets for different ...
2
votes
1answer
202 views

How can fit a large table vertical with a picture?

I use column package to split sile to 2 column. one for picture and one for table. But my table was broken. Please help me fix it. Here is my code: \RequirePackage[demo]{graphicx} ...
3
votes
1answer
1k 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 ...
5
votes
3answers
210 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 ...
6
votes
1answer
1k 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 ...
7
votes
2answers
7k 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: ...
4
votes
1answer
1k 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 ...
3
votes
1answer
4k views

Adjustbox inside figure environment [closed]

I am trying to use the adjustbox package. When I use the adjustbox command inside a \ffigbox (floatrow package) it works fine. Now I wanted to use it inside a figure environment. Therfore I used the ...
8
votes
1answer
839 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: ...
5
votes
2answers
213 views

How to have two adjustwidth environments starting at the same height?

When using minipage environments, as below, the left corner of the two environments are automatically placed at the same height in the document. \begin{minipage}{8em} Lorem ipsum dolor sit amet, ...
5
votes
0answers
1k 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} ...