Articles, Essays, and Journal TemplatesTemplate for LTR-RTL and RTL-LTR Dictionaries

IEEE, Elsevier, ACM, ACE, Science, AGU, PNAS, PLOS, RSoC, Springer, Stylish articles and Essays
Post Reply
wzwzm
Posts: 6
Joined: Sun Oct 15, 2017 12:08 am

Template for LTR-RTL and RTL-LTR Dictionaries

Post by wzwzm »

Hello,

it's my first day with LaTex and my first day in this forum. I am posting this question or "cry for help" with the hope that the LaTex community can help me find a solution for my following problem or share the solution if it already exists:

Problem:

I need to prepare three dictionaries for printing:

First one is French - Pashto (LTR - RTL Language Dictionary) [printed book pages will start from Left]

Second one is Pashto - French (RTL - LTR Language Dictionary) [printed book pages will start from Left]

Third one is Pashto - Pashto (RTL - RTL Language Dictionary) [printed book pages will start from Right]

I tried to make two different printing layouts for named dictionaries in MS Word, but the alignments RTL and LTR are driving me crazy specially in French - Pashto Dictionary because I am not able to align LTR words to left and the same time RTL meanings into right in the same line and in the same column.


Is there any possibility to edit/change this LaTex Template (https://www.latextemplates.com/template/dictionary) or make a similar three Templates which also work for my named dictionary combinations?

I am uploading a text file with example Data for all three dictionaries.

Thank you very much for each help in advance.
Attachments
Three_Dictionaries_Examples.txt
(22.57 KiB) Downloaded 1025 times

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org
TikZ book
wzwzm
Posts: 6
Joined: Sun Oct 15, 2017 12:08 am

Template for LTR-RTL and RTL-LTR Dictionaries

Post by wzwzm »

what should i add in the code, so that the Pashto Language characters are shown properly?

Code: Select all

Code, edit and compile here:
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Dictionary
% LaTeX Template
% Version 1.1 (6/8/17)
%
% This template was downloaded from:
% http://www.LaTeXTemplates.com
%
% Original author:
% Vel (vel@latextemplates.com) inspired by a template by Marc Lavaud
%
% License:
% CC BY-NC-SA 3.0 (http://creativecommons.org/licenses/by-nc-sa/3.0/)
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%----------------------------------------------------------------------------------------
% PACKAGES AND OTHER DOCUMENT CONFIGURATIONS
%----------------------------------------------------------------------------------------
\documentclass[11pt,a5paper,twoside]{article} % 11pt font size, A5 paper and two-sided margins
\usepackage[top=2.5cm,bottom=2.5cm,left=1.5cm,right=1.0cm,columnsep=10pt]{geometry} % Document margins and spacings
\setlength{\columnsep}{1,5cm}
\setlength{\columnseprule}{0.2pt}
\usepackage[utf8]{inputenc} % Required for inputting international characters
\usepackage[T1]{fontenc} % Output font encoding for international characters
\usepackage{palatino} % Use the Palatino font
\usepackage{microtype} % Improves spacing
\usepackage{multicol} % Required for splitting text into multiple columns
\usepackage[bf,sf,center]{titlesec} % Required for modifying section titles - bold, sans-serif, centered
\usepackage{fancyhdr} % Required for modifying headers and footers
\fancyhead[L]{\textsf{\rightmark}} % Top left header
\fancyhead[R]{\textsf{\leftmark}} % Top right header
\renewcommand{\headrulewidth}{1.4pt} % Rule under the header
 
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Last edited by Stefan Kottwitz on Sun Oct 15, 2017 5:04 pm, edited 1 time in total.
User avatar
Stefan Kottwitz
Site Admin
Posts: 10311
Joined: Mon Mar 10, 2008 9:44 pm

Template for LTR-RTL and RTL-LTR Dictionaries

Post by Stefan Kottwitz »

Welcome to the forum!

Use the arabtex package. Embed Pashto text in \< ... > or use \RL{ ... } or
\begin{arabtext} ... \end{arabtext}. See also ArabTeX in the Wikipedia.

For example:

Code: Select all

Code, edit and compile here:
\documentclass{article}
\usepackage{arabtex}
\begin{document}
\section*{A}
\<د فرانسوي ژبې لومړی توری او لومړی غږیز حرف>
\end{document}
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Stefan
LaTeX.org admin
wzwzm
Posts: 6
Joined: Sun Oct 15, 2017 12:08 am

Template for LTR-RTL and RTL-LTR Dictionaries

Post by wzwzm »

Thank you very much for you kind answer stefan. I read through the links you have suggested and i also downloaded the needed package but my Pashto Text is not readable. I guess that it has something to do with font. I will keep trying to solve it somehow.
User avatar
Stefan Kottwitz
Site Admin
Posts: 10311
Joined: Mon Mar 10, 2008 9:44 pm

Template for LTR-RTL and RTL-LTR Dictionaries

Post by Stefan Kottwitz »

You can click on "Open in Overleaf" above the code in my post, so you can see the output of an online compiler independent of your font installation.

Stefan
LaTeX.org admin
wzwzm
Posts: 6
Joined: Sun Oct 15, 2017 12:08 am

Template for LTR-RTL and RTL-LTR Dictionaries

Post by wzwzm »

That was the first thing i did. I opened it in Overleaf and the text that its showing me is not readable. It seems to me that it converts the letters of Pashto to any asci font letters. The result is unfortunately not readable. It may be because Arabic and Pashto are two differnt languages.
User avatar
Stefan Kottwitz
Site Admin
Posts: 10311
Joined: Mon Mar 10, 2008 9:44 pm

Template for LTR-RTL and RTL-LTR Dictionaries

Post by Stefan Kottwitz »

That's what I got on Overleaf:
overleaf.png
overleaf.png (11.49 KiB) Viewed 34386 times
Stefan
LaTeX.org admin
wzwzm
Posts: 6
Joined: Sun Oct 15, 2017 12:08 am

Template for LTR-RTL and RTL-LTR Dictionaries

Post by wzwzm »

Yes, its not readable. For the first time I got something readable in Pashto was today with following code:

\documentclass[12pt,a5paper,twoside]{article}
\usepackage{epsfig,graphicx,subfigure,amsthm,amsmath}
\usepackage{color,xcolor}
\usepackage{xepersian}
%\fancyheadoffset[RE,LO]{0\textwidth}
\setlength{\headsep}{1cm}
\pagenumbering{arabic} \setcounter{page}{1}
\label{sec.sub.gdn}
%\settextfont[ExternalLocation=fonts/]{Yas.ttf}
%\settextfont[Scale=1.2]{XB_Niloofar.ttf}
\setlatintextfont[Scale=1]{Times New Roman}
\renewcommand{\baselinestretch}{1.5}
\newcommand{\entry}[4]{\textbf{#1}\markboth{#1}{#1}\ {(#2)}\ \textit{#3}\ $\bullet$\ {#4}}
\begin{document}
\begin{titlepage}
\centering \LARGE
\bfseries دغه يو پښتو متن دی. ړنګ يې نه کړئ.
\end{titlepage}
\end{document}
wzwzm
Posts: 6
Joined: Sun Oct 15, 2017 12:08 am

Template for LTR-RTL and RTL-LTR Dictionaries

Post by wzwzm »

I take the earlier code back. It once worked but now its not. :-(
What i did is that i looked for LaTex persian templates and found following link:
https://www.overleaf.com/gallery/tagged ... eZP3Wi0NPY
There in beamber one i could also write pashto text, and it showed it to me correcttly.
But now i did something and its not working again :-) I will keep trying and come here again, as soon i have found out whats not working and why.
Post Reply