14

This is my first LaTeX Project. I am using XelaTeX to compile the tex file.

I am having an issue with Even Line Spacing in my arabic document. The baseline grid is fine on the first page but the text from page 2 and onwards shifts. I dont know why the first is coming out fine but not the rest.

\documentclass[a4paper, twoside, openany, 12pt]{memoir}
\settrimmedsize{29.7cm}{21cm}{*}
\settrims{0mm}{0mm}
\settypeblocksize{*}{\lxvchars}{1.618}
    % Tried it with using only ratio to achieve golden section 
    %  but the inner margins would become wide and outer thin. 
    %  So had to specify the mergins using \setlrmarginsandblock{*}{3.5115cm}{1.618} 
    %\setlrmargins{*}{*}{1.618}
\setlrmarginsandblock{*}{3.5115cm}{1.618} 
\setulmargins{*}{*}{1.618}
\setheadfoot{0.7cm}{0.74cm}
\setheaderspaces{*}{*}{1.618}
\checkandfixthelayout
\usepackage{fontspec}
\usepackage{layouts}
\usepackage{atbegshi,picture,xcolor}
    \AtBeginShipout{%
      \AtBeginShipoutUpperLeft{%
        {\color{red}%
        \put(\dimexpr -1in-\oddsidemargin,
             -\dimexpr 1in+\topmargin+\headheight+\headsep+\topskip)%
          {%
           \vtop to\dimexpr\vsize+\baselineskip{
             \hrule
             \leaders\vbox to\baselineskip{\hrule width\hsize\vfill}\vfill
           }%
          }%
      }}%
    }
\usepackage{leading} 
\usepackage{polyglossia}
\setmainlanguage[numerals=mashriq]{arabic}
\setotherlanguage{english}
\newfontfamily\arabicfont[Script=Arabic,Scale=2.0]{Traditional Arabic}
\let\arabicfonttt\ttfamily 
\setsansfont[Script=Arabic,Scale=1.5]{Traditional Arabic}
\defaultfontfeatures{Mapping=tex-text}
\begin{document}
\lineskiplimit=-\maxdimen
    %\lineskiplimit=-1000pt
\linespread{2.282}
    %\leading{33.1pt}
    %\renewcommand{\baselinestretch}{2.282}\normalsize


\mainmatter



