Re: Efficiently Using LaTeX
I don't think I can help with the equation problem I'm afraid. Have you read the not short guide to latex?
To get kile to complete those greek letters, go to Settings > Configure Kile > Kile > Complete > Tex/Latex (tab) > Add (button)
select the file latex-mathsymbols.cwl
I use this kind of thing to sort out my page margins:
Code:
% Page geometry
\setlength{\textwidth}{14.5cm}
\setlength{\textheight}{23cm}
\setlength{\topmargin}{-0.5cm}
\setlength{\oddsidemargin}{1.25cm}
\textfloatsep=0.5cm
Re: Efficiently Using LaTeX
Thanks for the help. I did read the first 3 chapters as well as the section in Chapter 6 on page layout. The problem with 'displaymath' is that it seems to resist line breaks. Your idea works for the layout, but I actually found a really good solution on the web before I saw your post.
Code:
\usepackage{fullpage}
More detailed information (as well as the trick I just showed) can be found here
http://web.mit.edu/answers/latex/formatting/latex_margins.html
Adding in completion for the math symbols is another step forward. I still would like if there's a way to do keyboard shortcuts to paste custom phrases such as "\begin{equation*}\end{equation*}" or "\frac{\partial y}{\partial x}".
Re: Efficiently Using LaTeX
Well it's not entirely convenient, but you can use abbreviations for those things if you want.
Make a file at /usr/share/apps/kile/complete/abbreviation/myAbbrevs.cwl with
Code:
# My abbreviations file
# 8.1.2007
estar=\begin{equation*}\end{equation*}
pderiv=\frac{\partial y}{\partial x}
Then go to the abbreviations tab in the same settings page as before, and add that file. Then in your latex document, you begin typing estar and type ctrl+alt+spacebar, and it offers the expanded abbreviation. Alternatively, you could add
Code:
\begin{equation*}
\frac{\partial y}{\partial x}
to /usr/share/apps/kile/complete/tex/latex-document.cwl and tick the box at
Settings > Latex > Environments > Automatically complete environments
Restart Kile, and begin{equation*} will be a completion option, and the end{equation*} will be automatically inserted.
Re: Efficiently Using LaTeX
Quote:
Originally Posted by
commike37
First, does someone know how to do a line break in 'displaymath'?
use to break line inside... or use like below...
otherway
enclose the expression within $ signs after including amsmath package
Code:
\include{amsmath}
$ a^2 + 2*a*b + b^2 $. \\
Quote:
Also, I would like to create some keyboard shortcuts for things I frequently type: Greek characters such as \lambda, the integral symbol \int, the curly d in a partial derivative \partial, etc. If I had a library of these shortcuts, over time I could memorize them and type everything up much faster.
not exaclty and answer. keyboard shortcuts ==> editor stuff. but in the source code if you want to use a command instead of some long-words used repeatedly..for example.."i like ubuntu"
use \newcommand command
eg:
Code:
\newcommand{\ilu}{I like ubuntu}
:mrgreen:
then use the shortcut command inside the source code...
Quote:
Also, this is kind of unrelated, but does someone know how to widen the margins? Page layout is very complicated, and every try to get 1" margins all around has failed. I try to keep the margins small so I can use paper efficiently.
include a new package called geometry.
Code:
\usepackage[left=1in,right=1in,top=1in,bottom=1in]{geometry}
hope this helps...
search for lshort.pdf in google and download that very helpful latex guide...its oxygen!
Re: Efficiently Using LaTeX
New commands and abbreviations both sound like good ideas. I'll try them both.
However, \\ doesn't work in math mode. Math mode will ignore most spaces and line breaks (I've also tried \newline and \linebreak). The problem with $...$ is that math formulae in text mode are typeset differently. The sample page I made in LaTeX has one formula in both math mode and text mode, and the one in math mode is considerably better.
I'm pretty sure I have all the margin issues taken care of. I thought that none of this was working at first, but then I realized I had to run 'texconfig' from the terminal and set the default paper to letter. Apparently, TeTeX would create an A4 page even if I had letterpaper specified in the document class. That was what was making the commands not work as I had hoped.
Re: Efficiently Using LaTeX
Have a look at \begin{eqnarray}. This allows line breaks (with \\) and also allows centering with respect to e.g. an equal sign. There is a way to have only the last line numbered. I don't know if there is an equivalent displaymath command (matharray???). Example:
Code:
\begin{eqnarray}\label{eq:superH}
H & = & \sum_{i}\frac{\mn{p}_i^{\phantom{i}2}}{2m_e} + \sum_{I}\frac{\mn{P}_I^{\phantom{i}2}}{2M_I} - \frac{1}{4\pi\epsilon _0} \sum_{i,J}\frac{z_Je^2}{|r_i-R_J|} + \nonumber\\
& + & \frac{1}{2} \frac{1}{4\pi\epsilon _0} \sum_{i\neq j}\frac{e^2}{|r_i-r_j|} + \frac{1}{2}\frac{1}{4\pi\epsilon _0} \sum_{I\neq J}\frac{z_Iz_Je^2}{|R_I-R_J|}\quad .
\end{eqnarray}
Try it to see if you like it. Please note that I might have used an abbreviation here (taken from my halfway PhD work, with quite some abbreviations).
Re: Efficiently Using LaTeX
Quote:
Originally Posted by
Miguel
Have a look at \begin{eqnarray}. This allows line breaks (with \\) and also allows centering with respect to e.g. an equal sign. There is a way to have only the
<snip>
try to avoid eqnarray/* environment when you can. try align instead. this page explains why: http://dw.tug.org/pracjourn/2006-4/madsen/madsen.pdf
hth
Re: Efficiently Using LaTeX
If you want to be a lazy slob like me use lyx instead of raw latex. I wrote my doctoral thesis with latex (mathematical physics) and it was hard going. Since then I forgot all the latex because I was using Scientific Word. When I started on linux again I found lyx a great way to spin up again on latex and a great memory saver. You can export to latex once you are done with lyx and then fine tune this using latex style files etc.
Re: Efficiently Using LaTeX
Quote:
Originally Posted by
commike37
First, does someone know how to do a line break in 'displaymath'? I couldn't figure it out, so I just put the equations in an 'equation*' and start a new 'equation*' when I want a new line. I did try an 'eqnarray*', but the formatting it gave me was very odd (I often put several steps of the same solution on one line).
Have a look at this document: http://www.ctan.org/tex-archive/macr...th/amsldoc.pdf. I'm a fan of environments align and align*, which make it easy to typeset a sequence of equations or inequalities with each step on a different line. If you don't care about alignment, there are gather and gather*.