Ypo <ypun...@gmail.com> writes:

> Hi
>
> After some years of using orgmode, and exporting using its defaults, I would 
> like to take a quality leap and find a way of exporting for life. My options:
> LaTeX, ODT, HTML.
>

Forget your goal. Technology and user expectations moves too fast and you will 
never find a
solution 'for life' in the sense you mean. More important is to learn
how to adapt and change. 

> LaTeX: I can see some masters here that make professional books, and I have 
> some friends that publish scientific papers using LaTeX. But, it looks like a
> like a rabbit hole to me, since even the masters seem to have to modify the 
> tex file directly (is this correct?), not being sufficient orgmode to 
> culminate
> the work by itself. And to learn LaTeX seems a lifelong activity (almost like 
> "learning" orgmode). BTW, when I export to LaTeX although it gets the job
> done, it sends a lot of error messages.
>

I've been using Latex since 1990 and it hasn't changed much. The two
biggest mistakes I see people make all the time with Latex are -

1. Trying to heavily customize document format using Latex and Tex
macros and low level Latex/Tex commands instead of using available
packages to modify the output in a consistent manner.

2. Breaking the 'word' habit of believing your a typsetting expert and
need to tweak margins, line spacing, headers, list indentation, etc etc.
Your not a typsetting expert (at least most of us are not) and your far
better off trusting those who write the packages.

Reality is, very few of us have the expertise to know what a well
formatted and typeset document actually looks like. It is actually a
complex skill with lots of subtleties and pitfalls. Problem is, we have
been swamped by poor document formatting due to programs like MS Word
and grown to accept the poor practices it exhibits.

Latex itself is actually very easy with only a few commands. It only
gets complex when you try to work at a very low level and even that
complexity is mainly because it looks unusual with what is considered
these days to be a weird syntax. In 30 years of use, I've hardly done
any Latex or Tex, rarely used Latex macros and have never had to write
more than a line or two of Latex or Tex code. With very few exceptions,
whenever I wanted something, it has almost certainly been done by
someone else and all I really need to do is add a package and configure
it. 

The trick with Latex is to go with the flow, not against it. When you do
find areas of the default document style you don't like, look for
packages to adjust the formatting rather than try to tweak it yourself.
For example, nearly everyone will want to adjust the page margins. don't
try to do this by using low level Latex commands to adjust line length,
paragraph width, line spacing etc. Instead, use a package like the
geometry package. If you want additional options for tables or modify
how tables look, try some of the many available table formatting
packages. If you simply don't like the default document style, then look
into the various other document style packages that are available. 

What you end up with is one or two sets of 'default' packages which
generate the documents formatted how you want. It may take some initial
research to find these, but once you have them, you will very rarely
need to do any tweaking.

Once you know which packages you want and have your 'sets', then you can
modify your org configuration to use those packages. for example, I have
latex 'classes' defined in my org config for work, technical documents,
letters, beamer presentations, general documentation and default. I
select which one I want by adding the #+LATEX_CLASS: option at the top
of the document. The 'work' group is a highly custom document which
includes logo and colour which make my documents conform to the document
style policy where I work, technical documents use the HiTech package,
general documents use the koma-script document format and default uses
the default Latex format. I rarely have to modify the *.tex files
generated in exports - like maybe once or twice in a year and I produce
quite a lot of documents. The hardest one to get working was the work
class, but that was because the policy was rather complex regarding
colours, logo size and position, margin, line spacing, font, hyperlink
colour/font etc. Once I got it working though, it has not required
modification until the policy is modified.

With respect to errors from Latex when crating your documents. A lot of
those are probably better classified as warnings rather than errors.
Latex will tell you when you have things like long words it cannot
hyphenate well and when it cannot determine when/where to break a line
to avoid an 'overfilled' element. Often these can be ignored. However,
sometimes, you may need to give Latex a 'hint' or helping hand by
slightly modifying your content (for example, a table with a column
which is too wide may need you to manually add line breaks or an
included image may need some size hints etc.  

> ODT: I take this one as a lower level solution than LaTeX, but it looks 
> easier to tame, and it even allows to use templates,  for example to make 
> reports in
> the workplace. Do you think it is worth focusing on ODT exporting? Could it 
> be a definitive solution to publish papers and books directly from orgmode?
> ODT exporting sends some error message to me, but at least I understand it.
>

I've never liked the ODT output. I find the documents I produce using
ODT to be 'uglier' than those with Latex. However, if I need to produce
the document in a format which allows others to edit it, ODT can be
useful. 

> HTML: I have seen some themes designed to export in LaTeX format using HTML. 
> Here we would have the "definitive tool": The power of LaTeX in the
> versatility that could give the use of different themes for different 
> purposes. But, do you think it could get, some day, the quality of a direct 
> LaTeX export?
> No errors by my side when exporting to HTML.
>

No, because they serve different purposes. Latex is superior in every
way when it comes to producing a PDF or a printed document. HTML is
superior when you want to display the content in a browser. HTML is
terrible when you want to print the output. 

I think it is a mistake to try and just focus on one export format. The
great benefit of org mode is that you can export in multiple formats
with minimal or no changes to the source. If you need to export in a
format which will allow others to edit the document, ODT is great, if
you need to export to publish on the web, HTML, if you need a PDF Latex,
if you need a presentation, either beamer or something like reveal. They
all have a role to play.

A better use of time is getting to know org and how it can be configured
so that you can setup your export environments with defaults which suit
your requirements. When I see people modifying *.tex files generated by
org, it is often because they have not worked out how to add the
additional packages or set the configuration for those packages in org. 



-- 
Tim Cross

Reply via email to