\begin{Arabic}
    \chapter*{\centerline{كِتَاب الطَّهَارَةِ}}

    اَلْمِيَاهُ ثَلَاثَةٌ\\
    اَلْأَوَّلُ: طَهُورٌ وَهُوَ اَلْبَاقِي عَلَى خِلْقَتِهِ وَمِنْهُ مَكْرُوهٌ كَمُتَغَيِّرٍ بِغَيْرِ مُمَازِجٍ وَمُحَرَّمٌ لَا يَرْفَعُ اَلْحَدَثَ وَيُزِيلُ اَلْخَبَثَ وَهُوَ اَلْمَغْصُوب وَغَيْرُ بِئْرِ النَّاقَةِ مِنْ ثَمُودَ .\\    
            اَلثَّانِي: طَاهِرٌ لَا يَرْفَعُ اَلْحَدَثَ وَلَا يُزِيلُ اَلْخَبَثَ وَهُوَ اَلْمُتَغَيِّرُ بِمُمَازِجٍ طَاهِر وَمِنْهُ يَسِيرٌ مُسْتَعْمَلٌ فِي رَفْعِ حَدَثٍ . \\
            اَلثَّالِثُ: نَجِسٌ يَحْرُمُ اِسْتِعْمَالُهُ مُطْلَقًا وَهُوَ مَا تَغَيَّرَ بِنَجَاسَةٍ فِي غَيْرِ مَحِلِّ تَطْهِيرٍ أَوْ لَاقَاهَا فِي غَيْرِهِ وَهُوَ يَسِيرٌ وَالْجَارِي كَالرَّاكِدِ وَالْكَثِيرُ قُلَّتَانِ وَهُمَا مِائَةُ رِطْلٍ وَسَبْعَةُ أَرْطَالٍ وَسُبْعُ رِطْلٍ بِالدِّمَشْقِيِّ وَالْيَسِيرُ مَا دُونَهُمَ . 
    \section*{  طَهَارَةُ اَلْآنِيَةِ }
            كُلُّ إِنَاءٍ طَاهِرٍ يُبَاحُ اِتِّخَاذُهُ وَاسْتِعْمَالُهُ إِلَّا أَنْ يَكُونَ ذَهَبًا أَوْ فِضَّةً أَوْ مُضَبَّبًا بِأَحَدِهِمَا لَكِنْ تُبَاحُ ضَبَّةٌ يَسِيرَةٌ مِنْ فِضَّةٍ لِحَاجَةٍ وَمَا لَمْ تُعْلَمْ نَجَاسَتُهُ مِنْ آنِيَةِ كُفَّارٍ وَثِيَابُهُمْ طَاهِرَةٌ وَلَا يَطْهُرُ جِلْدُ مَيِّتَةٍ بِدِبَاغٍ وَكُلُّ أَجْزَائِهَا نَجِسَةٌ إِلَّا شَعْرًا وَنَحْوَهُ  وَالْمُنْفَصِلُ مِنْ حَيٍّ كَمَيْتَتِهِ . 
    \section*{  اَلِاسْتِنْجَاءُ وَالِاسْتِجْمَارُ }
            اَلِاسْتِنْجَاءُ وَاجِبٌ مِنْ كُلِّ خَارِجٍ إِلَّا اَلرِّيحَ وَالطَّاهِرَ وَغَيْرَ اَلْمُلَوَّث وَسُنَّ عِنْدَ دُخُولِ خَلَاءٍ قَوْلُ : بِسْمِ اَللَّهِ اَللَّهُمَّ إِنِّي أَعُوذُ بِكَ مِنْ اَلْخُبُثِ وَالْخَبَائِثِ وَبَعْدَ خُرُوجٍ مِنْهُ : غُفْرَانَكَ، اَلْحَمْدُ لِلَّهِ اَلَّذِي أَذْهَبَ عَنِّي اَلْأَذَى وَعَافَانِي.        

            وَتَغْطِيَةُ رَأْسٍ وَانْتِعَالٌ وَتَقْدِيمُ رِجْلِهِ اَلْيُسْرَى دُخُولًا وَاعْتِمَادُهُ عَلَيْهَا جُلُوسًا وَالْيُمْنَى خُرُوجًا عَكْسُ مَسْجِدٍ وَنَعْلٍ وَنَحْوِهِمَا وَبُعْد ٌ فِي فَضَاءٍ وَطَلَبُ مَكَانٍ رَخْوٍ لِبَوْلٍ وَمَسْحُ اَلذِّكْرِ بِالْيَدِ اَلْيُسْرَى إِذَا اِنْقَطَعَ اَلْبَوْلُ مِنْ أَصْلِهِ إِلَى رَأْسِهِ ثَلَاثًا وَنَتْرُهُ ثَلَاثًا .\\ 
            وَكُرِهَ دُخُولُ خَلَاءٍ بِمَا فِيهِ ذَكَرُ اَللَّهِ -تَعَالَى - وَكَلَامٌ فِيهِ بِلَا حَاجَةٍ وَرَفْعُ ثَوْبٍ قَبْلَ دُنُوٍّ مِنَ اَلْأَرْضِ وَبَوْلٌ فِي شَقٍّ وَنَحْوِهِ وَمَسُّ فَرْجٍ بِيَمِينٍ بِلَا حَاجَةٍ وَاسْتِقْبَالُ اَلنَّيِّرَيْنِ وَحَرُمَ اِسْتِقْبَالُ قِبْلَةٍ وَاسْتِدْبَارُهَا فِي غَيْرِ بُنْيَانٍ وَلُبْثٌ فَوْقَ اَلْحَاجَةِ وَبَوْلٌ فِي طَرِيقٍ مَسْلُوكٍ وَنَحْوِهِ وَتَحْتَ شَجَرَةٍ مُثْمِرَةٍ ثَمَرًا مَقْصُودًا. \\
     \section*{اَلسِّوَاكُ وَتَوَابِعُهُ }
            يَسُنُّ اَلسِّوَاكُ بِالْعُودِ كُلَّ وَقْتٍ إِلَّا لِصَائِمٍ بَعْدَ اَلزَّوَالِ فَيُكْرَه ُ. وَيَتَأَكَّدُ عِنْدَ صَلَاةٍ وَنَحْوِهَا وَتَغَيُّرِ فَمٍ وَنَحْوِهِ . 
            وَسُنَّ بُدَاءَةٌ بِالْأَيْمَنِ فِيهِ وَفِي طُهْرٍ وَشَأْنِهِ كُلِّهِ وَادِّهَانٌ غِبًّا وَاكْتِحَالٌ فِي كُلِّ عَيْنٍ ثَلَاثًا وَنَظَرٌ فِي مِرْآةٍ وَتَطَيُّبٌ وَاِسْتِحْدَاد ٌ وَحَفُّ شَارِبٍ وَتَقْلِيمُ ظُفُرٍ وَنَتْفُ إِبِط ٍ وَكُرِهَ قَزَع ٌ وَنَتْفُ شَيْبٍ وَثَقْبُ أُذُنِ صَبِيٍّ وَيَجِبُ خِتَانُ ذَكَرٍ وَأُنْثَى "بُعَيْدَ بُلُوغٍ مَعَ أَمِنِ اَلضَّرَرِ وَيُسَنُّ قَبْلَهُ وَيُكْرَهُ سَابِعَ وِلَادَتِهِ وَمِنْهَا إِلَيْهِ". 

