New answers tagged

3

Here is a possible solution using the Saab font. I don't know anything about the Gurmukhi script, and the Saab font doesn't seem to recognize the Gurmukhi script tag, even though it should, so there may be problems with the font. For small sections of Punjabi text, this may be sufficient. For whole documents you would need to write your own version of a ...


1

\selectlanguage{english} \author{Foo} \title{Foobar} comes too early -- at the time of \maketitle, the language setting is the default greek (since this is the last language specified in the babel settings). You've to enclose \selectlanguage{english} \maketitle \selectlanguage{greek} for example. \documentclass[12pt]{report} \usepackage[utf8]{...


3

You can use combination of a font switch the character spacing to change the appearance of the em-dash. In the first step you create a separate typeface with a compressed em-dash. \definefontfeature[russian][extend=0.8] \definefallbackfamily [russianfont] [rm] [DejaVu Serif] [range={0x2013,0x2014},force=yes,features=russian] \definefontfamily [...


2

This also removes the burden of typing different em-dashes for different situations. You just type --- or — (unicode em-dash) and it will adjust depending of the position. \usemodule[translate] \translateinput[---][—] \define\cyrdashsymbol{\dontleavehmode\scale[sx=0.80]{---}} % cyrillic dash sign \unexpanded\def\cyrdash{\ifincsname\string—\else \ifvmode\...


3

One option is to have language specific hspace: \define\cyrdash{\dontleavehmode\scale[sx=0.80]{---}} \setuplanguage [ru] [midsentence=\cyrdash, leftsentence=\cyrdash, rightsentence=\cyrdash] \definehspace [emdash] [\zeropoint] \definehspace [ru] [emdash] [2cm] % Exaggerated, for visualization. \definetextmodediscretionary < {\...


0

Inserting % !TEX encoding = UTF-8 Unicode at the beginning of the file solved this issue for me.


2

In LaTeX # is a special character and you need to escape it: alsoletter = {\#}, keywords=[2]{\#if,\#endif,\#else}, should work as expected.


1

Take all the stuff from the \thispagestyle line down to \end{center} and copy/paste it after the abstract in you main language. Substitute all the \UNIVNAME stuff (and others) with the strings in your other language. Be sure to use the correct babel switch to get the hyphenation patterns for the other language.


1

Using following macro does the job for me: \newlength{\sect@@width} \usepackage{calc} \newcommand\mlsection[2]{% \refstepcounter{section} \begingroup \def\temp@@a{\noindent{#1}\hfill{#1}} \setlength{\sect@@width}{\widthof{\temp@@a}} \ifdim \sect@@width>\textwidth \noindent#1\newline \noindent#2 \else \temp@@a \fi \endgroup \...


3

Something like this perhaps? (warning, the section title does not wrap around correctly!) \documentclass{article} \usepackage[T1]{fontenc} \usepackage[utf8]{inputenc} \usepackage[english,frenchb]{babel} \babeltags{en = english} \babeltags{fr = frenchb} \usepackage{xpatch} \usepackage{xparse} \usepackage{blindtext} \usepackage{parcolumns} \...


0

Maybe this can help get you started: My guess is that the ideal solution would be a massively complicated package (like the hyphenation pattern recognition for various languages) to recognize a vs an etc. Since this isn't within my abilities here's a proposal. If your usage with articles is truly first = Article A, and abbreviations = Article B then I ...



Top 50 recent answers are included