Tag Info

Hot answers tagged

5

You can't redefine minipage in terms of itself; you have also to parse carefully the optional arguments, as LaTeX cannot comply with empty optional arguments to the original minipage. \documentclass[border=2pt]{standalone} \usepackage{xparse} % save the old commands \let\latexminipage\minipage \let\latexendminipage\endminipage ...


5

The two minipage environments can be aligned at different ways: \documentclass{article} \usepackage{tgpagella} \begin{document} \hrule \noindent \begin{minipage}{0.4\textwidth} \textsc{\Huge{\textbf{MyName A}}} \end{minipage}% \begin{minipage}{0.6\textwidth} \raggedleft MyAddress\\ MyPhone \textbullet\ MyEmail \end{minipage} \hrule \noindent ...


4

You have to set the caption indent to 0pt and the format to \centering as in the following in KOMA-Script: \setcapindent{0pt} \addtokomafont{caption}{\centering} Thus, the following should work: \RequirePackage[l2tabu,orthodox]{nag} ...


3

My impression is that you're overcomplicating things. \documentclass{article} \usepackage{graphicx,xcolor} \newsavebox{\cfboxbox} \newcommand{\cfbox}[1]{% \mbox{% \sbox{\cfboxbox}{#1}% \setlength{\fboxsep}{-0.0001pt}% don't add space \setlength{\fboxrule}{0.0001pt}% \color{red}% \fbox{\usebox{\cfboxbox}}% }% } \begin{document} ...


3

Here's one option using the \sidesubfloat command from the floatrow package; using subcapbesideposition (possible values= top, bottom, center) you can control the vertical position of the labels for the subfloats: The code: \documentclass[a4paper,10pt]{article} \usepackage{graphicx} \usepackage{floatrow} \usepackage{subfig} \begin{document} As we can ...


2

Use the optional argument: \documentclass{scrartcl} \usepackage{blindtext} \begin{document} \noindent \begin{minipage}[b]{0.48\textwidth} \textsc{\Huge{\textbf{MyNameHere}} } \end{minipage}\hfill \begin{minipage}[b]{0.5\textwidth} \raggedleft MyAddress\\ MyPhone $\bullet$ MyEmail \end{minipage} \noindent\rule{\textwidth}{2pt} \bigskip ...


2

You probably want something like \noindent \begin{minipage}[b]{0.4\textwidth} \Huge\scshape MyNameHere \end{minipage}% \begin{minipage}[b]{0.6\textwidth} \raggedleft MyAddress\\ MyPhone \textbullet\ MyEmail \end{minipage} No chance of getting bold small caps with the standard fonts. But it's much better to use a tabular, which doesn't require guessing ...


2

As your minipages are bigger than half of the page, they will need some more place on both sides of the text. Just put every two minipages in a \makebox for this. (Not my recommendation. Try to fit everything in your margins as this will look more consistent over your whole report.) For vertical centring, just use the [p] specifier of your figure. If you ...


2

In the case of the example code you've posted, all you need to do is to add the placement specifier [h!] to each begin{table} specifier. I would also omit the \makebox and minipage wrappers, as they seem to be doing nothing (except provide code clutter). More generally, if you don't want tabular material to "float" (in the LaTeX sense of the word), don't ...


2

Something like this \documentclass{article} \usepackage{xcolor,graphicx} \setlength{\fboxsep}{0pt} \setlength{\fboxrule}{0.0001pt} \setlength{\parindent}{0pt} \newbox\mtbox \newenvironment{myminipage}[1]% {\setbox\mtbox\vbox\bgroup\hsize=#1 \begin{minipage}{\hsize}}% {\end{minipage}\egroup% \color{red}\fbox{\color{currentcolor}\box\mtbox}} ...


2

We can use \mbox{} in the beging of the minipage \documentclass{article} \begin{document} \noindent \begin{minipage}{0.9\linewidth} \mbox{} \paragraph{A} Blah \paragraph{B} Blah \paragraph{C} Blah \newline \begin{minipage}[t]{0.5\linewidth} BLAH BLAH \end{minipage} \newline More blah \paragraph{D} Blah \paragraph{E} Blah \end{minipage} ...


2

Here is a solution \documentclass{article} \usepackage{graphicx} \usepackage{caption} \newlength{\mtfiglength} \newcommand{\mtfigure}[3][\textwidth]{% #1 optional with of figure #2 caption #3 image filename \settowidth{\mtfiglength}{#2}% \begin{minipage}[b]{\mtfiglength} \centering \includegraphics[width=#1]{#3} \caption*{#2} \end{minipage}} ...


2

Note that in the following comparisons, I have filtered out perfect matches i.e. I only show lines where my output differs from yours. My results for the MWE case with TL 2015: report.cls 2014/09/29 v1.4h Standard LaTeX document class size10.clo 2014/09/29 v1.4h Standard LaTeX file (size option) multicol.sty 2015/03/31 v1.8m multicolumn ...


2

This creates an invisible link box in the center of the frame. You can tell where it is when the cursor changes. (Not on the image here, which is only a .png copy.) \documentclass{beamer} \usepackage{hyperref} \makeatletter \setbeamertemplate{background}{% ...


2

inset-modify should be used just in front of the inset. Thus, the command should be: Item "Insert Minipage" "command-sequence box-insert Frameless; char-backward; inset-modify width \"100line%\"" How did I know that inset-modify should be used in front of the inset rather than inside it (which I agree is more intuitive)? Well, if you use the GUI and ...


1

The snippet contains: \end{minipage}% \begin{minipage}... Thus, there is no horizontal space between them. The second minipage can be moved to the right by: \end{minipage}\hfill \begin{minipage}... and putting both minipages in a box: \noindent \hbox to \linewidth{% \begin{minipage}... \end{minipage}% \hfill \begin{minipage}... ...


1

A bullet-proof solution would be to use the standard fontsize switches. The algorithm I propose is simple brute force: if the text exceeds the borders of the box use the relatively next small font, else use the next higher one unless it would blow up the borders of the bounding box. This method is safe as its termination is guaranteed and the "complexity" ...


1

Yet, the most accurate way seems to consist in using the anyfontsize package. The algorithm for finding the target font size and baselineheight is: first shrink the baseline by the ratio of target height and actual height and the fontsize proportionally (similarly to the suggestion of @MartinScharrer) and then factor in the relative difference consecutively ...


1

The most stable way (in my eyes) is to declare the adjusted fontsize/baselineheight pair directly. As both have to stay proportional to each other you can scale down both by the same factor, which is approximately the square root of the quotient from measured and target height. (The complete example below smoothes down this factor to gain a little more ...


1

Package caption Package caption with option justification=centering helps usually: \documentclass{article} \usepackage[demo]{graphicx}% demo only because of missing images \usepackage{caption} \captionsetup{justification=centering} \begin{document} \begin{figure}[!tbph] \centering \begin{minipage}[b]{0.4\textwidth} ...


1

1. Use \textbullet\ as separator. 2. Use \noindent to insert the left mini page at the left margin. 3. Don't leave empty spaces between the mini pages. Note the use of % 4. Use the option [b] to align the boxes. \noindent% \begin{minipage}[b]{0.4\textwidth} \textsc{\Huge{\textbf{MyNameHere}}} \end{minipage}% <----- here ...


1

A version with different proportions, to better see the bases of first lines in two columns (It is not clear if you have in mind the first lines or whole text). \strut makes a box of vertical size of ( and null width. \documentclass{article} \begin{document} \begin{minipage}{0.6\textwidth} \textsc{ \Huge{\textbf{MyNameHere}} }\\ \end{minipage} ...


1

Instead of using minipages, I suggest you load the subcaption package and place the images into subfigure environments. A subfigure environment is, for all intents and purposes, a minipage environment that lets you add a sub-caption, should you choose to do so, which may be cross-referenced using the usual \label-\ref method. Do make sure, though, that the ...


1

You can declare a custom caption format with the command \DeclareCaptionFormat and apply this to the subcaption: \documentclass{article} \usepackage[labelformat=brace]{subcaption} \usepackage[demo]{graphicx} \DeclareCaptionFormat{myformat}{\hspace*{1cm}#1} \captionsetup[subfigure]{format=myformat} \begin{document} \begin{figure}[h!] ...


1

I can't recommend making figures not to float. It's right, the caption is just for showing the reader what the figure is about. However, here's a way to cope with your problem: define an environment where you set up the format for the subfigure caption (otherwise it wouldn't be set, for some reason). \documentclass{article} % Article class of KOMA-script ...


1

Another possibilities is to put pictures in table instead use minipages: \documentclass{article} \usepackage{graphicx} \usepackage{showframe} % just for demo \usepackage{tabularx} % added package \usepackage{caption} \begin{document} \begin{figure}[p] \setlength{\tabcolsep}{2pt}% reduce space between columns in table ...



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