emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Tim Cross <theophilusx@gmail.com>
To: emacs-orgmode@gnu.org
Subject: Re: basic org questions
Date: Wed, 16 Sep 2020 10:04:53 +1000	[thread overview]
Message-ID: <87a6xq37tm.fsf@gmail.com> (raw)
In-Reply-To: <87o8m7t5xa.fsf@ebih.ebihd>


Emanuel Berg via General discussions about Org-mode. <emacs-orgmode@gnu.org> writes:

> 1) How do I make a region italic?
>
> This does not fontify and does not show up as
> italic type:
>
> /En gång i tiden var även Spanien täckt av skog.
> En gammal berättelse menar att man i norra Spanien
> kunde hoppa upp på en apas rygg och ta sig ner till
> södra Spanien utan att klättra av en enda gång. Apan,
> underförstått, kunde hoppa från gren till gren genom
> hela halvön. Flyger man över Spanien idag ser man att
> det har gått åt ett och annat träd sen dess./
>
> /This/ works tho.
>
> 2) How do I have tables not appear centered
> by default, but left-aligned?
>
> 3) How do I have a new paragraph, as indicated by
>
> p1
>
> p2
>
> appear w/o indentation, but with a blank line between
> p1 and p2 (yes, exactly as stated, really).
>

It is important to understand the org mode architecture in order to
understand how/where to try and change/fix things to get specific
results. It is also very important to be clear about this architecture
when asking questions so that you can include the most relevant
information. 

Org has a multi-layered architecture. At the top is the org buffer where
you put your org text. This text supports markup and other text with
special  meaning which the Emacs editor will display in specific ways
using colours, fonts, overlays etc.

When you export an org file, the contents of the org file is
extracted and markup, options, 'special' text etc is mapped to the
equivalent 'concept' in the back end format. Sometimes, this translation
might involve multiple steps (e.g. for PDF the org text is translated
into Latex, which is then translated into pdf). Understanding this is
critical as all back ends are not the same and sometimes, the changes
you need to make need to be performed at the back end rather than within
the org file itself. For example, sometimes, a quick and easy change can
be achieved by manually editing the *.tex file generated when doing a
PDF export and other times, it may be necessary to define a whole new
document class in order to achieve the result you want (for example, I
defined a new entry for org-latex-classes called 'work' which added
additional Latex classes and macro definitions needed to support the
format documents had to have for my employer).  

All this means that you need to be explicit when asking a question
whether what you want is for the org buffer/file, the exported file and
what the exported format is.

As with many questions involving technology, you are often better off
explaining what your specific outcome is rather than on how to do
something as the latter is often asking how to do something to implement
what you think is the right solution when in fact a completely different
solution might be easier.

As an example, with your question about how to make a paragraph italic.
Do you want the text to appear italic in the org buffer or do you want
the PDF text which results from the export to be italic? Is it actually
critical that it is italic or do you just want to make sure that text is
rendered in such a way as to make it emphasised or stand out in the
final exported output?

If it is the latter, I would actually take a completely different
approach. Rather than trying to mark the whole paragraph as italic, I
would create a quoted block using #+begin_quote/#+end_quote. Each back
end will interpret this quoted block in its own way and render it
accordingly.

Another approach would be to use embedded latex in your document and
render the paragraph as a latex block using

\begin{em}
\end{em}

or

\begin{it}
\end{it}

The disadvantage of this approach is that your being very back end
specific in your org-file, so exporting to other formats may not work
well.

With respect to your question regarding table placement in your PDF,
have a look at the manual section on exporting and in particular, Latex
export options. There are a number of options you can add to your table
definition which will affect how the table is rendered or where it is
placed within the document. Note that Latex is a VERY powerful document
formatting system and it is VERY opinionated. Unlike MS Word and other
word processing systems, with Latex derived formatting, your almost
always better off leaving Latex to decide how to do things. With Latex,
you select a document style and run with that. Tables are notoriously
complex to get right and while you can achieve what you want, you will
likely need to read up on Latex and how it processes tables and you may
need to add or tweak the latex packages included by Org when it
generates the output in order to get the precise result you are after.
In your current case, you will likely be able to achieve your desired
result just using the ':float' or ':placement' commands (see the org
manual section on latex export).

With respect to your final question on paragraph indent for first line -
this is the default style for Latex documents. Different Latex document
styles have different paragraph styles, some of which do not indent the
first line. You can change the document style by adding a new latex
class. For example, many people prefer the Korma Article class for
documents over the default Latex Article class. You can change the class
in a number of ways including by adding a #+latex_class: header to the
org file. e.g.

#+latex_class: korma-article

