From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marcin Borkowski Subject: Re: org-mode to latex, again! Date: Tue, 31 Mar 2015 17:59:53 +0200 Message-ID: <87zj6tnona.fsf@wmi.amu.edu.pl> References: <87ego5a2e3.fsf@skimble.plus.com> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:47411) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YcyaI-0001v3-2c for emacs-orgmode@gnu.org; Tue, 31 Mar 2015 12:00:14 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YcyaE-0002Sm-Ou for emacs-orgmode@gnu.org; Tue, 31 Mar 2015 12:00:09 -0400 Received: from msg.wmi.amu.edu.pl ([2001:808:114:2::50]:43043) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YcyaE-0002Fi-JB for emacs-orgmode@gnu.org; Tue, 31 Mar 2015 12:00:06 -0400 Received: from localhost (localhost [127.0.0.1]) by msg.wmi.amu.edu.pl (Postfix) with ESMTP id 8E5275B5E1 for ; Tue, 31 Mar 2015 18:00:01 +0200 (CEST) Received: from msg.wmi.amu.edu.pl ([127.0.0.1]) by localhost (msg.wmi.amu.edu.pl [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id QqiSUQkQWqUV for ; Tue, 31 Mar 2015 18:00:01 +0200 (CEST) Received: from localhost (117-116.echostar.pl [213.156.117.116]) by msg.wmi.amu.edu.pl (Postfix) with ESMTPSA id 0B3FF5B5D1 for ; Tue, 31 Mar 2015 18:00:00 +0200 (CEST) In-reply-to: <87ego5a2e3.fsf@skimble.plus.com> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: org-mode On 2015-03-31, at 12:26, Sharon Kimble wrote: > I am attempting again to write a latex document with org-mode. The > org-mode part is no problem, but the latex part is awkward. This is > the first few line of my org-mode document - > > --8<---------------cut here---------------start------------->8--- > #+TITLE: The history of custard pies. > #+AUTHOR: Sharon Kimble > #+EMAIL: boudiccas@skimble.plus.com > #+DATE: 01-04-2015 > #+LATEX: \usepackage{~/texmf/tex/latex/commonstuff/mysty} > # #+Latex_Class: mysty > #+DESCRIPTION: > #+KEYWORDS: > #+LANGUAGE: en > > * Blargh > --8<---------------cut here---------------end--------------->8--- > > The latex file "mysty" is actually "mysty.sty" and contains all the > latex files that I want to use, but it doesn't appear to be loading, > and I can't see why? My idea of having *all* the latex packages in > one file is so that I hope to be able to have it in its own > directory and then symlink it to each projects main org-mode file so > that I would have a known working setup, right from the start! 1. Then, why not put your customizations in a custom LaTeX class (based on an existing one)? Currently, you have a package/class mix (see below). See clsguide.pdf in your TeX distro for details about how to do it (see e.g. section "Example: a newsletter class") 2. And no need to symlink it anywhere. If you have it in e.g. ~/texmf/tex/latex/mystuff/myclass.cls, run mktexlsr (assuming you are on TeXlive) and then just \usepackage{mypackage} or \documentclass{myclass}. It is only necessary to run mktexlsr again in case of a change in the directory under ~/texmf, so e.g. new files or filename changes, but not just updating the file itself. > The first few lines of "mysty.sty" are > > --8<---------------cut here---------------start------------->8--- > \NeedsTeXFormat{LaTeX2e} > \ProvidesClass{mysty}[31-03-2015] For .sty, this ^^ should be \ProvidesPackage. Again, see clsguide.pdf. > \RequirePackage[l2tabu,orthodox]{nag} Probably a good idea. > \RequirePackage{fixltx2e} > \documentclass[a4paper,12pt]{article} > % \documentclass[a4paper,12pt]{book} > % \documentclass[a4paper,12pt]{report} > % \documentclass[a4paper,12pt]{memoir} NO > % \documentclass[a4paper,12pt]{scrbook} > %%\documentclass[a4paper,12pt]{scrreprt} This should be \LoadClass (or similar, like \LoadClassWithOptions) in a class file. > \usepackage{morewrites} > \usepackage{tocloft} > \usepackage[stretch=10]{microtype} > \setlength\parindent{0pt} % sets indent to zero > \setlength{\parskip}{5pt} % changes vertical space between paragraphs Tsk, tsk. What about \usepackage{parskip}? > \setcounter{tocdepth}{1} > --8<---------------cut here---------------end--------------->8--- > > Any ideas please? > > Thanks > Sharon. Hth, -- Marcin Borkowski http://octd.wmi.amu.edu.pl/en/Marcin_Borkowski Faculty of Mathematics and Computer Science Adam Mickiewicz University