3

enter image description here

\documentclass{article}
\usepackage{booktabs}
\usepackage[a4paper,left=0cm,top=0.2cm,bottom=0cm,right=0cm]{geometry}
\usepackage{polyglossia}
\setmainlanguage[numerals=Devanagari]{bengali}
\setmainlanguage{bengali}
\setotherlanguage{english}
%\newfontfamily\englishfont[Scale=MatchLowercase]{Linux Biolinum O}
\newfontfamily\bengalifont[Script=Bengali]{Akaash}
\usepackage{pgffor}
\newcommand{\ListItem}[1]{\underline{\makebox[5cm][l]{#1}}}
\begin{document}
\begin{minipage}{0.33\textwidth}
\foreach \x in {চাল,ডাল,লবণ,তেল,মরিচ,পেঁয়াজ,রসুন,আদা,মুরগী,মশলা,রিক্সা ভাড়া}
{
\ListItem{\x}\par\bigskip}
\end{minipage}
\begin{minipage}{0.33\textwidth}
\foreach \x in {চাল,ডাল,লবণ,তেল,মরিচ,পেঁয়াজ,রসুন,আদা,মুরগী,মশলা,রিক্সা ভাড়া}
{
\ListItem{\x}\par\bigskip}
\end{minipage}
\begin{minipage}{0.33\textwidth}
\foreach \x in {চাল,ডাল,লবণ,তেল,মরিচ,পেঁয়াজ,রসুন,আদা,মুরগী,মশলা,রিক্সা ভাড়া}
{
\ListItem{\x}\par\bigskip}
\end{minipage}
\\

\vspace{2cm}
\begin{minipage}{0.33\textwidth}
\foreach \x in {চাল,ডাল,লবণ,তেল,মরিচ,পেঁয়াজ,রসুন,আদা,মুরগী,মশলা,রিক্সা ভাড়া}
{
\ListItem{\x}\par\bigskip}
\end{minipage}
\begin{minipage}{0.33\textwidth}
\foreach \x in {চাল,ডাল,লবণ,তেল,মরিচ,পেঁয়াজ,রসুন,আদা,মুরগী,মশলা,রিক্সা ভাড়া}
{
\ListItem{\x}\par\bigskip}
\end{minipage}
\begin{minipage}{0.33\textwidth}
\foreach \x in {চাল,ডাল,লবণ,তেল,মরিচ,পেঁয়াজ,রসুন,আদা,মুরগী,মশলা,রিক্সা ভাড়া}
{
\ListItem{\x}\par\bigskip}
\end{minipage}
\\

\vspace{2cm}
\begin{minipage}{0.33\textwidth}
\foreach \x in {চাল,ডাল,লবণ,তেল,মরিচ,পেঁয়াজ,রসুন,আদা,মুরগী,মশলা,রিক্সা ভাড়া}
{
\ListItem{\x}\par\bigskip}
\end{minipage}
\begin{minipage}{0.33\textwidth}
\foreach \x in {চাল,ডাল,লবণ,তেল,মরিচ,পেঁয়াজ,রসুন,আদা,মুরগী,মশলা,রিক্সা ভাড়া}
{
\ListItem{\x}\par\bigskip}
\end{minipage}
\begin{minipage}{0.33\textwidth}
\foreach \x in {চাল,ডাল,লবণ,তেল,মরিচ,পেঁয়াজ,রসুন,আদা,মুরগী,মশলা,রিক্সা ভাড়া}
{
\ListItem{\x}\par\bigskip}
\end{minipage}
\end{document}

I want to add text "40 taka" in the last line(রিক্সা ভাড়া) of the list in the right side of the underline.

  • Instead of \makebox[5cm][l]{#1} try \makebox[5cm][r]{#1}. The l means left alignment and the r is for right alignment. Also, it would be helpful if you eliminate the unnecessary lines in this so one can focus on the just the issue at hand. Alternatively, use \newcommand{\ListItem}[2]{\underline{\makebox[5cm][r]{#1\hfill#2}}} – Peter Grill Jul 4 '18 at 1:35
  • 1
    If you just want to do exactly what you say, you could simply use {রিক্সা ভাড়া \hfill 40 taka} as the last item in the list. – Alan Munn Jul 4 '18 at 1:38
  • @AlanMunn yes your solution is right. – alhelal Jul 4 '18 at 1:40
5

At least for the simple case you describe, it's sufficient to add \hfill 40 taka to the last element of each list.

\foreach \x in {চাল,ডাল,লবণ,তেল,মরিচ,পেঁয়াজ,রসুন,আদা,মুরগী,মশলা,রিক্সা ভাড়া\hfill 40 taka}

partial output of code

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.