Tag Info

Hot answers tagged

4

You can use a tabular or varwidth \documentclass{article} \usepackage{adjustbox,varwidth} \newcommand{\displayconstraint}[1]{\fbox{\begin{minipage}[l][3cm]{5cm} #1 \end{minipage}}} \newcommand{\almostwhatiwant}[1]{\maxsizebox{5cm}{3cm}{\minsizebox{5cm}{3cm}{#1}}} \begin{document} \raggedright \displayconstraint{\almostwhatiwant{test}} % example 1 ...


2

The text in a \savebox is typeset all on one line. You need to use a \parbox inside \savebox. There are also some problems in representing the real paragraph with a black box, the main one is to restore the correct depth for the interline spacing. The example uses two columns just to see the effect side by side. \documentclass{article} ...


1

To reuse the macro name use \renewcommand the second time. \documentclass{article} \usepackage{algorithm2e} \usepackage[nopar]{lipsum} \begin{document} \null\vfill \lipsum[1-3] \newcommand{\InsertAlgorithmHere}{% \begin{algorithm}[tbp] \SetKwInOut{Input}{Input} \SetKwInOut{Output}{Output} \LinesNumbered \caption{Caption} \label{alg:Algo} \Input{-} ...


1

If you want to indent the first paragraph of a specific section, the following kludge will do the job, \makebox[0pt]{}\vspace{-2ex} which makes an empty paragraph and then backs up over it. Ugly but effective.


1

Take the original document, remove the table, and increase the paper size so that every paragraph fits on a single line. Decrease the font size, if necessary. \usepackage[margin=1cm, paperwidth=550cm, paperheight=550cm]{geometry} Then, copy the content of the PDF file and paste it into a plain text file. Replace all line breaks by " ยง " using sed or perl. ...



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