1

I want to do where enviroment like in the picture? How can I do that? There should also be where text inside the enviroment. I have used that where enviroment code below this all over my article so I want to changes it to be like in the picture.

\newenvironment{where}[1]%
{\begin{list}{}{%
    \setlength\itemsep{0em}
    \renewcommand{\makelabel}[1]{%
        {##1}\hfil}%
    \settowidth{\labelwidth}{#1}%
    \setlength{\leftmargin}{%
        \labelwidth+\labelsep}}}%
{\end{list}}

I want this

2
  • Welcome to TeX.SX! You can have a look at our starter guide to familiarize yourself further with our format. Feb 21, 2017 at 15:09
  • In its current form, your question might not receive many answers. Please take a look at the How to Ask-page and try to improve your question according to the guidance found there. This may require you to show some effort on your part in terms of attempting a solution. If you have questions about what to do or if you don't quite understand what this means, please ask for clarification using the add comment function. Feb 21, 2017 at 15:10

2 Answers 2

3

Quick and dirty, using not a list, but a tabularx, with some help from the calc package. The symbols column is set in math mode.

\documentclass{article}
\usepackage{array} % for >{} and <{}
\usepackage{tabularx} % for tabularx
\usepackage{calc} % for \widthof
\newenvironment{where}{%
where \tabularx{\linewidth-\widthof{where }}[t]{>{$}r<{$} X}%
}{\endtabularx}

\begin{document}
Some text, then
\begin{equation}
a = bcd
\end{equation}
\begin{where}
a & is the \ldots \\
b & is \ldots \\
c & lorem ipsum dolor sit amet consectetur etc.\@ etc.\@ ad infinitum until this text has at least two lines \\
abcd & etc.
\end{where}
\end{document}

enter image description here

1
  • I have used lists now so for me it could be easier to change the code which is in the question.
    – KeijoKoo
    Feb 22, 2017 at 7:51
2

A different but perhaps simpler approach, could also be to just utilise itemize without bullets but using "where" instead, like this:

\documentclass{article}
\begin{document}

{\renewcommand\labelitemi{}
\begin{itemize}
    \item[where] $\gamma_F$ is the partial safety factor for \underline{load}
    \item $\gamma_M$ is the partial safety factor for \underline{resistance}
    \item $E_d$ is the design value of the force or moment caused by the load
\end{itemize}
}

\end{document}

enter image description here

You can always adjust the itemize to your likings, such as adding a \hspace{} after the "where" and choosing the distance you want: \item[where\hspace{0.4cm}] $gamma_F$ is... or reduce the vertical spacing by adding \itemsep0em right after beginning the itemize environment. Example:

\documentclass{article}
\begin{document}

{\renewcommand\labelitemi{}
\begin{itemize}
    \itemsep0em
    \item[where \hspace{0.4cm}] $\gamma_F$ is the partial safety factor for \underline{load}
    \item $\gamma_M$ is the partial safety factor for \underline{resistance}
    \item $E_d$ is the design value of the force or moment caused by the load
\end{itemize}
}

\end{document}

enter image description here

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .