From: Martin Steffen <msteffen@ifi.uio.no>
To: Ypo <ypuntot@gmail.com>
Cc: emacs-orgmode@gnu.org
Subject: Re: First steps exporting to tex
Date: Sat, 03 Apr 2021 12:15:26 +0200 [thread overview]
Message-ID: <86im538yip.fsf@login.ifi.uio.no> (raw)
In-Reply-To: <d9457845-3010-f1f1-b8c9-7ee4edc95842@gmail.com> (Ypo's message of "Sat, 3 Apr 2021 11:31:27 +0200")
>>>>> "Ypo" == Ypo <ypuntot@gmail.com> writes:
Ypo> Good morning
Ypo> After reading your interesting advices, I've decided to start
Ypo> my path through LaTeX. I have been some hours trying to start,
Ypo> with little result, but I hope that once established a
Ypo> *workflow* the results will come and the new invested time will
Ypo> be directed just to get better and better results.
Ypo> My doubts:
Ypo> a. As first step for my workflow, it seems convenient to use a
Ypo> "template" with the LaTeX preambles. So maybe the many existing
Ypo> LaTeX templates can be used quickly with orgmode. I found
Ypo> several options and opinions. Which one is the best way?
I say my advice as a "LaTeX-first" person (i.e., I was familiar with
LaTeX before org was around. When I discovered org, which I found
useful in many ways, so I tried to familiarize myself also to find out
how I could make it useful in tandem with latex.
So, for me, stuff that works well in LaTeX, I did not port for myself to
org, things where org helps me to make better use of latex, I tried to
figure out.
For you, being familiar with org, but not (yet) with latex, you may
follow different patterns.
For the "preamble" of a latex document, the general setup that comes
_before_ \begin{document} and before any output is generated, I use
native latex using instructions like
#+latex_header: \input{switches}
#+latex_header: \input{preamble}
#+latex_header: \input{style/style-common}
#+latex_header: \input{macros}
I often separate the preamble from macros. preamble.tex is (for me) the
file which contains loading of packages and classes (usepackage etc,
and corresponding adapations or settings for that package). macros.tex is
things I define using \newcommand (or \def or \newenvironment or
similar)
As far controlling input is concerned, I also rely on latex-specific
setting (outside org, also outside emacs), things like environment
settings like $TEXINPUT, a path-specification, where one can control
where LaTeX finds (additional) stylefiles, outside of the standard
``load-path''.
Thus, I often try to avoid to use hardcoded things, like
>>> \input{~//export//template.tex}
I would use \input{template} (".tex" is not needed) and I make sure, the
templatex.tex file is included in the $TEXINPUTS-path. Typically, the
current directory "./" should be included by default (and stuff from
the latex-installation is also routinely found)
BTW: also when working with pics (with includegraphs), there is a
variable (inside latex) that controls where to find figures. So, what I
typically would to is things like
\usepackage{graphicx}
\graphicspath{{./figures/}}
That specifies that the pics for \includegrapic are found in a direcory
figures, and then I would use
\includegraphics[width=4cm]{jpgfigure}
not jpgfigure.jpg; \includegraphics can figure it out, if it's a PDF or
a jpg; it would also chose ps, if you don't use pdflatex, but latex (I
still prefer the xdvi-viewer as faster and more fluent to navigate, I
never like any PDF viewer when doing latex, only at the end, I generate
the PDF).
One can of course ``inline'' all that inside org (like doing a
\newcommand inside ``org'', it's just I prefer to keep all the stuff in
one (or more) latex files; for those parts I rely on latex (since org
does not bring much additional value to the table for the premable
stuff, at least for me)
Martin
Ypo> 1 #+SETUPFILE: template.setup -> doesn't seem the ideal way,
Ypo> because the template.setup file must be modified adding
Ypo> #+latex_class to each of the lines. 2 template.tex -> this
Ypo> could be added to the SETUPFILE: #+LATEX_HEADER:
Ypo> \input{template.tex}. But it seems to have no effect on the PDF
Ypo> output. BTW, I can't use emacs HOME path (~/) in the input
Ypo> header, like \input{~//export//template.tex}. This is my
Ypo> template.tex file content: \usepackage{fancyhdr}
Ypo> \thispagestyle{fancy}
Ypo> \lhead{\includegraphics[width=4cm]{jpg.jpg}} \rhead{Student
Ypo> Name: Name\\ Student ID: 1234\\ Course: IDB 601 (Fall 2020)} 3
Ypo> Another friend told me that .sty templates were the best way.
Ypo> 4 I see some people that create customized LaTeX classes and
Ypo> add the desired class to the orgmode buffer. 5 Also we can see
Ypo> this intricate transformation of a LaTeX template into
Ypo> orgmode. How to Migrate LaTeX Template into org-mode 6 ...
Ypo> b. I think that in a good integration, every character shown
Ypo> on orgmode should be exported into the PDF output. For example
Ypo> "CENTRE LINE SYMBOL": ℄ How can this integration be done?
Ypo> I have more doubts, but I will keep reading and trying to
Ypo> solve them
Ypo> Best regards
next prev parent reply other threads:[~2021-04-03 10:16 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-04-03 9:31 First steps exporting to tex Ypo
2021-04-03 10:15 ` Martin Steffen [this message]
2021-04-04 11:04 ` Ypo
2021-04-04 11:36 ` Juan Manuel Macías
2021-04-05 5:05 ` Tim Cross
2021-04-03 10:43 ` Dr. Arne Babenhauserheide
2021-04-03 12:10 ` Juan Manuel Macías
2021-04-03 13:31 ` Tim Cross
2021-04-03 16:55 ` Diego Zamboni
2021-04-03 17:07 ` William Denton
2021-04-03 17:49 ` Juan Manuel Macías
2021-04-03 18:36 ` Jean Louis
2021-04-03 20:46 ` Juan Manuel Macías
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=86im538yip.fsf@login.ifi.uio.no \
--to=msteffen@ifi.uio.no \
--cc=emacs-orgmode@gnu.org \
--cc=ypuntot@gmail.com \
/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).