emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Converting a Dissertation Template from docx to .org to use for LaTeX
@ 2015-05-04 15:58 Paul Harper
  2015-05-04 16:17 ` Rasmus
  2015-05-04 16:20 ` Ken Mankoff
  0 siblings, 2 replies; 7+ messages in thread
From: Paul Harper @ 2015-05-04 15:58 UTC (permalink / raw)
  To: emacs-orgmode


[-- Attachment #1.1: Type: text/plain, Size: 1688 bytes --]

To All,

I am doing an online MA in War in the Modern World from Kings College London
<http://www.kcl.ac.uk/sspp/departments/warstudies/study/wsonline/programmes/wimw.aspx>.
Due to my masochism and a desire to learn about reproducible research I
have been learning to use Org-Mode for writing papers. I can now write my
regular essays complete with working Biblatex bibliographies (which eluded
me for ages).

Apparently I am not the only military history person who has done their
dissertation in LaTeX
<http://airminded.org/2005/11/18/latex-the-pain-the-pleasure/>but perhaps a
rarity.

My problem is that creating an essay template was easy. The Kings College
London Dissertation has very specific requirements. One of the more
difficult for me is getting a preamble with "Dissertation submitted to the
Department of War Studies, School of Social Science and Public Policy,
King’s College London" above the Title. I've tried some improvisations
using the title  but they have ended up a bit odd.

I tried using writer2latex to make some LaTeX to use in the Org-File. I
guess I need some pointers.

How do I get the preamble above the title?

How do I make the fonts smaller in the title?

I need some items to appear on a page of their own. (ie. Ethical Approval,
Abstract, Declaration, Table of Contents.) How do I do that?

I'll attach my Org-File, the Kings Cross Dissertation Template and a .pdf
generated from Latex.

Thanks for nay suggestions.

-- 
Regards,


Paul

about.me/pauljamesharper

GnuPG ID:0x058884CC

Women and cats will do as they please, and men and dogs should relax and
get used to the idea."

Robert Heinlein

[-- Attachment #1.2: Type: text/html, Size: 2253 bytes --]

[-- Attachment #2: Disseration.org --]
[-- Type: application/octet-stream, Size: 6876 bytes --]

#+Title:Dissertation submitted to the Department of War Studies, School of Social Science and Public Policy, King's College London, as partial fulfilment of the requirements for the degree of MA War in the Modern World/Airpower in the Modern World \textit{(delete as appropriate)}. 
#+DATE:
#+OPTIONS:  toc:nil skip:nil ^:nil   author:nil timestamp:nil
#+LATEX_CLASS: article
#+LATEX_CLASS_OPTIONS: [12pt, a4paper]
#+LATEX_HEADER: \usepackage[scaled=.875]{inconsolata}
#+LATEX_HEADER: \usepackage{lipsum}
#+LaTeX_HEADER: \usepackage{fancyhdr} %For headers and footers
#+LaTeX_HEADER: \pagestyle{fancy} %For headers and footers
#+LaTeX_HEADER: \usepackage{lastpage} %For getting page x of y
#+LaTeX_HEADER: \usepackage{url} %Formatting of yrls
#+LaTeX_HEADER: \lhead{}
#+LaTeX_HEADER: \chead{}
#+LaTeX_HEADER: \rhead{}
#+LaTeX_HEADER: \lfoot{}
#+LaTeX_HEADER: \cfoot{}
#+LaTeX_HEADER: \rfoot{\thepage\ of \pageref{LastPage}}

# Set the spacing to double, as required in most papers.
#+LATEX_HEADER: \usepackage{setspace}
#+LATEX_HEADER: \doublespacing

# Fix the margins
#+LATEX_HEADER: \usepackage[margin=1in]{geometry}

# This line makes lists work better:
# It eliminates whitespace before/within a list and pushes it to the left margin
#+LATEX_HEADER: \usepackage{enumitem}
#+LATEX_HEADER: \setlist[enumerate,itemize]{noitemsep,nolistsep,leftmargin=*}

# I always include this for my bibliographies
#+LaTeX_HEADER: \usepackage[british]{babel}
#+LaTeX_HEADER: \usepackage{csquotes}
#+LaTeX_HEADER: \usepackage[backend=biber,style=apa,url=true, doi=false, isbn=false, eprint=false, maxbibnames=10, maxcitenames=3,language=british]{biblatex}
#+LaTeX_HEADER: \DeclareLanguageMapping{british}{british-apa}
#+LATEX_HEADER: \bibliography{/home/felixdz/Dropbox/bibliography/references}

#+BEGIN_LaTeX
\setlength{\parindent}{0em}
#+END_LaTeX

#+BEGIN_LATEX

{\centering\bfseries
[Your Title - Without Brackets]
\par}

{\centering
[Firstname] [Lastname]
\par}

{\centering
[\href{mailto:email.address@kcl.ac.uk}{email.address@kcl.ac.uk}]
\par}

{\centering
Word count: [ \ \ ] (15,000 maximum)
\par}

{\centering
Submitted: \today
\par}

{\centering
Supervisor: [Your supervisor]
\par}


\bigskip


\bigskip


\bigskip
#+END_LATEX

#+BEGIN_LATEX
\clearpage

#+END_LATEX

#+BEGIN_LATEX
\clearpage
\clearpage{\bfseries
Declaration}

    a) I confirm that my research [title of dissertation] did or did
    not {(delete as appropriate)} require ethical approval. (If your
    research did require approval, please copy and paste the text of
    the email granting you approval below. Be sure to include your REC
    reference number.)


    b) I confirm that all research records (e.g. interview data and
    consent forms) will be held securely for the required period of
    time (12 months) and then destroyed in accordance with College
    guidelines.




    Yes [ ]      No [ ]




Note that the department will assume responsibility for this if you send
your research records to us. For KCL guidance on research data
management, please see:
\url{http://www.kcl.ac.uk/library/using/info-management/rdm/res-guide.aspx}
#+END_LATEX

#+BEGIN_LATEX
\clearpage{\bfseries
Abstract}

[Summary of your dissertation, stating the main argument and describing
content, no more than 300 words]

#+END_LATEX



#+BEGIN_LATEX
\clearpage{\bfseries
Declaration}

This dissertation is the sole work of the author, and has not been
accepted in any previous application for a degree; all quotations and
sources of information have been acknowledged.

Signed\ \ [\ \ ]\ \  Date\ \ [\ \ ]

{\itshape
(A typed signature is acceptable for electronic submissions.)}


\bigskip
#+END_LATEX

#+TOC: headlines 2

* Introduction
* Theory
Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Donec
hendrerit tempor tellus. Donec pretium posuere tellus. Proin quam
nisl, tincidunt et, mattis eget, convallis nec, purus. Cum sociis
natoque penatibus et magnis dis parturient montes, nascetur ridiculus
mus. Nulla posuere. Donec vitae dolor. Nullam tristique diam non
turpis. Cras placerat accumsan nulla. Nullam rutrum. Nam vestibulum[1]
accumsan nisl.

Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Donec
hendrerit tempor tellus. Donec pretium posuere tellus. Proin quam
nisl, tincidunt et, mattis eget, convallis nec, purus. Cum sociis
natoque penatibus et magnis dis parturient montes, nascetur ridiculus
mus. Nulla posuere. Donec vitae dolor. Nullam tristique diam non
turpis. Cras placerat accumsan nulla. Nullam rutrum. Nam vestibulum
accumsan nisl.[2]


* History
Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Donec
hendrerit tempor tellus. Donec pretium posuere tellus. Proin quam
nisl, tincidunt et, mattis eget, convallis nec, purus. Cum sociis
natoque penatibus et magnis dis parturient montes, nascetur ridiculus
mus. Nulla posuere. Donec vitae dolor. Nullam tristique diam non
turpis. Cras placerat accumsan nulla. Nullam rutrum. Nam vestibulum
accumsan nisl.\textcite{schneier_secrets_2004}[fn:2]

Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Donec
hendrerit tempor tellus. Donec pretium posuere tellus. Proin quam
nisl, tincidunt et, mattis eget, convallis nec, purus. Cum sociis
natoque penatibus et magnis dis parturient montes, nascetur ridiculus
mus. Nulla posuere. Donec vitae dolor. Nullam tristique diam non
turpis. Cras placerat accumsan nulla. Nullam rutrum. Nam vestibulum
accumsan nisl.

* Case Study
Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Donec
hendrerit tempor tellus. Donec pretium posuere tellus. Proin quam
nisl, tincidunt et, mattis eget, convallis nec, purus. Cum sociis
natoque penatibus et magnis dis parturient montes, nascetur ridiculus
mus. Nulla posuere. Donec vitae dolor. Nullam tristique diam non
turpis. Cras placerat accumsan nulla. Nullam rutrum. Nam vestibulum
accumsan nisl.[3]

Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Donec
hendrerit tempor tellus. Donec pretium posuere tellus. Proin quam
nisl, tincidunt et, mattis eget, convallis nec, purus. Cum sociis
natoque penatibus et magnis dis parturient montes, nascetur ridiculus
mus. Nulla posuere. Donec vitae dolor. Nullam tristique diam non
turpis. Cras placerat accumsan nulla. Nullam rutrum. Nam vestibulum
accumsan nisl.

* Conclusion
Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Donec
hendrerit tempor tellus. Donec pretium posuere tellus. Proin quam
nisl, tincidunt et, mattis eget, convallis nec, purus. Cum sociis
natoque penatibus et magnis dis parturient montes, nascetur ridiculus
mus. Nulla posuere. Donec vitae dolor. Nullam tristique diam non
turpis. Cras placerat accumsan nulla. Nullam rutrum. Nam vestibulum
accumsan nisl.



* Bibliography
\printbibliography [heading=none]

* Footnotes

[1] \textcite{schneier_battle_2013}

[2] \textcite{singer_cybersecurity_2014}

[3] \textcite{schneier_liars_2012}



[-- Attachment #3: Disseration.pdf --]
[-- Type: application/pdf, Size: 88938 bytes --]

[-- Attachment #4: DissertationTemplate2.docx --]
[-- Type: application/vnd.openxmlformats-officedocument.wordprocessingml.document, Size: 14774 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Converting a Dissertation Template from docx to .org to use for LaTeX
  2015-05-04 15:58 Converting a Dissertation Template from docx to .org to use for LaTeX Paul Harper
@ 2015-05-04 16:17 ` Rasmus
  2015-05-04 16:20 ` Ken Mankoff
  1 sibling, 0 replies; 7+ messages in thread
From: Rasmus @ 2015-05-04 16:17 UTC (permalink / raw)
  To: emacs-orgmode

Hi Paul,

Paul Harper <harper.paul.j@gmail.com> writes:

> How do I get the preamble above the title?
>
> How do I make the fonts smaller in the title?
>
> I need some items to appear on a page of their own. (ie. Ethical Approval,
> Abstract, Declaration, Table of Contents.) How do I do that?

Do you know KOMA-Scrip?  It has good support for title pages.  Check
section 3.7 in the KOMA-Script manual.  If it has everything you need just
that.

If your university provides a latex template, and one department there
certainty will, why not use that?  Just port the university's class or
recommend preamble to Org via org-latex-classes,
org-latex-title-command, #+LATEX_HEADER or similar.

Alternatively, it's not hard roll you own title-page.tex.  An example is
below.

You may also find interest in Eric's experience on writing a thesis in
Org:

        http://lists.gnu.org/archive/html/emacs-orgmode/2014-08/msg00113.html

Example of a titlepage:

\begin{fullsizetitle}
    \vspace{2cm}
    \begin{center}
    \begin{minipage}[t][0.89\textheight]{.80\linewidth}
      \sffamily
      \raggedleft
      \itshape
      \mbox{{\Large
          \PaperType\xspace  $\circ$ \University\xspace  $\circ$
          \Date}}
      \vspace{1.5cm}

      \noindent
      {\fontsize{20mm}{20mm}\selectfont
        \noindent\rule{.9\textwidth}{2pt}\\[.25ex]
        \noindent\Title

        \noindent\rule{.9\textwidth}{2pt}\vspace*{1ex}}


    {\fontsize{15mm}{15mm}\selectfont
      \vspace{3cm}
      {\Huge supervised by:\\[-1ex]
      \Supervisor}

      \vfill
      \makebox[\textwidth][r]{\parbox[b]{2cm}{\huge written\\[-1ex]by} \Author}
    {\huge \SubAuthor}}
    \end{minipage}
  \end{center}
\end{fullsizetitle}
\clearpage
% backside of titlepage
\thispagestyle{empty}
\mbox{}{\itshape\sffamily\noindent\vfill

    \noindent
    {\larger[2]{\rule{\textwidth}{.8pt}\vspace*{2ex}%
        I would like to thank \Supervisor for\cdots\\[1ex]\rule{\textwidth}{.8pt}}}

  \vfill\vfill\noindent%
  I would also like to acknowledge financial support from
  \begin{itemize*}
  \item f1
  \item f2
  \end{itemize*}}
\clearpage

-- 
Send from my Emacs

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Converting a Dissertation Template from docx to .org to use for LaTeX
  2015-05-04 15:58 Converting a Dissertation Template from docx to .org to use for LaTeX Paul Harper
  2015-05-04 16:17 ` Rasmus
@ 2015-05-04 16:20 ` Ken Mankoff
  2015-05-05 21:18   ` Paul Harper
  1 sibling, 1 reply; 7+ messages in thread
From: Ken Mankoff @ 2015-05-04 16:20 UTC (permalink / raw)
  To: Paul Harper; +Cc: emacs-orgmode

Hi Paul,

For this type of one-off project (a thesis), I'd suggest you a) remove all Org-generated LaTeX header, b) create your own LaTeX preamble that you \include{preamble} in your Org file, and then all of your questions become LaTeX questions, not Org questions.

Those LaTeX questions are likely easily googlable (or bingable) and found on TeX.SE. At the top of your Org document you can embed all the LaTeX code you want to generate the custom title and signature pages required by your institution.

Just my 2c.

On 2015-05-04 at 11:58, Paul Harper <harper.paul.j@gmail.com> wrote:
> I need some items to appear on a page of their own. (ie. Ethical Approval,
> Abstract, Declaration, Table of Contents.) How do I do that?

\clearpage command in LaTeX.

  -k.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Converting a Dissertation Template from docx to .org to use for LaTeX
  2015-05-04 16:20 ` Ken Mankoff
@ 2015-05-05 21:18   ` Paul Harper
  2015-05-06 10:28     ` Rasmus
  0 siblings, 1 reply; 7+ messages in thread
From: Paul Harper @ 2015-05-05 21:18 UTC (permalink / raw)
  To: Ken Mankoff; +Cc: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 1914 bytes --]

Thanks for those replies. I basically followed Ken's suggestion. I started
with the Kings College London dissertation template and used writer2latex
to create a .tex file. Then I gradually built the the Org-File.

 I have ended up with something I can use to write using org-mode with a
nice Solarized-Dark theme instead of frying my eyeballs in LibreOffice. The
key things are the Table of Contents are in the correct place and I have
bibtex working the way I want.

The other thing is in the end I have to convert from the .tex file to a
.docx file using pandoc. So I'll have to do some minor edits in LibreOffice
anyway because it is not saving certain formating features like double
spacing. But that will be a two minute final editing job.

So now I just have to write 500 words a day for the next 30 days and I'll
have a first draft! ;)

Regards,

Paul

On 4 May 2015 at 23:20, Ken Mankoff <mankoff@gmail.com> wrote:

> Hi Paul,
>
> For this type of one-off project (a thesis), I'd suggest you a) remove all
> Org-generated LaTeX header, b) create your own LaTeX preamble that you
> \include{preamble} in your Org file, and then all of your questions become
> LaTeX questions, not Org questions.
>
> Those LaTeX questions are likely easily googlable (or bingable) and found
> on TeX.SE. At the top of your Org document you can embed all the LaTeX code
> you want to generate the custom title and signature pages required by your
> institution.
>
> Just my 2c.
>
> On 2015-05-04 at 11:58, Paul Harper <harper.paul.j@gmail.com> wrote:
> > I need some items to appear on a page of their own. (ie. Ethical
> Approval,
> > Abstract, Declaration, Table of Contents.) How do I do that?
>
> \clearpage command in LaTeX.
>
>   -k.
>



-- 
Regards,


Paul

about.me/pauljamesharper

GnuPG ID:0x058884CC

Women and cats will do as they please, and men and dogs should relax and
get used to the idea."

Robert Heinlein

[-- Attachment #2: Type: text/html, Size: 2897 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Converting a Dissertation Template from docx to .org to use for LaTeX
  2015-05-05 21:18   ` Paul Harper
@ 2015-05-06 10:28     ` Rasmus
  2015-05-06 13:07       ` Ken Mankoff
  2015-05-08 19:05       ` Eduardo Mercovich
  0 siblings, 2 replies; 7+ messages in thread
From: Rasmus @ 2015-05-06 10:28 UTC (permalink / raw)
  To: emacs-orgmode

Paul Harper <harper.paul.j@gmail.com> writes:

> he other thing is in the end I have to convert from the .tex file to a
> .docx file using pandoc

Org exports to odt via ox-odt.  You can presumably export directly to docx
using org-odt-convert-processes.

—Rasmus

-- 
Together we will make the possible totalllly impossible!

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Converting a Dissertation Template from docx to .org to use for LaTeX
  2015-05-06 10:28     ` Rasmus
@ 2015-05-06 13:07       ` Ken Mankoff
  2015-05-08 19:05       ` Eduardo Mercovich
  1 sibling, 0 replies; 7+ messages in thread
From: Ken Mankoff @ 2015-05-06 13:07 UTC (permalink / raw)
  To: Rasmus; +Cc: emacs-orgmode


On 2015-05-06 at 06:28, Rasmus <rasmus@gmx.us> wrote:
> Paul Harper <harper.paul.j@gmail.com> writes:
>
>> he other thing is in the end I have to convert from the .tex file to a
>> .docx file using pandoc
>
> Org exports to odt via ox-odt.  You can presumably export directly to docx
> using org-odt-convert-processes.

Although I recommend exporting to TeX and then using Pandoc to generate the DOCX file. It seems (to me) to work better and have better support for bibliography:

pandoc -f latex -t docx -o foo.docx --bibliography foo.bib foo.tex

  -k.
  

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Converting a Dissertation Template from docx to .org to use for LaTeX
  2015-05-06 10:28     ` Rasmus
  2015-05-06 13:07       ` Ken Mankoff
@ 2015-05-08 19:05       ` Eduardo Mercovich
  1 sibling, 0 replies; 7+ messages in thread
From: Eduardo Mercovich @ 2015-05-08 19:05 UTC (permalink / raw)
  To: Rasmus; +Cc: emacs-orgmode

>> he other thing is in the end I have to convert from the .tex 
>> file to a .docx file using pandoc

> Org exports to odt via ox-odt.  You can presumably export 
> directly to docx using org-odt-convert-processes.

And you can specify another existent odt document to use as a 
template. :)

Hope it helps. 

Best...

-- 
e

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2015-05-08 19:06 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-05-04 15:58 Converting a Dissertation Template from docx to .org to use for LaTeX Paul Harper
2015-05-04 16:17 ` Rasmus
2015-05-04 16:20 ` Ken Mankoff
2015-05-05 21:18   ` Paul Harper
2015-05-06 10:28     ` Rasmus
2015-05-06 13:07       ` Ken Mankoff
2015-05-08 19:05       ` Eduardo Mercovich

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).