Log in

typesetting with TeX and LaTeX's Journal

Recent Entries

You are viewing the most recent 25 entries.

4th July 2009

scazon12:17pm: Section header troubles
So one of the big headaches with LaTeX, we all know, is making your running section headers work the way you want them too. Here's the scoop with mine:

I have a chapter of a book (not book class, but a custom class that loads book and passes to it) with an introduction (unnumbered, i.e. not its own \section) and three sections (i.e. each introduced by a \section command). Normally, the class I'm using will automatically spit out a header that looks like "3.2: Section name". I want to have "3.2: Arbitrary text: Section name" instead. So after every \section, I have \markright{\thesection. \ Arbitrary text: Section name}. This works like a charm for sections 1 and 3, which have the grace to start on a left-hand page, so that the next right-hand header is properly marked, e.g., "3.1: Arbitrary text: First section". But section 2, which starts at the top of a right-hand page (though it wouldn't matter if it started lower down the page), gives me the standard "3.2: Section name" despite the presence of the \markright command. On the next right-hand page, i.e. two pages after the start of section 2, the proper custom header shows up, but it stubbornly refuses to on the initial page of the section. Trying to get this section to start on a left-hand page, which would nicely work around this problem, is not an option here.

For reference: I'm using fancyhdr, with the following "default" header code in the class file:


What the hell?
Current Mood: confused

15th June 2009

ronaldraygun10:52am: gnuplot with LaTeX and TikZ/PGF
I am trying to get my copy of LaTeX (TeXLive 2008 and TeXnicCenter, Windows XP) to draw plots using gnuplot and TikZ but gnuplot's not behaving. I assume that LaTeX is calling correctly but gnuplot's not answering. When I try to run gnuplot from the Windows command line I get told that I don't have cyggd-2.dll installed; when I call it from cygwin I get no response. I can call gnuplot's man page, so I'm absolutely lost for ideas as to where it's broken.

Edit: not really a LaTeX problem. Solved anyway.

20th May 2009

allogenes3:08pm: Editor/IDE Choices for TeX
Ok, so based on what everyone said about my previous post regarding LyX, the consensus is that hand coding is best. I agree with that, as that is what I have been doing for years. Y'all confirmed my suspicions about LyX.

So here is a follow-up question: Does anyone know of a particularly well-designed cross-platform editor/IDE for LaTeX?

