Comments (12)
@thammegowda Not an expert with Babel, but I think as soon as you use a \babelfont
, you need to define an explicit Latin font as well. I haven't found a way to get the exact same font as LaTeX's ptm
family (which is what "times" uses), but if you add
\babelfont{rm}{TeX Gyre Termes}
before you load the other, language-specific fonts, you get something virtually indistinguishable from it.
from acl-style-files.
XeLaTeX has a major disadvantage, which is that arXiv does not support it. So I don't think it can be made the default (yet). But I definitely agree with making it an option.
@thammegowda In your example, the one on the right is set in Computer Modern, not Times Roman. So something is wrong with the font setup.
from acl-style-files.
I was just looking into whether there were efforts to move away from pdflatex
to make the ACL style files more Unicode friendly - Glad I found this issue thread. I have 2 suggestions, and can help with the migration in these respects:
- As an engineer LuaLaTeX is probably better than XeLaTeX for the reasons discussed here.
- moving away from the Times font to Charter provided by packages like XCharter. We have many good free fonts today, like Charter, there's no need to still be using Times. Furthermore, Charis SIL was based on Charter and will play well with it. Supporting IPA, and wide variety of character sets natively ought to be a priority, especially considering the object of our study.
Further decisions probably need to be made about sans-serif and monospaced fonts, but none that can't be solved with some research.
from acl-style-files.
So the proceedings template contains these lines, which are really specific to pdfLaTeX and shouldn't be used with the newer engines:
\usepackage{times}
\usepackage{latexsym}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
If I compile that on Overleaf, download the PDF, and check the fonts that are used with pdffonts
, I get this:
name type encoding emb sub uni object ID
------------------------------------ ----------------- ---------------- --- --- --- ---------
WFBODD+NimbusMonL-Regu Type 1 Custom yes yes yes 60 0
JKDAPA+NimbusRomNo9L-ReguItal Type 1 Custom yes yes yes 73 0
ARYBWX+NimbusRomNo9L-Medi Type 1 Custom yes yes yes 56 0
HPBZPC+NimbusRomNo9L-Regu Type 1 Custom yes yes yes 58 0
ALVSVR+NimbusSanL-Bold Type 1 Custom yes yes yes 59 0
So at least Overleaf uses the "Nimbus" fonts when including the "times" package. That makes me think that with XeLaTeX or LuaLaTeX, the above lines in the template should be replaced with:
\usepackage{fontspec}
\setmainfont{Nimbus Roman}
\setsansfont{Nimbus Sans}
\setmonofont{Nimbus Mono}
(EDIT: TeX Gyre Termes is probably better, since it's supposed to be the same but with more features.)
I think it would make sense to check in the .sty file which TeX engine is used, and modify the font-related commands accordingly. @davidweichiang Would it make sense if I tried to prepare a pull request for something like this?
from acl-style-files.
This all sounds great. But we need to set it up so that it looks the same either way.
from acl-style-files.
Also related if any pub chairs are still using it: yz-joey/ACLPUB#7
from acl-style-files.
The modifications I did to add some Unicode text was
- enable babel
\usepackage[english]{babel} % English as the main language
\babelprovide[import]{hindi}
\babelprovide[import]{arabic}
\babelprovide[import]{kannada}
\babelfont[*devanagari]{rm}{Lohit Devanagari}
\babelfont[*arabic]{rm}{Noto Sans Arabic}
- Paste some Arabic and Hindi text
Hindi: \foreignlanguage{hindi}{मानव अधिकारों की सार्वभौम घोषणा} Arabic: \foreignlanguage{arabic}{الإعلان العالمي لحقوق الإنسان
- And switch compiler to XeLaTex, since PdfTex could not compile it.
Also, I had to comment out\pdfoutput=1
for XeLaTex
I didn't explicitly modify fonts for English/Latin. Is babel
import messing up default fonts for English? Sorry, I am not a *TeX pro. Here is my overleaf project for reference https://www.overleaf.com/project/61d4c64cbc3e72789d2de4bc
from acl-style-files.
Well, I would say arXiv has a major disadvantage in that it doesn't support XeLaTeX/LuaLaTeX, but I can see how we should make sure to support it ;)
@thammegowda The default font is Computer Modern, to get the correct font for the current *ACL template, both \usepackage{times}
and \usepackage[T1]{fontenc}
are important.
from acl-style-files.
@mbollmann I agree, and I hope arXiv realizes this shortcoming and makes an update.
Also, I have these two lines
\usepackage{times}
\usepackage[T1]{fontenc}
I didn't remove these two, but is XeLaTex using Computer Modern? That's surprising!
from acl-style-files.
@thammegowda Ah, maybe it is overwritten by something else in your preamble then. I can't access your Overleaf project, it's restricted. Try to move the "times" import further down maybe?
from acl-style-files.
@mbollmann
I think babel
package is causing the issue. If I move times
fontenc
and microtype
below the babel
, the fonts for latin look as intended, but Arabic and Hindi stop working (text doesn't even appear).
\usepackage[english]{babel} % English as the main language
\babelprovide[import]{hindi}
\babelprovide[import]{arabic}
\babelprovide[import]{kannada}
\babelfont[*devanagari]{rm}{Lohit Devanagari}
\babelfont[*arabic]{rm}{Noto Sans Arabic}
\usepackage{times}
\usepackage[T1]{fontenc}
\usepackage{microtype}
Here is a overleaf link: https://www.overleaf.com/read/vbyhzmssdkkb (worked for me in private/incognito)
If we could share a working example with these text, it'd be very useful.
Hindi: मानव अधिकारों की सार्वभौम घोषणा
Arabic: الإعلان العالمي لحقوق الإنسان
from acl-style-files.
That works! Thanks.
from acl-style-files.
Related Issues (20)
- Bad length values lead to ugly misalignment between the columns
- preprint option HOT 1
- Inconsistency in Arxiv compilation HOT 3
- Add example author blocks
- Proposal: Pandoc (Dynamic) LaTex Template for ACL Papers
- The style file in .zip file is not same as the file in overleaf or latex subdirectory
- Update request for ACL style sheet to include editor names in the bib files (@inproceedings) HOT 4
- anthology.bib exceeds the file size limit for overleaf HOT 6
- \thanks and \Thanks are broken HOT 2
- Have to move files before being able to use pdflatex HOT 1
- Word equations
- Bump TeXLive version on Overleaf to 2023 HOT 1
- Typo in naming of Acknowledgments section
- Expose `if final copy` switch to the user HOT 1
- Cannot add svg images due to no inkscape HOT 1
- Not being used by ARR HOT 25
- Sync with Overleaf HOT 38
- just a quick thank you for making this on overleaf, saved me tons of trouble
- arXiv.org citations missing info HOT 9
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from acl-style-files.