emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: "Juan Manuel Macías" <maciaschain@posteo.net>
To: "Dr. Arne Babenhauserheide" <arne_bab@web.de>
Cc: emacs-orgmode@gnu.org
Subject: Re: An academic journal entirely made in Org-Mode
Date: Wed, 31 Jan 2024 14:30:23 +0000	[thread overview]
Message-ID: <874jetlgn4.fsf@posteo.net> (raw)
In-Reply-To: <87a5onlo9l.fsf@web.de> (Arne Babenhauserheide's message of "Tue,  30 Jan 2024 00:16:29 +0100")

Hi, Arne, thank you for your comments.

Dr. Arne Babenhauserheide writes:

> Hi,
>
> Juan Manuel Macías <maciaschain@posteo.net> writes:
>
>> Org-Publish and LuaTeX. If anyone is interested in the code I used for
>> specific aspects of the publication, I can share it here :-).
>
> That sounds very interesting! I’m writing roleplaying books and my
> website with org-mode and since there are many small pieces I found over
> the years, I expect that the solved problems for a journal will be very
> educational!

I am currently responsible for the production of five academic journals,
and I have ended up developing a fairly productive workflow using
org/luatex. A little background on the matter: in my editorial design
work I used to work only in (La)TeX, but I discovered that org can
function as a fairly competent high-level interface to LaTeX. One of the
main advantages is the clarity that a light markup language brings to
the content, since pure LaTeX code is cumbersome. I know LaTeX code
reasonably well (in fact, I'm working on a couple of packages for
LuaLaTeX), but it's not comfortable for me to work on content.
Naturally, for heavy and complex jobs, post-processing is always
necessary. Org is still very useful as it is not only a lightweight
markup language but also a set of tools. And, loosely speaking, a work
environment on Emacs (which in itself is a work environment).

The main challenge of this workflow is obtaining the content, the data,
from the Word documents that the authors deliver, since, unfortunately,
everyone uses Word. Pandoc does a good job, as long as the Word
documents arrive reasonably well structured. Unfortunately, this is not
the case, at least in Humanities. Word documents usually have the
following defects:

- abuse of direct format; 

- absence of applied styles, therefore it is impossible to obtain a
  hierarchical outline of the document;

- absence of an automated system of bibliographies and citations.
  Humanities authors don't even use "friendly" things like Zotero. That
  is, Humanities authors make citations and bibliographies by hand (!!),
  which means multiplying inconsistencies and typos.

Therefore, it is necessary to subject the original Word documents to a
cleaning process. Then I run pandoc using some templates and some custom
lua filters.

The journal is basically an org-publish project, where only the articles
and other parts are exported to *.tex files. There is a master document
that I export and compile using a function that runs latexmk in
interactive mode. This way I have more control over the parts, I can
deactivate nodes, etc. Each node, therefore, is an article, with a
series of properties: author, email, orcid-id, doi, title in English,
etc. In a sty document created ad hoc I have defined a series of LaTeX
variables, and then incorporated them into each heading. E.g.:

#+begin_src latex
  \def\@author{}
  \newcommand\author[1]{\def\@author{#1}}
  \def\@mail{}
  \newcommand\mail[1]{\def\@mail{#1}}
  \def\@doi{}
  \newcommand\doi[1]{\def\@doi{DOI: #1}}

etc...
#+end_src

I use org-capture to populate the nodes in the master document with all
that information.

>> https://recyt.fecyt.es/index.php/rel/issue/view/4327/948
>
> One small thing: the boxes for the abstract look pretty nice! How to
> create the complex tables on page 109ff would also be great to know.

The boxes are made with the mdframed package, which is very versatile for this type of
objets. The code used:

#+begin_src latex
\usepackage[framemethod=tikz,everyline=true]{mdframed}
#+end_src

A box style:

#+begin_src latex
  \colorlet{background}{gray!7}

  \mdfdefinestyle{mdabstracts}{%
    linewidth=.3pt,
    topline = true,
    leftline =true,
    rightline = true,
    bottomline = true,
    skipabove=0pt,
    skipbelow=2\bigskipamount, 
    leftmargin=0em,
    backgroundcolor=background,
    roundcorner = 5pt,
    innerleftmargin=1.5em,
    rightmargin=0em,
    innerrightmargin=1.5em,
    innertopmargin=1em,
    splittopskip=\topskip,
    innerbottommargin=1em,
  }
#+end_src

And an environment:

#+begin_src latex
  \newmdenv[style=mdabstracts]{abstracts}
#+end_src

As for tables, I always try to apply the ideas of Edward Tufte. I use the booktabs package
with some modifications. An example of a table:

https://i.imgur.com/70NtdGb.png

Here I use these two macros:

#+macro: cmd @@latex:\cmidrule(rl){$1}@@
#+macro: mc @@latex:\multicolumn{$1}{$2}{$3}@@

And this filter for multicolumn rows (simply, the cells that contain "!!" are removed:

#+BIND: org-export-filter-table-functions (my-multicolumn-filter)
#+begin_src emacs-lisp :exports results :results none
  (defun my-multicolumn-flilter (texto backend info)
    (when (org-export-derived-backend-p backend 'latex)
      (replace-regexp-in-string "&\s+!!" "" texto)))
#+end_src

Best regards,

Juan Manuel 


  reply	other threads:[~2024-01-31 14:31 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-29 20:03 An academic journal entirely made in Org-Mode Juan Manuel Macías
2024-01-29 20:16 ` Daniel Ortmann
2024-01-29 23:16 ` Dr. Arne Babenhauserheide
2024-01-31 14:30   ` Juan Manuel Macías [this message]
2024-01-30  5:34 ` tomas

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=874jetlgn4.fsf@posteo.net \
    --to=maciaschain@posteo.net \
    --cc=arne_bab@web.de \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).