You are not logged in.

#1 2010-12-11 18:28:15

Ben9250
Member
From: Bath - England
Registered: 2010-06-10
Posts: 208
Website

Org Mode LaTeXFonts

Hi, wondering if a fellow emacs user could help.
I'm trying to get my org-mode setup to export latex documents using arial. I installed arial using getnonfreefonts and writing out a tex file and putting the relevant /usepackage commands in the header works.

In Emacs I edited Org Format Latex Header to include

\renewcommand*\familydefault{\sfdefault} %% Only if the base font of the document is to be sans serif

.
I also edited the Org Export Latex Packages Alist to include  scaled uarial. The default list already contains T1 fontenc.

But when I export, the header does not include

\renewcommand*\familydefault{\sfdefault} %% Only if the base font of the document is to be sans serif

and does not export with Arial font. (I need Arial as a requirement for work).

Everything else about org mode has been left as was when installed.

I can provide info such as export to pdf processes and such if it's required

[EDIT] If it helps this is the corresponding section of my .emacs:

 
  '(org-export-latex-packages-alist (quote (("scaled" "uarial" nil) ("" "babel" nil))))
 '(org-format-latex-header "\\documentclass{article}
\\usepackage[usenames]{color}
\\usepackage{amsmath}
\\usepackage[mathscr]{eucal}
\\pagestyle{empty}             % do not remove
[PACKAGES]
[DEFAULT-PACKAGES]
\\renewcommand*\\familydefault{\\sfdefault}
% The settings below are copied from fullpage.sty
\\setlength{\\textwidth}{\\paperwidth}
\\addtolength{\\textwidth}{-3cm}
\\setlength{\\oddsidemargin}{1.5cm}
\\addtolength{\\oddsidemargin}{-2.54cm}
\\setlength{\\evensidemargin}{\\oddsidemargin}
\\setlength{\\textheight}{\\paperheight}
\\addtolength{\\textheight}{-\\headheight}
\\addtolength{\\textheight}{-\\headsep}
\\addtolength{\\textheight}{-\\footskip}
\\addtolength{\\textheight}{-3cm}
\\setlength{\\topmargin}{1.5cm}
\\addtolength{\\topmargin}{-2.54cm}"))

Thanks,
Ben.

Last edited by Ben9250 (2010-12-11 19:59:58)


"In England we have come to rely upon a comfortable time-lag of fifty years or a century intervening between the perception that something ought to be done and a serious attempt to do it."
  - H. G. Wells

Offline

#2 2010-12-11 21:30:53

Ben9250
Member
From: Bath - England
Registered: 2010-06-10
Posts: 208
Website

Re: Org Mode LaTeXFonts

I have a furthur issue now that an org file like so:

#+TITLE:Dissertation Data Analysis
#+AUTHOR: Ben J. Ward
#+OPTIONS: num:nil ^:nil f:nil
#+BABEL: :session *R* :results silent
#+LATEX_CLASS: article
#+LATEX_HEADER: \renewcommand*\familydefault{\sfdefault}
#+begin_src R :exports results
evolution <- read.csv(file="~/Evolution Results.csv", header=T)
library("lattice")
#+end_src

* Visualization of Data
** Overall trend in Minimum inhibitory concentration values over time.
#+srcname:fig1
#+begin_src R :results output :exports results :file fig1.pdf
 xyplot(MIC.~Challenge, data=evolution)
#+end_src

#attr_latex: width=0.8\textwidth,placement=[p]
#+label: fig:one
#+caption: Fig1. Overall increace in MIC values as challenges continue.
#+results: fig1
[[file:fig1.pdf]]

Results in a blank pdf, other than the title and author, and a .tex file like thus:

% Created 2010-12-11 Sat 21:17
\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{fixltx2e}
\usepackage{graphicx}
\usepackage{longtable}
\usepackage{float}
\usepackage{wrapfig}
\usepackage{soul}
\usepackage{textcomp}
\usepackage{marvosym}
\usepackage{wasysym}
\usepackage{latexsym}
\usepackage{amssymb}
\usepackage{hyperref}
\tolerance=1000
\usepackage[scaled]{uarial}
\usepackage{babel}
\renewcommand*\familydefault{\sfdefault}
\providecommand{\alert}[1]{\textbf{#1}}

\title{Dissertation Data Analysis}
\author{Ben J. Ward}
\date{11 December 2010}

\begin{document}

\maketitle



\end{document}

Is anyone wise in the working of org and babel that might help me? (I know how to use it, not so much fixing it)

Thanks,
Ben.


"In England we have come to rely upon a comfortable time-lag of fifty years or a century intervening between the perception that something ought to be done and a serious attempt to do it."
  - H. G. Wells

Offline

#3 2010-12-12 00:44:58

bt
Member
Registered: 2007-04-11
Posts: 198

Re: Org Mode LaTeXFonts

I have had trouble with Arial. It doesn't seem to compile correctly Had to change to TeX Gyre Adventor. I have no idea why.

Offline

#4 2010-12-12 02:44:22

frabjous
Member
Registered: 2010-07-13
Posts: 367

Re: Org Mode LaTeXFonts

bt wrote:

I have had trouble with Arial. It doesn't seem to compile correctly Had to change to TeX Gyre Adventor. I have no idea why.

I don't know why either, but if you're going to go with a TG font, TeX Gyre Heros (tgheros) would be a much closer match.

Offline

Board footer

Powered by FluxBB