Another alternative is to add an additional latex header argument. For
example, this may work to disable paragraph indentation

#+latex_header:  \setlength{\parindent}{0pt}

You can also prevent indentation of a specific paragraph by using the
latext

\noindent

command.

Note that the above is specific to exports based on Latex (such as PDF
export) and will not have effect on other export types.

If you really must heavily customise the PDF format, you have the power.
However, you will likely need to read up on Latex and the latex to pdf
process to understand how that works and then go back to the org manual
to work out the best ways to customise org to use the setting you want.
The key to success IMO is to be conservative here. Lots of research into
typography, text formatting etc has gone into the TeX/LaTeX system and
your generally best off going with their style decisions. Look for
alternative high-level document styles (such as the Korma, HiTech and
other styles) rather than try hacking existing styles as it will be
easier and give better results in the long term.

HTH

Tim

-- 
Tim Cross


  parent reply	other threads:[~2020-09-16  0:06 UTC|newest]

Thread overview: 53+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-15 15:29 basic org questions Emanuel Berg via General discussions about Org-mode.
2020-09-15 15:44 ` Russell Adams
2020-09-15 19:38   ` Emanuel Berg via General discussions about Org-mode.
2020-09-17 14:27     ` Alexander Adolf
2020-09-17 14:47       ` Emanuel Berg via General discussions about Org-mode.
2020-09-15 15:49 ` tomas
2020-09-15 19:50   ` Emanuel Berg via General discussions about Org-mode.
2020-09-15 17:08 ` Matt Huszagh
2020-09-15 19:52   ` Emanuel Berg via General discussions about Org-mode.
2020-09-15 20:49     ` Matt Huszagh
2020-09-15 21:01       ` Emanuel Berg via General discussions about Org-mode.
2020-09-15 21:10         ` Samuel Wales
2020-09-15 21:44         ` Matt Huszagh
2020-09-15 22:32           ` Emanuel Berg
2020-09-15 22:37             ` Matt Huszagh
2020-09-16  1:56               ` Emanuel Berg via General discussions about Org-mode.
2020-09-16  6:15                 ` Stefan Nobis
2020-09-17  0:51                   ` Emanuel Berg via General discussions about Org-mode.
2020-09-17  9:55                     ` Stefan Nobis
2020-09-17 13:42                       ` Emanuel Berg via General discussions about Org-mode.
2020-09-16  7:44             ` Thomas S. Dye
2020-09-17  0:57               ` Emanuel Berg via General discussions about Org-mode.
2020-09-17  1:14                 ` Thomas S. Dye
2020-09-17  9:59               ` Stefan Nobis
2020-09-17 13:43                 ` Emanuel Berg via General discussions about Org-mode.
2020-09-17  4:39         ` Nick Dokos
2020-09-17  5:08           ` Emanuel Berg via General discussions about Org-mode.
2020-09-15 19:23 ` Aleksandar Dimitrov
2020-09-16  0:04 ` Tim Cross [this message]
2020-09-16  1:58   ` Emanuel Berg via General discussions about Org-mode.
2020-09-16  3:46     ` TEC
2020-09-16  4:11       ` Emanuel Berg
2020-09-16  4:51         ` TEC
2020-09-17  0:46           ` Emanuel Berg via General discussions about Org-mode.
2020-09-16  6:56         ` tomas
2020-09-16  4:13       ` Emanuel Berg
2020-09-16 13:48         ` Eric S Fraga
2020-09-16 16:32           ` Stefan Nobis
2020-09-16 22:51             ` Emanuel Berg via General discussions about Org-mode.
2020-09-16 22:53             ` Emanuel Berg via General discussions about Org-mode.
2020-09-17  9:48               ` Stefan Nobis
2020-09-17 13:37                 ` Emanuel Berg via General discussions about Org-mode.
2020-09-16  4:31     ` Tim Cross
2020-09-16  6:21       ` TEC
2020-09-16 22:11       ` Emanuel Berg via General discussions about Org-mode.
2020-09-16 22:28         ` Tim Cross
2020-09-16 22:31           ` Emanuel Berg via General discussions about Org-mode.
2020-09-16  6:54     ` tomas
2020-09-17  0:52       ` Emanuel Berg via General discussions about Org-mode.
2020-09-16  7:37     ` Stefan Nobis
2020-09-16 23:08       ` Samuel Wales
2020-09-17  0:16         ` Emanuel Berg via General discussions about Org-mode.
2020-09-17  9:25         ` Stefan Nobis

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=87a6xq37tm.fsf@gmail.com \
    --to=theophilusx@gmail.com \
    --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).