LaTeX शोकेस
यह पाठ अन्य लोकप्रिय LaTeX पैकेजों के उदाहरण दिखाता है जिन्हें इस वेबसाइट के मुख्य पाठों में शामिल नहीं किया गया है।
इस कोर्स में LaTeX की मुख्य विशेषताओं का अवलोकन किया गया है। LaTeX में एक्सटेंशन पैकेजों की एक विशाल श्रृंखला है जिनका उपयोग कई विषय-क्षेत्रों में किया जाता है। यहाँ हम बगैर किसी विस्तृत व्याख्या के बस कुछ पैकजों के उदाहरण दे रहे हैं जिनका वृहद् विवरण texdoc.org पे उपलब्ध है। कोड उदाहरण भी पैकेज प्रलेखन से ही लिए गए हैं और यदि कहीं और से लिया गया है तो हमने यथा स्थान संदर्भ उल्लेखित कर दिया है।
ध्यान दें कि यहाँ शामिल किए गए पैकेजों से हमारा उद्देश्य किसी पैकेज को अन्य पैकेजों की तुलना में समर्थन देना नहीं है। हमारा उद्देश्य केवल विविध क्षेत्रों की पैकेज श्रृंखलाओं को एक नमूने द्वारा प्रस्तुत करना है जिन्हें हमने इस वेबसाइट के पाठ्यक्रम में शामिल नहीं किया है।
रसायन विज्ञान
पैकेज: mhchem
\documentclass{article}
\usepackage[T1]{fontenc}
\usepackage{mhchem}
\begin{document}
\ce{Hg^2+ ->[I-] HgI2 ->[I-] [Hg^{II}I4]^2-}
\end{document}
भाषा विज्ञान
पैकेज: forest
\documentclass{article}
\usepackage[T1]{fontenc}
\usepackage[linguistics]{forest}
\begin{document}
\begin{forest}
[VP
[DP\\John ]
[V’
[V\\sent ]
[DP\\Mary ]
[DP[D\\a][NP\\letter]]
]
]
\end{forest}
\end{document}
शतरंज
पैकेज: xskak
\documentclass{article}
\usepackage[T1]{fontenc}
\usepackage{xskak}
\begin{document}
\newchessgame
\mainline{1. e4 e5 2. Nf3 Nc6 3. Bb5 a6 4. Ba4 Nf6}
\xskakset{moveid=2w}%
\chessboard[setfen=\xskakget{nextfen}]\\[1ex]
Position after 2.\,\xskakget{lan}
\end{document}
पद्य
पैकेज: memoir
\documentclass{memoir}
\usepackage[T1]{fontenc}
\begin{document}
\settowidth{\versewidth}{Nay, nay, I leave thee not,
thou goest too}
\begin{verse}[\versewidth]
\ldots \\*
His judgement rendered, he dissolved the Thing. \\*
\flagverse{Ingeborg} And your decision? \\*
\flagverse{Fridthjof} \vinphantom{And your decision?}
Have I ought to choose? \\*
Is not mine honour bound by his decree? \\*
And that I will redeem through Angantyr \\*
His paltry gold doth hide in Nastrand’s flood. \\*
Today will I depart. \\*
\flagverse{Ingeborg} \vinphantom{Today will I depart.}
And Ingeborg leave? \\*
\flagverse{Fridthjof} Nay, nay, I leave thee not,
thou goest too. \\*
\flagverse{Ingeborg} Impossible! \\*
\flagverse{Fridthjof} \vinphantom{Impossible!}
O! hear me, ere thou answerest.
\end{verse}
\end{document}
चित्रकला
पैकेज: tikz
\documentclass{article}
\usepackage[T1]{fontenc}
\usepackage{tikz}
\usetikzlibrary{perspective}
\begin{document}
\newcommand\simplecuboid[3]{%
\fill[gray!80!white] (tpp cs:x=0,y=0,z=#3)
-- (tpp cs:x=0,y=#2,z=#3)
-- (tpp cs:x=#1,y=#2,z=#3)
-- (tpp cs:x=#1,y=0,z=#3) -- cycle;
\fill[gray] (tpp cs:x=0,y=0,z=0)
-- (tpp cs:x=0,y=0,z=#3)
-- (tpp cs:x=0,y=#2,z=#3)
-- (tpp cs:x=0,y=#2,z=0) -- cycle;
\fill[gray!50!white] (tpp cs:x=0,y=0,z=0)
-- (tpp cs:x=0,y=0,z=#3)
-- (tpp cs:x=#1,y=0,z=#3)
-- (tpp cs:x=#1,y=0,z=0) -- cycle;}
\newcommand{\simpleaxes}[3]{%
\draw[->] (-0.5,0,0) -- (#1,0,0) node[pos=1.1]{$x$};
\draw[->] (0,-0.5,0) -- (0,#2,0) node[pos=1.1]{$y$};
\draw[->] (0,0,-0.5) -- (0,0,#3) node[pos=1.1]{$z$};}
\begin{tikzpicture}[3d view]
\simplecuboid{2}{2}{2}
\simpleaxes{2}{2}{2}
\end{tikzpicture}
\end{document}
फलन (फंक्शन) प्लॉटिंग
पैकेज: pgfplots
\documentclass{article}
\usepackage[T1]{fontenc}
\usepackage{pgfplots}
\pgfplotsset{width=7cm,compat=1.17}
\begin{document}
\begin{tikzpicture}
\begin{axis}[]
% density of Normal distribution:
\addplot [
red,
domain=-3e-3:3e-3,
samples=201,
]
{exp(-x^2 / (2e-3^2)) / (1e-3 * sqrt(2*pi))};
\end{axis}
\end{tikzpicture}
\end{document}
संगीत
पैकेज: musixtex
\documentclass{article}
\usepackage[T1]{fontenc}
\usepackage{musixtex}
\begin{document}
\begin{music}
\parindent10mm
\instrumentnumber{1}
% a single instrument
\setname1{Piano}
% whose name is Piano
\setstaffs1{2}
% with two staffs
\generalmeter{\meterfrac44}
% 4/4 meter chosen
\startextract
% starting real score
\Notes\ibu0f0\qb0{cge}\tbu0\qb0g|\hl j\en
\Notes\ibu0f0\qb0{cge}\tbu0\qb0g|\ql l\sk\ql n\en
\bar
\Notes\ibu0f0\qb0{dgf}|\qlp i\en
\notes\tbu0\qb0g|\ibbl1j3\qb1j\tbl1\qb1k\en
\Notes\ibu0f0\qb0{cge}\tbu0\qb0g|\hl j\en
\zendextract
% terminate excerpt
\end{music}
\end{document}