اذهب إلى المحتوى
  • 0

كيف أُدرج صور باستخدام glsgroupheading على LaTeX؟

محمد بوسكوري

السؤال

كيف أستطيع إدراج صور عدة باستخدام فهرسة glsgroupheading على برنامج LaTeX؟

قمت باستخدام الكود التالي:

\documentclass[twoside]{book}
\usepackage{graphicx}
\usepackage{multicol}
\usepackage{fancyhdr}
\usepackage[bf,sf,center]{titlesec}


% Headers and footers
\fancyhead[RE]{\thepage \textsf{\leftmark}}
\fancyhead[LO]{\thepage \textsf{\rightmark}}
\fancyfoot[]{}
\renewcommand{\headrulewidth}{0.5pt}

\pagestyle{fancy}

% For testing
\usepackage{lipsum}

\usepackage[xindy]{glossaries}


\makeglossaries

% The optional argument is in case you can't use the name as a label    
\newcommand{\dict}[4][]{%
  \newglossaryentry{#2}%
  {%
    name={#2},%
    symbol=#3,%
    description=#4,%
    #1%

ما أصبو إليه هو إدراج صور في أعلى النصوص، كما يتضح ذلك من خلال الصورة التالية-حيث يتمثل مكان الصور في السهم باللون الأحمر-:

euen5.thumb.png.61561c0f3544dce49303794a

كيف ذلك؟

 

تم التعديل في بواسطة محمد بوسكوري
رابط هذا التعليق
شارك على الشبكات الإجتماعية

Recommended Posts

  • 1

تقريبا لفكرة سؤالك، تريد إدراج صور بجانب الحرف الأول للكلمة، بهذا الشكل:

FAwzl.thumb.png.15ab01968e8ec24a04c1d902

YGFkH.thumb.png.e9a6edc306ec005038c561c8

qsNf2.thumb.png.4b74ce4b072c7fcf2b462186

على أن تحمل صورة كل حرف اسم الحرف مثلا A.png،M.png وZ.png...

بحيث تُدرج كل صورة قبل الكلمات المبتدئة بنفس الحرف، كما ألفنا في بعض القواميس المصورة.

هذا الكود اقتراحي كحل لسؤالك:

\documentclass[twoside]{book}
\usepackage{graphicx}
\usepackage{multicol}
\usepackage{fancyhdr}
\usepackage[bf,sf,center]{titlesec}

% Headers and footers
\fancyhead[RE]{\textsf{\leftmark}}
\fancyhead[LE]{\thepage{} \textsf{\rightmark}}
\fancyhead[LO]{\textsf{\rightmark}}
\fancyhead[RO]{\textsf{\leftmark} \thepage{}}
\fancyfoot[]{}
\renewcommand{\headrulewidth}{0.5pt}
\pagestyle{fancy}

% For testing
\usepackage{lipsum}

\usepackage[xindy]{glossaries}
\makeglossaries

% The optional argument is in case you can't use the name as a label
\newcommand{\dict}[4][]{%
  \newglossaryentry{#2}%
  {%
    name={#2},%
    symbol=#3,%
    description=#4,%
    #1%
  }%
}

\newglossarystyle{dict}%
{%
  \renewenvironment{theglossary}{}{\end{multicols}}%
  \renewcommand*{\glossaryheader}{}%
  \renewcommand*{\glsgroupheading}[1]{%
    \section*{##1 \includegraphics[height=\baselineskip]{##1}}%
    \begin{multicols}{2}%
  }%
  \renewcommand*{\glsgroupskip}{\end{multicols}}%
  \renewcommand{\glossaryentryfield}[5]{%
    \markboth{##2}{##2}%
    \par\vspace{0.25\baselineskip}%
    \textbf{\textsf{##2}} \textit{- ##4 -} ##3%
  }%
}%
\renewcommand*{\glossarysection}[2][]{}
\dict{zero}{n}{\lipsum[4]}
\dict{adhesive}{n}{\lipsum[5]}
\dict{adhere}{n}{\lipsum[2]}
\dict{adhesion}{n}{\lipsum[4]}
\dict{adjacent}{n}{\lipsum[6]}
\dict{adjust}{n}{\lipsum[6]}
\dict{main}{n}{\lipsum[3]}
\dict{material}{n}{\lipsum[1]}
\dict{more}{n}{\lipsum[2]}
\dict{zebra}{n}{\lipsum \lipsum \lipsum}
\dict{adherence}{n}{\lipsum[3]}
\dict{adjective}{n}{\lipsum[1]}
\dict{adjoin}{n}{\lipsum[2]}
\dict{mathematic}{n}{\lipsum[2]}
\dict{adjourn}{n}{\lipsum[3]}
\dict{adjournment}{n}{\lipsum[4]}
\dict{adjunt}{n}{\lipsum[5]}
\dict{adequate}{n}{\lipsum[1]}

\begin{document}
\glsaddall
\printglossary[style=dict]
\end{document}

لتحصل على الصورة:

xEOZQ.thumb.png.4b2e975de35449ffc5faa509

يمكنك تعويض صور الحروف بصور لأشياء تتماشى ومحتوى الكلمة المناسبة لها، كصورة تفاحة أمام كلمة appel...

رابط هذا التعليق
شارك على الشبكات الإجتماعية

انضم إلى النقاش

يمكنك أن تنشر الآن وتسجل لاحقًا. إذا كان لديك حساب، فسجل الدخول الآن لتنشر باسم حسابك.

زائر
أجب على هذا السؤال...

×   لقد أضفت محتوى بخط أو تنسيق مختلف.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   جرى استعادة المحتوى السابق..   امسح المحرر

×   You cannot paste images directly. Upload or insert images from URL.

  • إعلانات

  • تابعنا على



×
×
  • أضف...