1

I want to put these diverse contents (i.e. list enclosed in itemize environment, very long text (not enclosed in array or align environment), and one small picture) in multiple minipage environment with specific requirement below but so far I can not find satisfying solution there. Here are my requirement.

  • The minipage environment has computed width so I do not have to adjust linewidth parameter in \begin{minipage}{...} manually. I really like the auto width adjustment in other packages that create table like tabular but at now it is quite impossible to put whole of my contents in 'tabular' environment.
  • No content inside minipage environment breaches page margin, so it is alright if I have long-vertical wrapped text as long the width of every content in the environment is same.

Let me elaborate some ideas from other posts that I still do not know how to combine them in my editor (TeXStudio).

  • I was wondering if this computation of float width can be repurposed for adjusting width of minipage-enclosed content but I have no idea how to do it.

  • The solution provided by GuM on this link is working fully with prescribed example but after I changed the contents like this, the output breaks. Here is MWE of intended change by me.

You can use multiple \texttt{minipage} environments for side-by-side
descriptions (some more text to show where the right margin is):

\begin{center} \begin{minipage}{.25\linewidth} \vspace{-\baselineskip} This is detailed description of the equation. Note how the two equations are both centered with respect to what is mentioned here. Such code could be so useful to give comments for tutorials and the like. \end{minipage}% \quad \sbox{0}{% This is detailed description of the equation. Note how the two equations are both centered with respect to what is mentioned here. Such code could be so useful to give comments for tutorials and the like. \end{array}$% }% \usebox{0}% \quad \begin{minipage}{\dimexpr .75\linewidth-2em-\wd0 \relax} This is detailed description of the equation. Note how the two equations are both centered with respect to what is mentioned here. Such code could be so useful to give comments for tutorials and the like. \end{minipage}% \end{center}

The attempted changes may look unnecessary (and failed to result three-columns wrapped long text) but I think these different minipage environments can be useful for some contents and wondering if there exists some workarounds or tweaks for that changes. Also, the MWE noted that You can use multiple \texttt{minipage} environments for side-by-side descriptions (some more text to show where the right margin is) but I can not find any example of multiple long texts inside the \texttt{minipage} environment, at least in that provided solution.

Here is some sketch that summarizes what I want:

left                                                              right
margin                                                            margin
<----->                                                           <----->
    List     Very long text description    |----------------|
    1.       that wrapped automatically    | (small picture |
    2.       in this small minipage        |      there)    |
    3.       environment.                  |----------------|

    &lt;----&gt;   &lt;-------------------------&gt;   &lt;----------------&gt;
     auto              auto                       auto

(each content in minipage environment and each content has auto width adjustment)

Here is complete MWE of my document. I want to put the contents just after \begin{document}

\documentclass[11pt]{article}

\usepackage[a4paper,margin=3cm]{geometry} \usepackage{parskip,verbatim,amsmath,amssymb,microtype,palatino} \usepackage{hyperref,nameref,setspace} \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} \usepackage{graphicx,xcolor} \usepackage{booktabs} \usepackage{multirow,multicol,float,placeins,pdflscape,longtable,supertabular,makecell,array,tabularx,marginnote,titlesec,enumitem,fontawesome}

\definecolor{violet}{rgb}{0.5, 0.0, 1.0} \definecolor{orange}{rgb}{1.0, 0.5, 0.0} \definecolor{snow}{rgb}{0.83, 0.83, 0.83} \hypersetup{ colorlinks=true, citecolor=orange, filecolor=violet, linkcolor=violet, urlcolor=violet }

\pagestyle{plain} \setlength{\parindent}{0pt} \setlength{\parskip}{0pt}

% Frame \newcommand{\snowframe}[1]{\par\noindent\colorbox{snow} {\parbox{\dimexpr\textwidth-2\fboxsep\relax}{#1}}}

\newcommand{\note}[1]{\mbox{} \footnotesize \marginnote{#1}} \renewcommand*{\raggedrightmarginnote}{\flushright} \setlength{\marginparsep}{0pt}

\titleformat{\section}[leftmargin] {\rmfamily\mdseries\scshape\normalsize\filleft} {\thesection}{.5em}{}

\titlespacing{\section} {8pc}{1.5ex plus .1ex minus .2ex}{1pc}

\begin{document}

\section*{\textcolor{orange}{Summary}}

\textbf{Heading}

\textit{Description}

\begin{itemize}[nolistsep,nosep]
    \item First item.
    \item Second item.
    \item Third item.
\end{itemize}

Basel

\vspace{0.2 cm}

\end{document}

Can this idea be realized in macro?

làntèrn
  • 113

0 Answers0