\end{Arabic}
\end{document}

Screenshot of pages 1 to 2: Pages 1 to 2

Screenshot of pages 3 to 4: Pages 3 to 4

3
  • 1
    1) the vertical spaceing used with chapter and section is not the same try \chapter*{\centerline{كِتَاب الطَّهَارَةِ}} with \section*{\centerline{كِتَاب الطَّهَارَةِ}} and 2) not related. there is better way to center chapter heading.
    – touhami
    Dec 29, 2015 at 7:46
  • 1
    here is a related question tex.stackexchange.com/questions/262879/document-layout-styles
    – touhami
    Dec 29, 2015 at 8:03
  • note if you remore \chapter*{\centerline{كِتَاب الطَّهَارَةِ}} horizontal rules do not match to text lines.
    – touhami
    Dec 31, 2015 at 17:30

1 Answer 1

12
+100

What you are trying to do can be achieved but it will be difficult and frustrating. Questions tagged grid-typesetting contain many details on the matter. Long story short, (Xe)LaTeX is the wrong tool for grid typesetting: you would have to eliminate any glue and set every dimension to a multiple of the grid step. You can only do this manually, and every single package you use could undo your work or sprout further complications. This means that unless your document is very simple you're in for quite a headache.

I once did tame memoirextbook(+ XeLaTeX + polyglossia + some table packages) into a two-column grid layout. That wasn't particularly fun but the result was acceptable. If you want to scavenge the code here is the preamble. If (and only if UPDATE: I did it anyway) you are completely determined I'll try to clean it up a bit for you. I'm not doing it now beacuse I'm not sure it would be worth the effort: too much depends on your document's content and precise endowment of packages. Also, take a look at these questions and at the grid package then decide if you want to persevere.

ConTeXt solution

Since this is your first project (= better if funnier) I strongly recommend you to be less stubborn than me and switch tool. Use ConTeXt: it completely trivializes the problem of grid typesetting and also does a wealth of other cool things. You will save a lot of time and have a flawless grid snapping.

Let me show you the code:

% first you instruct ConTeXt to build a typeface
% (this is the only confusing part)

% if you want fine control on font features, you can
%\definefontfeature
%   [arabic]
%   [mode=node,language=dflt,script=arab,
%    init=yes,medi=yes,fina=yes,isol=yes,
%    liga=yes,dlig=yes,rlig=yes,clig=yes,
%    mark=yes,mkmk=yes,kern=yes,curs=yes]

\starttypescript [serif] [arabic]
 % the font is just a nice one I had lying around
 \definefontsynonym [Arabic-Regular] [file:Scheherazade-Regular.ttf] [features=arabic]
 \definefontsynonym [Arabic-Bold]    [file:Scheherazade-Bold.ttf]    [features=arabic]
\stoptypescript

\starttypescript [serif] [arabic] [name]
 \usetypescript[serif][fallback]
 \definefontsynonym [Serif]     [Arabic-Regular] [features=arabic]
 \definefontsynonym [SerifBold] [Arabic-Bold]    [features=arabic]
\stoptypescript

\starttypescript [Arabic]
  \definetypeface [Arabic] [rm] [serif] [arabic] [default] 
\stoptypescript 

% now you localize the document and set RTL flow

\mainlanguage[arabic]

\pagedir TRT
\bodydir TRT
\pardir TRT
\textdir TRT

% then you set up the layout

% double sided document
\setuppagenumbering[alternative=doublesided]

% standard paper size
\setuppapersize[A4]

% I tried to do what you were doing with the golden ratio
\setuplayout[
  grid=min, % <- this is where magic happens
  backspace=50mm, width=130mm,
  topspace=33mm, height=210mm,
  header=0mm, footer=0mm,
  ]

% show the baseline grid
\showgrid

% set the font size and interline space
\setupbodyfont[Arabic,24pt]
\setupinterlinespace[line=42pt]

% decorate the headings a bit and make them snap to grid nicely
\setupheads[number=no]
\setuphead[chapter][style=\bfd,before=,after=\blank,alternative=middle,grid=both]
\setuphead[section][style=\bfc,before=\blank,after=,grid=both]

% MAIN DOCUMENT ================================================================

\starttext
\chapter{كِتَاب الطَّهَارَةِ}
اَلْمِيَاهُ ثَلَاثَةٌ\\
اَلْأَوَّلُ: طَهُورٌ وَهُوَ اَلْبَاقِي عَلَى خِلْقَتِهِ وَمِنْهُ مَكْرُوهٌ كَمُتَغَيِّرٍ بِغَيْرِ مُمَازِجٍ وَمُحَرَّمٌ لَا يَرْفَعُ اَلْحَدَثَ وَيُزِيلُ اَلْخَبَثَ وَهُوَ اَلْمَغْصُوب وَغَيْرُ بِئْرِ النَّاقَةِ مِنْ ثَمُودَ .\\
اَلثَّانِي: طَاهِرٌ لَا يَرْفَعُ اَلْحَدَثَ وَلَا يُزِيلُ اَلْخَبَثَ وَهُوَ اَلْمُتَغَيِّرُ بِمُمَازِجٍ طَاهِر وَمِنْهُ يَسِيرٌ مُسْتَعْمَلٌ فِي رَفْعِ حَدَثٍ .\\
اَلثَّالِثُ: نَجِسٌ يَحْرُمُ اِسْتِعْمَالُهُ مُطْلَقًا وَهُوَ مَا تَغَيَّرَ بِنَجَاسَةٍ فِي غَيْرِ مَحِلِّ تَطْهِيرٍ أَوْ لَاقَاهَا فِي غَيْرِهِ وَهُوَ يَسِيرٌ وَالْجَارِي كَالرَّاكِدِ وَالْكَثِيرُ قُلَّتَانِ وَهُمَا مِائَةُ رِطْلٍ وَسَبْعَةُ أَرْطَالٍ وَسُبْعُ رِطْلٍ بِالدِّمَشْقِيِّ وَالْيَسِيرُ مَا دُونَهُمَ .
\section{طَهَارَةُ اَلْآنِيَةِ}
كُلُّ إِنَاءٍ طَاهِرٍ يُبَاحُ اِتِّخَاذُهُ وَاسْتِعْمَالُهُ إِلَّا أَنْ يَكُونَ ذَهَبًا أَوْ فِضَّةً أَوْ مُضَبَّبًا بِأَحَدِهِمَا لَكِنْ تُبَاحُ ضَبَّةٌ يَسِيرَةٌ مِنْ فِضَّةٍ لِحَاجَةٍ وَمَا لَمْ تُعْلَمْ نَجَاسَتُهُ مِنْ آنِيَةِ كُفَّارٍ وَثِيَابُهُمْ طَاهِرَةٌ وَلَا يَطْهُرُ جِلْدُ مَيِّتَةٍ بِدِبَاغٍ وَكُلُّ أَجْزَائِهَا نَجِسَةٌ إِلَّا شَعْرًا وَنَحْوَهُ وَالْمُنْفَصِلُ مِنْ حَيٍّ كَمَيْتَتِهِ .
\section{اَلِاسْتِنْجَاءُ وَالِاسْتِجْمَارُ}
اَلِاسْتِنْجَاءُ وَاجِبٌ مِنْ كُلِّ خَارِجٍ إِلَّا اَلرِّيحَ وَالطَّاهِرَ وَغَيْرَ اَلْمُلَوَّث وَسُنَّ عِنْدَ دُخُولِ خَلَاءٍ قَوْلُ : بِسْمِ اَللَّهِ اَللَّهُمَّ إِنِّي أَعُوذُ بِكَ مِنْ اَلْخُبُثِ وَالْخَبَائِثِ وَبَعْدَ خُرُوجٍ مِنْهُ : غُفْرَانَكَ، اَلْحَمْدُ لِلَّهِ اَلَّذِي أَذْهَبَ عَنِّي اَلْأَذَى وَعَافَانِي.\\
وَتَغْطِيَةُ رَأْسٍ وَانْتِعَالٌ وَتَقْدِيمُ رِجْلِهِ اَلْيُسْرَى دُخُولًا وَاعْتِمَادُهُ عَلَيْهَا جُلُوسًا وَالْيُمْنَى خُرُوجًا عَكْسُ مَسْجِدٍ وَنَعْلٍ وَنَحْوِهِمَا وَبُعْد فِي فَضَاءٍ وَطَلَبُ مَكَانٍ رَخْوٍ لِبَوْلٍ وَمَسْحُ اَلذِّكْرِ بِالْيَدِ اَلْيُسْرَى إِذَا اِنْقَطَعَ اَلْبَوْلُ مِنْ أَصْلِهِ إِلَى رَأْسِهِ ثَلَاثًا وَنَتْرُهُ ثَلَاثًا .\\
وَكُرِهَ دُخُولُ خَلَاءٍ بِمَا فِيهِ ذَكَرُ اَللَّهِ -تَعَالَى - وَكَلَامٌ فِيهِ بِلَا حَاجَةٍ وَرَفْعُ ثَوْبٍ قَبْلَ دُنُوٍّ مِنَ اَلْأَرْضِ وَبَوْلٌ فِي شَقٍّ وَنَحْوِهِ وَمَسُّ فَرْجٍ بِيَمِينٍ بِلَا حَاجَةٍ وَاسْتِقْبَالُ اَلنَّيِّرَيْنِ وَحَرُمَ اِسْتِقْبَالُ قِبْلَةٍ وَاسْتِدْبَارُهَا فِي غَيْرِ بُنْيَانٍ وَلُبْثٌ فَوْقَ اَلْحَاجَةِ وَبَوْلٌ فِي طَرِيقٍ مَسْلُوكٍ وَنَحْوِهِ وَتَحْتَ شَجَرَةٍ مُثْمِرَةٍ ثَمَرًا مَقْصُودًا.\\
\section{اَلسِّوَاكُ وَتَوَابِعُهُ}
يَسُنُّ اَلسِّوَاكُ بِالْعُودِ كُلَّ وَقْتٍ إِلَّا لِصَائِمٍ بَعْدَ اَلزَّوَالِ فَيُكْرَه . وَيَتَأَكَّدُ عِنْدَ صَلَاةٍ وَنَحْوِهَا وَتَغَيُّرِ فَمٍ وَنَحْوِهِ .
وَسُنَّ بُدَاءَةٌ بِالْأَيْمَنِ فِيهِ وَفِي طُهْرٍ وَشَأْنِهِ كُلِّهِ وَادِّهَانٌ غِبًّا وَاكْتِحَالٌ فِي كُلِّ عَيْنٍ ثَلَاثًا وَنَظَرٌ فِي مِرْآةٍ وَتَطَيُّبٌ وَاِسْتِحْدَاد وَحَفُّ شَارِبٍ وَتَقْلِيمُ ظُفُرٍ وَنَتْفُ إِبِط وَكُرِهَ قَزَع وَنَتْفُ شَيْبٍ وَثَقْبُ أُذُنِ صَبِيٍّ وَيَجِبُ خِتَانُ ذَكَرٍ وَأُنْثَى "بُعَيْدَ بُلُوغٍ مَعَ أَمِنِ اَلضَّرَرِ وَيُسَنُّ قَبْلَهُ وَيُكْرَهُ سَابِعَ وِلَادَتِهِ وَمِنْهَا إِلَيْهِ".
\stoptext