I have to work on both Windows and Linux systems. I love TeXnicCenter on Windows but I can't use it on Linux, and I'd like to be able to move back and forth between the two systems without having to learn two editors. (I guess on Linux I don't so much need the IDE, but it is still nice. And I say that as someone who generally prefers the command line in most ways.)

Any ideas? Thanks!

19th May 2009

allogenes4:18pm: LyX
Are there any users of LyX here? If so, how do you like it? I have recently installed it on my Windows and Linux machines, hoping to get something that works on both platforms, but I find its odd way of mutating what I type to be a little disconcerting. I also don't like the way it handles minipages, but that may be more me than it.

One thing I do like is that for short plain documents it allows me to bypass all the usual LaTeX overhead. (Well, it hides it at least.)

Anybody find it hard to use or problematic? Or did you get used to it pretty quick?

25th March 2009

forvrkate1:28pm: Typesetting Costs
I think that this may be the best forum to ask this question, even though it is not about any particular technical issue about LaTeX.

I am looking for information about the going rate for LaTeX typesetting. There is some graduate level mathematics text (approximately 300 pages) that the authors would like to have LaTeXed. It was originally written in the early '80s, so no digital copy is available. The text contains all of the things you would expect to appear: an index, definitions, theorems, proofs, homework exercises, some diagrams, and so forth.

Anyone know about the going rate? Is it by page or by hour? Is there usually a "per diagram" bonus?

23rd March 2009

dragoncrafter3:45pm: Question re: TeX output
What drivers do you usually use, what drivers can you use if you have to, and how annoyed would you be with a package that only worked with (say) pdf(La)TeX?

(A "driver" is something that displays a dvi file, converts a dvi file to some other kind of file, or is pdfTeX and just makes a pdf file instead of a dvi file in the first place.)

Here's why I'm asking: I'm writing a package. It does something sort of  like this.  This is vastly more convenient if I can use a virtual font to make all the vowels red, rather than having to say {\color{red}e} all the time. Unfortunately, virtual fonts aren't smart enough for me to just go "Replace e by {\color{red}e}"; I have to instead go "Replace e by (driver-specific red code) e".

So I've got a way to do what I want, but I have to do something different for pdfTeX and dvips, and possibly more different things for other TeX drivers. (I've found the list of all the drivers the color package supports. There are twenty of them. I don't really want to have to write twenty different versions of each virtual font.) I want to figure out how many different drivers I need to deal with. Which ones would you want me to support?

12th March 2009

katealaurel11:24am: Quick fontspec question
I'm using fontspec to handle font selection and the use of unicode fonts (so that I can easily enter polytonic Greek) in LaTeX, and have finally gotten around to changing the default typeface from good old Computer Modern into something more interesting.

When I remove the [cm-default] option from \usepackage{fontspec}, LaTeX's native means of accessing certain characters (like `` for left-hand curlyquotes, for example, or -- for –) vanishes, which I was expecting. However, adding in \usepackage{xunicode} doesn't restore these capabilities, which the documentation more-or-less led me to believe would occur.

Does anyone know how (or whether it's possible) to bring back the usual LaTeX means of producing those unicode characters? I suppose I can always find-and-replace everything, but it'd be really nice to go on as I generally have with the `` and the -- and so forth.


ETA: \defaultfontfeatures{Mapping=tex-text}. Thanks, pixelherder.

18th February 2009

pgadey2:53pm: Strikethrough?
Hello, I've got a Beamer question.

I'd like to have a change of slides in my presentation so that I can display:

On slide one:
We would like a result in the opposite direction that: \\ \pause
``If $k$ divides $|G|$ then there exists $H \leq G$ with $|H| = k$.''

On slide two:
We would like a result in the opposite direction that: \\ \pause
`` \textst{ If $k$ divides $|G|$ then there exists $H \leq G$ with $|H| = k$.}''

And on slide three:
We would like a result in the opposite direction that: \\ \pause
`` \textst{ If $k$ divides $|G|$ then there exists $H \leq G$ with $|H| = k$.}''
The theorem above is false since...

How would I go about doing this?

8th February 2009

fixious3:11pm: confused
Why does \mathcal{C_1} (or \cal{C_1}) produce the same symbol as \mathcal{C_{\infty}}? Help!

7th February 2009

forvrkate11:36am: LaTeX Quote Environment
I'm in the process of working on a math paper to submit to some journal. The journal has its own style class. This class doesn't seem to allow for the quote environment. The quote environment generally works like HTML's "Blockquote" whereby
the stuff you want to quote is nicely indented in some reasonable fashion, even if it contains many lines of babble, babble, babble, babble, babble, babble, babble, babble, babble, babble, babble, babble.
In any case, I am trying to force a quote environment by defining one myself. I have tried "\newtheorem*{quote}{}" but this doesn't behave well.

Do you have any other suggestions? Is there some package that will force the quote environment to exist? Thanks!

Edit: It seems that using
\item[] Quote stuff here
more or less accomplishes what I'm looking for.

2nd February 2009

tsukikoushi4:35am: Hello! Obligatory introductory post: I started poking LaTeX about a week ago, intending to use it to typeset my regular novel-type books for printing by Lulu, a print-on-demand joint. I'm sure a reasonably bright chimp could outperform me in LaTeX, but I'm still pleased with my progress.

That being said, the 'book' document class is making me want to tear my hair out. For some reason--I think because I've cobbled together multiple pages in my title.tex document--LaTeX has been putting the margins on my body pages backwards. The first page of the book, which will be printed on a right-hand page, has the wider margin on the right side instead of the left, which would force the beginning of every line directly into the binding! The layout proceeds normally from there: the second page has the wider margin on the left, as if that page were going to be printed on the right-hand side instead of the left-hand side.

I'm almost sure that the problem has to do with those multiple pages in the title.tex, which doesn't surprise me. It was a kludgy solution to begin with, but it was also the first solution I found that worked at all. I need a title page, a copyright page, a dedication-and-acknowledgements page, and then a blank page before the chapters actually start, and I was having trouble making LaTeX understand my chimpy grunts.

I've mucked about with the 'memoir' class a little, too, but without much success. I'll get it eventually!

24th January 2009

pgadey8:03pm: Oddness in nth roots?
I was wondering if anyone has had weird formatting issues with nth roots?
 $\mathbb{Q} (\sqrt[10]{2})$ over $\mathbb{Q}$.

Has an odd space between the Q and radical sign, even more prominent then when what's usually there when using \sqrt{}. It's easily fixed, with
\item $\mathbb{Q} (\!\! \sqrt[10]{2})$ over $\mathbb{Q}$.

But I was wondering if anyone knew of a more general solution, an alternative package or such.

8th January 2009

oonh5:51am: tough question
So I've been trying to use non-english characters as function names, and tonight tried playing around with cjklatex (XeTeX is not an option for me, has to be pdflatex)

I want something (in math mode) like this (to work correctly)

(z)= (some definition)

I'm using bg5pdflatex. Anyone have any ideas?

6th January 2009

feanelwa8:07pm: Does anybody know of a webpage that has pictures of how different styles look on the page, so you can compare how they look and decide which one to use? I could produce the same document according to all the styles I have and open them all at once, but when I look in the mirror I do not see somebody who has time.

Another question: is there some way to get rid of the title page in a document of the report class? My supervisor does not need to print an extra piece of paper with one word on it and take it all the way across the world in order to read my draft document.

5th January 2009

nebulawindphone11:13am: aligning multi-line equations
I've got a series of equations that I'd like to align on the equals sign. Some are long enough to require more than one line, like so:
(1) qwertyuiop = (asdf + ghjkl) * 
                      (zxcv + bnm)
(2)            = 0 * (zxcv + bnm)
(3)            = 0
I can almost get what I want using the align environment, but I can't figure out how to suppress line numbering on the wrapped line — I get something like this instead:
(1) qwertyuiop = (asdf + ghjkl) * 
(2)                   (zxcv + bnm)
(3)            = 0 * (zxcv + bnm)
(4)            = 0
Is there a graceful way to do this using the amsmath environments? How 'bout a package that provides this sort of formatting?

Edit: \notag does the trick!

11th December 2008

madcaptenor1:47pm: I want to write something like X = Poisson(λ), where the equals sign has a small "d" over it, to indicate that X has Poisson distribution with mean λ.

{d \atop =} doesn't do what I want; the d and the = are too far apart.

Any tips?

edit: \stackrel{d}{=} works.

10th December 2008

eigenvalue9:26pm: is there an easy way to do a "double arrow" in LaTeX?
what i mean by "double arrow" is not the "implies" symbol =>. what i mean is two normal arrows -> stacked on top of one another.

7th November 2008

leigh_a10:00am: Hiya! I'm having trouble typesetting a truth table and I was hoping someone could offer me a suggestion.

Collapse )

2nd October 2008

kiryen7:55am: XeTeX, Linguistics, and other things
Hey, just joined, finished my undergrad in linguistics at the University of Toronto earlier this year. Been using LaTeX since last year.

Just wanted to post about a couple of things (figure that the more people use it, the more information will be available on the internet).
XeTeX allows you to use unicode input in files (which comes in handy for linguistics or if you're too lazy to strip the smart quotes and en/em-dashes out of text you copy and paste from Word documents), and also uses fonts on your system (such as Times New Roman). (Try the fontspec manual [PDF] and see if excites you.)
If you end up using the tipa package with XeTeX, you might want to pick up new versions of Times New Roman or Arial, these have pretty good glyph coverage. Or you might want to try Cambria or Meiryo if you have access to Vista fonts. Of course, Charis SIL, Doulos SIL, and Gentium have the most complete IPA glyph coverage, and they're free to boot.

It's available on OSX, Windows(w32tex and MiKTeX 2.7+), and Linux.

Other packages you might be interested in:
qtree (requires pict2e) - draws trees, with really simple command syntax (but isn't quite as powerful as other solutions)
linguex (requires gb4e) - does examples with newbie-friendly command syntax (but doesn't resemble standard LaTeX syntax)

Also, for Windows users who want to try something similar to TeXShop on OSX, there's TeXworks (download here), which includes a pdf viewer which does not require you to close the window every time you want to compile your file (unlike Acrobat/Reader).

I'll edit this post to include links when I've had some sleep.

EDIT: Links added.

23rd September 2008

raikoala7:12pm: Help?
I can't quite find the right solution for this, even though it seems to be a fairly simple problem:

My \listoffigures and \listoftables are on the same page (because I don't have so many of either).
I'm using KOMA-script and srcheadings for the header and footer.

My header on that page reads "List of Tables".

Does anyone know a way to manually change this to "List of Figures and Tables"?
Current Mood: annoyed

5th September 2008

rose_garden3:30pm: followup
Hi, I think I have to post a follow-up because a lot of the focus was on the length of the word I used in my previous example. The word I'm actually using is ``Refractive" and it appears in a table where I need to squeeze all my columns to fit, so there isn't enough space for the entire word.

For some reason ``Refractive" and other words keep trying to stay on one line, even though this makes them stretch into the neighboring box of the table. I can fix each word every time it appears by adding \- to it, but I would rather do it in the preamble with the \hyphenation command.

Here's a better example of what is not working for me.




Refractive \\
Re\-frac\-tive \\



What I wanted for output:

Does LaTeX refuse to hyphenate the first word in the box of a table?
Am I doomed to use \- every time ``Refractive" appears in my table?

(Also, is there an easy way to make my table have a smaller font than the rest of the document?)

4th September 2008

rose_garden5:47pm: \hyphenation
I just discovered that instead of using the \- hyphenation trick, I can tell LaTeX to hyphenate words in the preamble. yay! Except... it doesn't work. not yay.

Here's my entire test file:


supercalifragilisticexpialidocioussupercalifragilisticexpialidocioussupercalifragilisticexpialidocioussupercalifragilisticexpialidocious \end{document}

The output is all on one line (major overfill hbox! oh no!)

Am I missing something obvious, like a package or something?

Thanks in advance for your help!

3rd September 2008

anhydrol11:51am: Couple questions about LaTeX and BibTeX
1. Bibtex made mess in order of article's author. For example AuthorA, AuthorB and AuthorC became AuthorB, AuthorA and AuthorC.
Is there any solution to this problem?

2. Bibtex format the text, may I prevent wrong transformations? For example SHELX word after bibtex treatment became Shelx, that is not really correct.

Collapse )

2nd September 2008

forvrkate12:08am: ADOBE RE-OPEN
Okay, so this isn't really a TeX-LaTeX question, but it is related! I'm making presentations using Beamer. This requires using the PDFLaTeX command. Unfortunatley, it won't write to a PDF if a PDF of the same file name is currently open. This means that when I'm trying to track changes, I have to PDFLaTeX, check out the adobe file, remember to close adobe, then go back to editing the LaTeX document. I've heard rumors that there's some way to modify either the Adobe settings or the WinEdt settings so that the PDF will automatically refresh itself without needing the "always remember to close" step, which I sometimes forget.

Do you know anything about this issue? Asking around, I ended up getting the advice "You can fix it so you don't have to do this; just google to find out how." Unfortunately I can't figure out what to google for.

Any solution (or HREF link to a solution) would be most appreciated. Thanks!

18th August 2008

gogobera11:11pm: Broken non-breaking space?!
I have a summer “To Do” list, and I’ve defined a completed item as

\newcommand{\doneItem}[1]{{ \color{black} \item{#1~\checkmark} }}

(The rest of the items are in red.) What I’ve recently come across is that if a completed item’s text (the argument of the command) is just long enough, the \checkmark gets orphaned on the next line, despite being separated by a ~!

I’ve concluded that what’s going on is that the argument of \doneItem is being grouped as one box and then the ~\checkmark is being parsed. Thus, the line breaking cannot occur earlier in the sentence. I’m not exactly sure why TeX decides it’s better to break the line at the non-breaking space, rather than allow an overfull hbox.

Regardless of the details of why TeX decides what it does (though I’d be interested in knowing this, too), this raises two questions:
  1. How can I get TeX to break the line at an earlier point when necessary, so that the checkmark will always follow at least one word?
  2. The \item command doesn’t work quite like most LaTeX commands, and so I’ve basically done a dirty deed here. It would be more appropriate to define something like two commands: \toDo and \done, which each emulate \item’s behavior within the list. How should this most appropriately be done? And, of course, once done, how can I ensure that the final check mark is never separated from the word preceding it
I’ve had a look at Lamport’s LaTeX, but I didn’t find an answer. It must be in there somewhere, right? Or maybe some package like “enum” is what I need?

Edit: The simple answer is the correct one, in this case. I had left a trailing space at the end of the argument of \doneItem. TeX was breaking the line there. Removing it did the trick.
Powered by LiveJournal.com