And now for the result:

wubba lubba dub dub

It's all pretty much effortless. You'll see the degree of control ConTeXt offers is amazing. (Again, if you really care about XeLaTeX leave a comment and I'll try to update the answer cleaning up the preamble I mentioned.)

XeLaTeX version

Ok, I cleaned up my old code and produced a bare minimal XeLaTeX solution. I wrongly remembered using memoir, but it makes no difference if you use it instead as a document class. However, keep in mind I set up the layout with geometry and the headings with titlesec, so you'll have to translate the code if you want to use memoir's facilities.

I expunged all the code for snapping to grid columns floats, table, captions and lists to grid to keep this minimal.

\documentclass{extbook}
\usepackage{geometry}
\usepackage[explicit]{titlesec}

\usepackage{polyglossia}
\usepackage{fontspec}

% ======================================================= LAYOUT (geometry) ====

% THE fundamental length
\newlength \lead
\setlength \lead {30pt}

\geometry
  { textwidth  = 13\lead
  , textheight = 21\lead
  , hmarginratio = 89:144
  , vmarginratio = 89:144
  , twoside
  }

\setlength \topskip \lead
\setlength \parskip {0pt}
%\raggedbottom

% ============================================================== FONT SIZES ====

\def\normalsize{\fontsize{0.618\lead}{1\lead}\selectfont}
\def\large     {\fontsize{1.000\lead}{2\lead}\selectfont}
\def\Large     {\fontsize{1.618\lead}{3\lead}\selectfont}

% =========================================================== BASELINE GRID ====

\usepackage{eso-pic}
\usepackage{tikzpagenodes}

% Command to draw a baseline grid
\newcommand\drawbaselinegrid{%
  \begin{tikzpicture}[overlay,remember picture]
    \draw [red!30!white, ultra thin, dashed]
      (0,0) grid [ ystep  = \baselineskip, xstep = \textwidth
                 , shift  = (current page text area.north west)
                 , yshift = 0-\dp\strutbox
                 ] ++(\textwidth,-\textheight);
    \draw [red!30!white, thin]
      (0,0) grid [ step = \baselineskip, xstep = \textwidth
                 , shift=(current page text area.north)
                 ] ++(0.5\textwidth,-\textheight)
      (0,0) grid [ step = \baselineskip, xstep = \textwidth
                 , shift=(current page text area.north)
                 ] ++(-0.5\textwidth,-\textheight);
    \draw[black!10!white]
      (current page text area.north west)
        rectangle (current page text area.south east);
  \end{tikzpicture}}

% Draw a baseline grid on every page
\AddToShipoutPicture{\drawbaselinegrid}

% ================================ LANGUAGE & FONTS (polyglossia, fontspec) ====

\setmainlanguage{arabic}
\setmainfont{Scheherazade}

% ===================================================== HEADINGS (titlesec) ====

\setlength \beforetitleunit \lead
\setlength \aftertitleunit  \lead

\titlespacing*{\chapter} {0em}{*0}{*2} % Remember there's a \topskip!
\titlespacing*{\section} {0em}{*0}{*1}

\newcommand\ghostdrop[2]{%
  \raisebox{-#1\lead}[0pt][0pt]{#2}}

\titleformat {\chapter} {\bfseries} {} {0pt}
  {\ghostdrop{1.0}{\parbox[t]{\columnwidth}{\centering\Large#1}}}

\titleformat {\section} {\bfseries} {} {0pt}
  {\ghostdrop{1.0}{\parbox[t]{\columnwidth}{\large#1}}}

% manual spacers in case long headings break line
%\def\longchapterskip{\vspace{2\lead}}
%\def\longsectionskip{\vspace{2\lead}}

% =========================================================== MAIN DOCUMENT ====

\begin{document}
\chapter{كِتَاب الطَّهَارَةِ}
اَلْمِيَاهُ ثَلَاثَةٌ\\
اَلْأَوَّلُ: طَهُورٌ وَهُوَ اَلْبَاقِي عَلَى خِلْقَتِهِ وَمِنْهُ مَكْرُوهٌ كَمُتَغَيِّرٍ بِغَيْرِ مُمَازِجٍ وَمُحَرَّمٌ لَا يَرْفَعُ اَلْحَدَثَ وَيُزِيلُ اَلْخَبَثَ وَهُوَ اَلْمَغْصُوب وَغَيْرُ بِئْرِ النَّاقَةِ مِنْ ثَمُودَ .\\
اَلثَّانِي: طَاهِرٌ لَا يَرْفَعُ اَلْحَدَثَ وَلَا يُزِيلُ اَلْخَبَثَ وَهُوَ اَلْمُتَغَيِّرُ بِمُمَازِجٍ طَاهِر وَمِنْهُ يَسِيرٌ مُسْتَعْمَلٌ فِي رَفْعِ حَدَثٍ .\\
اَلثَّالِثُ: نَجِسٌ يَحْرُمُ اِسْتِعْمَالُهُ مُطْلَقًا وَهُوَ مَا تَغَيَّرَ بِنَجَاسَةٍ فِي غَيْرِ مَحِلِّ تَطْهِيرٍ أَوْ لَاقَاهَا فِي غَيْرِهِ وَهُوَ يَسِيرٌ وَالْجَارِي كَالرَّاكِدِ وَالْكَثِيرُ قُلَّتَانِ وَهُمَا مِائَةُ رِطْلٍ وَسَبْعَةُ أَرْطَالٍ وَسُبْعُ رِطْلٍ بِالدِّمَشْقِيِّ وَالْيَسِيرُ مَا دُونَهُمَ .
\section{طَهَارَةُ اَلْآنِيَةِ}
كُلُّ إِنَاءٍ طَاهِرٍ يُبَاحُ اِتِّخَاذُهُ وَاسْتِعْمَالُهُ إِلَّا أَنْ يَكُونَ ذَهَبًا أَوْ فِضَّةً أَوْ مُضَبَّبًا بِأَحَدِهِمَا لَكِنْ تُبَاحُ ضَبَّةٌ يَسِيرَةٌ مِنْ فِضَّةٍ لِحَاجَةٍ وَمَا لَمْ تُعْلَمْ نَجَاسَتُهُ مِنْ آنِيَةِ كُفَّارٍ وَثِيَابُهُمْ طَاهِرَةٌ وَلَا يَطْهُرُ جِلْدُ مَيِّتَةٍ بِدِبَاغٍ وَكُلُّ أَجْزَائِهَا نَجِسَةٌ إِلَّا شَعْرًا وَنَحْوَهُ وَالْمُنْفَصِلُ مِنْ حَيٍّ كَمَيْتَتِهِ .
\section{اَلِاسْتِنْجَاءُ وَالِاسْتِجْمَارُ}
اَلِاسْتِنْجَاءُ وَاجِبٌ مِنْ كُلِّ خَارِجٍ إِلَّا اَلرِّيحَ وَالطَّاهِرَ وَغَيْرَ اَلْمُلَوَّث وَسُنَّ عِنْدَ دُخُولِ خَلَاءٍ قَوْلُ : بِسْمِ اَللَّهِ اَللَّهُمَّ إِنِّي أَعُوذُ بِكَ مِنْ اَلْخُبُثِ وَالْخَبَائِثِ وَبَعْدَ خُرُوجٍ مِنْهُ : غُفْرَانَكَ، اَلْحَمْدُ لِلَّهِ اَلَّذِي أَذْهَبَ عَنِّي اَلْأَذَى وَعَافَانِي.\\
وَتَغْطِيَةُ رَأْسٍ وَانْتِعَالٌ وَتَقْدِيمُ رِجْلِهِ اَلْيُسْرَى دُخُولًا وَاعْتِمَادُهُ عَلَيْهَا جُلُوسًا وَالْيُمْنَى خُرُوجًا عَكْسُ مَسْجِدٍ وَنَعْلٍ وَنَحْوِهِمَا وَبُعْد فِي فَضَاءٍ وَطَلَبُ مَكَانٍ رَخْوٍ لِبَوْلٍ وَمَسْحُ اَلذِّكْرِ بِالْيَدِ اَلْيُسْرَى إِذَا اِنْقَطَعَ اَلْبَوْلُ مِنْ أَصْلِهِ إِلَى رَأْسِهِ ثَلَاثًا وَنَتْرُهُ ثَلَاثًا .\\
وَكُرِهَ دُخُولُ خَلَاءٍ بِمَا فِيهِ ذَكَرُ اَللَّهِ -تَعَالَى - وَكَلَامٌ فِيهِ بِلَا حَاجَةٍ وَرَفْعُ ثَوْبٍ قَبْلَ دُنُوٍّ مِنَ اَلْأَرْضِ وَبَوْلٌ فِي شَقٍّ وَنَحْوِهِ وَمَسُّ فَرْجٍ بِيَمِينٍ بِلَا حَاجَةٍ وَاسْتِقْبَالُ اَلنَّيِّرَيْنِ وَحَرُمَ اِسْتِقْبَالُ قِبْلَةٍ وَاسْتِدْبَارُهَا فِي غَيْرِ بُنْيَانٍ وَلُبْثٌ فَوْقَ اَلْحَاجَةِ وَبَوْلٌ فِي طَرِيقٍ مَسْلُوكٍ وَنَحْوِهِ وَتَحْتَ شَجَرَةٍ مُثْمِرَةٍ ثَمَرًا مَقْصُودًا.\\
\section{اَلسِّوَاكُ وَتَوَابِعُهُ}
يَسُنُّ اَلسِّوَاكُ بِالْعُودِ كُلَّ وَقْتٍ إِلَّا لِصَائِمٍ بَعْدَ اَلزَّوَالِ فَيُكْرَه . وَيَتَأَكَّدُ عِنْدَ صَلَاةٍ وَنَحْوِهَا وَتَغَيُّرِ فَمٍ وَنَحْوِهِ .
وَسُنَّ بُدَاءَةٌ بِالْأَيْمَنِ فِيهِ وَفِي طُهْرٍ وَشَأْنِهِ كُلِّهِ وَادِّهَانٌ غِبًّا وَاكْتِحَالٌ فِي كُلِّ عَيْنٍ ثَلَاثًا وَنَظَرٌ فِي مِرْآةٍ وَتَطَيُّبٌ وَاِسْتِحْدَاد وَحَفُّ شَارِبٍ وَتَقْلِيمُ ظُفُرٍ وَنَتْفُ إِبِط وَكُرِهَ قَزَع وَنَتْفُ شَيْبٍ وَثَقْبُ أُذُنِ صَبِيٍّ وَيَجِبُ خِتَانُ ذَكَرٍ وَأُنْثَى "بُعَيْدَ بُلُوغٍ مَعَ أَمِنِ اَلضَّرَرِ وَيُسَنُّ قَبْلَهُ وَيُكْرَهُ سَابِعَ وِلَادَتِهِ وَمِنْهَا إِلَيْهِ".
\end{document}

The result is better than I remembered:

blop bleep

Note I'm still not using your font: I noticed Traditional Arabic's baseline is off, so lines don't really sit on the grid. On the contrary, Scheherazade gives perfect visual alignment.

14
  • Thank you very much for providing a concrete answer with a solution. Oddly enough, before even reading your answer. I had downloaded ConTeXt book and was trying to test it out and see how it works. I was just setting it up with TeXStudio when i read your comment and was pleasantly surprised when you mentioned ConTeXt. I will definitely try and learn ConTeXt and try it out. I have not particular need to XelateX, i was only using it since it does not give an error when compiling Arabic text, whereas i tried LuaLatex and i gave errors. Apart from that, i am open to any ideas to try.
    – Ibn Saeed
    Dec 31, 2015 at 17:38
  • @IbnSaeed Note I added a XeLaTeX solution to the answer. Most if not all ConTeXt resources can be found at Context Garden. Personally, I never read a ConTeXt book from cover to cover: I just consult the reference manual and CG's wiki itself, learning as i do. Having a quick browse of the whole reference manual will give you a good feel of most things that can be done. Jan 1, 2016 at 15:26
  • I have tried the ConTeXt code and it works fine but with a small issue with the font. It's displaying the 1st section title differently in XeLaTeX and ConTeXt. The letters are " الآنية ", the " لآ " is displayed wrong in ConTeXt. The same issue is present in all words where " ا لآ " appear in ConTeXt
    – Ibn Saeed
    Jan 2, 2016 at 12:42
  • This issue goes away if i dont place diacritic marks before the letter " ل ", for example " الْأ ", change it to " الأ ". then it shows fine. but the issue it not present in Arabic Typsetting font, it displays the same letter correctly without making any changes.
    – Ibn Saeed
    Jan 2, 2016 at 13:28
  • I tried using arabic typsetting font but the main body text does not appear, it shows blank area whereas the Chapter title and Section title appears just fine. So i have problems with both fonts on ConTeXt, whereas these font issues do not exists when using XeLaTeX as you can see from my initial screenshots.
    – Ibn Saeed
    Jan 2, 2016 at 13:29

You must log in to answer this question.

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