View previous topic :: View next topic |
Author |
Message |
theprog n00b
Joined: 19 Jun 2002 Posts: 15
|
Posted: Sun Nov 02, 2003 9:30 pm Post subject: LaTeX Solutions and MORE problems |
|
|
I've been using LaTeX for a while now, and discovered some solutions to various problems....
1. Ugly fonts on Windows:
By default, LaTeX uses the bitmap font Computer Modern Roman, which doesn't look bad, until it is scaled by software, such as Acrobat Reader.
Two solutions:
Use pdftex. It automatically uses scalable fonts.
Include the line \usepackage{times}. It will use the Times scalable font, thus making everything pretty.
2. Graphics Formats
Using pdftex one can include images in the pdf format, as well as png and possibly jpg. For ps files, try using ps2pdf. I've found that it works well.
However, I've got a problem of my own.
I've got a file with over 100 chapters.
LaTeX works well for the formatting in every aspect except the table of contents. The spacing between the chapter number and the title is too small, but I haven't found a way to increase it. |
|
Back to top |
|
|
MrTwister n00b
Joined: 18 Apr 2003 Posts: 30
|
Posted: Wed Nov 05, 2003 9:24 pm Post subject: Got an error :( |
|
|
Hi,
i tried to "compile" the example you gave in your post but i always get an error. It always says "This is TeX, Version 3.14159 (Web2C 7.3.1)
(Fatal format file error; I'm stymied)". All i did was copy & paste. And i even tried to "compile" a document example from the web and i get the same error (I do F2 in kile...and i tried "latex test.tex", but it gives me the error i mentionend above. What is wrong ?!? |
|
Back to top |
|
|
slartibartfasz Veteran
Joined: 29 Oct 2002 Posts: 1462 Location: Vienna, Austria
|
Posted: Fri Nov 07, 2003 8:04 am Post subject: Re: Got an error :( |
|
|
MrTwister wrote: | Hi,
i tried to "compile" the example you gave in your post but i always get an error. It always says "This is TeX, Version 3.14159 (Web2C 7.3.1)
(Fatal format file error; I'm stymied)". All i did was copy & paste. And i even tried to "compile" a document example from the web and i get the same error (I do F2 in kile...and i tried "latex test.tex", but it gives me the error i mentionend above. What is wrong ?!? |
your .fmt files are missing. try to create them using 'fmtutil --missing' or if that does not help 'texconfig formats'. if u have no luck with either of these commands, u will need to reinstall tex. _________________ To an engineer the glass is neither half full, nor half empty - it is just twice as big as it needs to be. |
|
Back to top |
|
|
slartibartfasz Veteran
Joined: 29 Oct 2002 Posts: 1462 Location: Vienna, Austria
|
Posted: Fri Nov 07, 2003 8:30 am Post subject: Re: LaTeX Solutions and MORE problems |
|
|
theprog wrote: | I've been using LaTeX for a while now, and discovered some solutions to various problems....
1. Ugly fonts on Windows:
By default, LaTeX uses the bitmap font Computer Modern Roman, which doesn't look bad, until it is scaled by software, such as Acrobat Reader.
Two solutions:
Use pdftex. It automatically uses scalable fonts.
Include the line \usepackage{times}. It will use the Times scalable font, thus making everything pretty.
|
This is a possible solution. the problem comes from font types. type1 and truetype fonts are no problem but if a font is only available in the metafont format, the pdf looks ugly because the font is printed as bitmap. sometimes it helps to produce a ps first with 'dvips -Ppdf' and then convert this to pdf.
ftp://ftp.dante.de/tex-archive/fonts/ps-type1/cm-super/
is a replacement for CM fonts which should work with pdf afaik - didnt test it though...
Quote: |
However, I've got a problem of my own.
I've got a file with over 100 chapters.
LaTeX works well for the formatting in every aspect except the table of contents. The spacing between the chapter number and the title is too small, but I haven't found a way to increase it. |
try
Code: | \renewcommand{\l@subsection}{\@dottedtocline{2}{1.5em}{3.3em}}
|
the first number is the distance from the left page border, the second number is the space occupied by the chapter number. (em is a unit - the space that a 'm' needs, of course u can use another latex unit if u like)
or u can use the tocloft package to configure about a gazillion options about your table of contents. if u are using tetex u can find the documentation for the package on your harddisk:
Code: | /usr/share/texmf/doc/latex/styles/tocloft.dvi |
_________________ To an engineer the glass is neither half full, nor half empty - it is just twice as big as it needs to be. |
|
Back to top |
|
|
ikokai n00b
Joined: 10 Nov 2003 Posts: 14
|
Posted: Mon Dec 15, 2003 12:11 pm Post subject: |
|
|
Oh, I love LaTeX. I am using it for all my text processing needs.
I am using it with vi + vim-latex.
It's just great. I am just typing \ll to compile and \lv to view the file. I configured it to create postscript output and preview it with gv. gv is watching the postscript file so when I recompile it gets updated in the preview too.
I am using mainly ps because of this update possibility in gv, and because gv can show me all the colors and graphics what xdvi can not.
For presentation I used to be write them with foiltex and ppower4, but now I found beamer. It is a really great package with a good manual, and it can handle ps an pdf output as well without the postprocessing nightmare with ppower4 (although you can use it with ppower4 together) search for it in google you won't regret it .
Usually if somebody wants from me a word document, I just compile my latex source with latex2rtf. It can handle some math too, but with the complicated ones you can have problems (but it can generate images for the math and include it in the rtf) |
|
Back to top |
|
|
carambola5 Apprentice
Joined: 10 Jul 2002 Posts: 214
|
Posted: Tue Dec 16, 2003 11:40 pm Post subject: |
|
|
don quixada wrote: | Another useful tip which I forgot to mention was getting a degree symbol:
Code: |
\newcommand{\degree}{$\tt{^o}$ }
|
With this command one can type: 40\degree C and when processed, the \degree will be a little degree symbol.
I found this the easiest way of getting the symbol, it doesn't require using any outside packages etc...
dq |
Probably better to use:
Code: | \newcommand{\degree}{$^\circ$} |
|
|
Back to top |
|
|
bubbas n00b
Joined: 29 Dec 2003 Posts: 36 Location: Germany
|
Posted: Mon Dec 29, 2003 2:42 pm Post subject: |
|
|
Hi i've got a problem with xdvi
after having emerged tetex, now an emerge xdvik says:
These are the packages that I would merge, in order:
Calculating dependencies ...done!
[ebuild N ] media-libs/t1lib-1.3.1
[blocks B ] app-text/tetex (from pkg app-text/xdvik-22.40y-r1)
[blocks B ] app-text/tetex (from pkg app-text/ptex-3.1.3)
[ebuild N ] app-text/ptex-3.1.3
[ebuild N ] app-text/xdvik-22.40y-r1
some ideas?
cu
vale |
|
Back to top |
|
|
slartibartfasz Veteran
Joined: 29 Oct 2002 Posts: 1462 Location: Vienna, Austria
|
Posted: Mon Dec 29, 2003 4:07 pm Post subject: |
|
|
bubbas wrote: | Hi i've got a problem with xdvi
after having emerged tetex, now an emerge xdvik says:
These are the packages that I would merge, in order:
Calculating dependencies ...done!
[ebuild N ] media-libs/t1lib-1.3.1
[blocks B ] app-text/tetex (from pkg app-text/xdvik-22.40y-r1)
[blocks B ] app-text/tetex (from pkg app-text/ptex-3.1.3)
[ebuild N ] app-text/ptex-3.1.3
[ebuild N ] app-text/xdvik-22.40y-r1
some ideas? |
yep: might be that u have 'canna' emerged or in your useflags. if 'doc' is enabled too (also a useflag) u get this behaviour as some of the docs that come with canna can only be compiled with ptex. solution: disable the useflags or hack canna not to use them. _________________ To an engineer the glass is neither half full, nor half empty - it is just twice as big as it needs to be. |
|
Back to top |
|
|
bubbas n00b
Joined: 29 Dec 2003 Posts: 36 Location: Germany
|
Posted: Mon Dec 29, 2003 4:49 pm Post subject: |
|
|
hm
i don't even know what canna is and it isn't emerged.
My useflags:
USE="x86 oss apm arts avi berkdb crypt cups encode foomaticdb gdbm gif gpm gtk gtk2 imlib
jpeg kde gnome libg++ libwww mad mikmod motif mpeg ncurses nls oggvorbis
opengl pam pdflib png python qt quicktime readline sdl slang spell ssl
svga tcpd truetype X xml2 xmms xv zlib"
and manually added (make.conf): alsa
So doc isn't in there.
but thanks for your reply
cu
vale |
|
Back to top |
|
|
slartibartfasz Veteran
Joined: 29 Oct 2002 Posts: 1462 Location: Vienna, Austria
|
Posted: Mon Dec 29, 2003 5:35 pm Post subject: |
|
|
hmm - then it is something different
try to find out the depencies - i think it is part of the 'gentoolkit'.
to be sure about the useflags u can try this:
Code: | root@box # USE="-doc -canna" emerge -pv <package> |
[EDIT]
(disregard the lines above)
ok - here it is:
from /home/cvsroot/gentoo-x86/app-text/xdvik/xdvik-22.40y-r1.ebuild:
Code: | DEPEND=">=media-libs/t1lib-1.3
app-text/ptex
!app-text/tetex
virtual/x11
cjk? ( media-fonts/kochi-substitute )
libwww? ( >=net-libs/libwww-5.3.2-r1 )"
|
its a hard dependency of xdvik - u can probably find out why by looking at the changelog or at bugs.gentoo.org _________________ To an engineer the glass is neither half full, nor half empty - it is just twice as big as it needs to be. |
|
Back to top |
|
|
discostu Guru
Joined: 01 Nov 2002 Posts: 333
|
Posted: Mon Jan 05, 2004 6:59 am Post subject: |
|
|
I got my .tex file to compile with the latex command (after having to run fmutil --missing), but now xdvi doesn't seem to work? what do I have to do?
Code: | xdvi myfirst.dvi
kpathsea: Running mktexpk --mfmode ljfour --bdpi 600 --mag 1+120/600 --dpi 720 cmbx12
mktexpk: Mismatched mode ljfour and resolution 600; ignoring mode.
mktexpk: Running mf \mode:=ljfour; mag:=1+120/600; nonstopmode; input cmbx12
This is METAFONT, Version 2.7182 (Web2C 7.3.1)
(Fatal base file error; I'm stymied)
grep: cmbx12.log: No such file or directory
mktexpk: `mf \mode:=ljfour; mag:=1+120/600; nonstopmode; input cmbx12' failed to make cmbx12.720pk.
kpathsea: Appending font creation commands to missfont.log.
xdvi.bin: Can't find font cmbx12.720pk
xdvi.bin: Not all pixel files were found
| I have tetex, dvipdfm, and latex packages emerged, but there appears to be a block on xdvik package, but for some reason I still have the command "xdvi"
How can I get this working? Thanks! _________________ "Disco Stu doesn't advertise." |
|
Back to top |
|
|
slartibartfasz Veteran
Joined: 29 Oct 2002 Posts: 1462 Location: Vienna, Austria
|
Posted: Mon Jan 05, 2004 7:47 am Post subject: |
|
|
perhaps running mktexlsr helps - but it seems that this is an error of xdvik, i'd try to use another dvi viewer (i use kdvi). but i dont really know what the problem is - sorry
[EDIT]
one thing u might want to try is to disable any special font instructions in your tex file in case u use that... _________________ To an engineer the glass is neither half full, nor half empty - it is just twice as big as it needs to be. |
|
Back to top |
|
|
bubbas n00b
Joined: 29 Dec 2003 Posts: 36 Location: Germany
|
Posted: Mon Jan 05, 2004 12:01 pm Post subject: |
|
|
now i have:
Code: | emerge unmerge tetex |
then
should work then. tetex is emerged together with xdvik then I think.
cu
vale |
|
Back to top |
|
|
slartibartfasz Veteran
Joined: 29 Oct 2002 Posts: 1462 Location: Vienna, Austria
|
Posted: Thu Jan 29, 2004 10:18 am Post subject: |
|
|
carambola5 wrote: | don quixada wrote: | Another useful tip which I forgot to mention was getting a degree symbol:
Code: |
\newcommand{\degree}{$\tt{^o}$ }
|
With this command one can type: 40\degree C and when processed, the \degree will be a little degree symbol.
I found this the easiest way of getting the symbol, it doesn't require using any outside packages etc...
dq |
Probably better to use:
Code: | \newcommand{\degree}{$^\circ$} |
|
i agree with carambola5 that his way is a bit better - i know two better ones still:
1)
Code: | \usepackage{textcomp}
... very hot 40\textcelsius
|
2)
Code: | \usepackage{SIunits}
... very hot \unit{40}{\degreecelsius}
|
the second method has the advantage that the space between the figure and the unit can be configured (should be \thinspace aka \,) imho. and it works inside math environments too - the character is correctly printed upright and not slanted as it usually would be in a math environment. ihmo the slanted character in math should be used vor symbold and variables only. _________________ To an engineer the glass is neither half full, nor half empty - it is just twice as big as it needs to be. |
|
Back to top |
|
|
carambola5 Apprentice
Joined: 10 Jul 2002 Posts: 214
|
Posted: Thu Feb 05, 2004 6:28 am Post subject: |
|
|
Anyone know of (or capable of making) a simple "cheat sheet" for using LaTeX? I love LaTeX, but over winter break, my skills deteriorated quickly (since I had only just begun learning it). A 3" x 5" card chock full of info would be really great.
@slartibartfasz: your sig is wrong. To an engineer, the glass is neither half full nor half empty, just 1.333 times too large taking into account a 1.5 sloshing safety factor. |
|
Back to top |
|
|
slartibartfasz Veteran
Joined: 29 Oct 2002 Posts: 1462 Location: Vienna, Austria
|
Posted: Thu Feb 05, 2004 8:24 am Post subject: |
|
|
carambola5 wrote: | Anyone know of (or capable of making) a simple "cheat sheet" for using LaTeX? I love LaTeX, but over winter break, my skills deteriorated quickly (since I had only just begun learning it). A 3" x 5" card chock full of info would be really great. |
sorry no
i usually keep a collection of useful tricks and things i wan to remember after the \end{document} - sort of a template.
carambola5 wrote: | @slartibartfasz: your sig is wrong. To an engineer, the glass is neither half full nor half empty, just 1.333 times too large taking into account a 1.5 sloshing safety factor. |
pah - safety is for wussies - my calculations work ... well, usually _________________ To an engineer the glass is neither half full, nor half empty - it is just twice as big as it needs to be. |
|
Back to top |
|
|
nulltype n00b
Joined: 13 Aug 2003 Posts: 36
|
Posted: Sun Apr 11, 2004 1:42 am Post subject: Using Metafont files in Latex |
|
|
I have a metafont <fontname>.mf file that I would like to use in a LaTeX document. I installed it to /usr/share/texmf/fonts/source/public/<fontname>.
How do I use it in a LaTeX document? |
|
Back to top |
|
|
M104 Tux's lil' helper
Joined: 13 Jan 2003 Posts: 132 Location: Riverside, CA
|
Posted: Sun Apr 11, 2004 10:32 am Post subject: |
|
|
Here's a little Makefile I use in my projects that will produce many different output formats from the .ltx source file simply by changing the target. Two smaller advantages are that you can run "make clean" to prepare your project directory for ditsribution and you can store command modifications in the Makefile.
It's much easier to type "make pdf" than to remember "pdflatex --all --of --my --options my_project.ltx"
First, make a project directory and then a src/ subdirectory for your .ltx file. Then pop this Makefile in and change the NAME="..." line to your file name minus the ltx extension. This should work for most simple single file LaTeX projects, but you can modify the commands to fit your needs.
Please let me know if you have a better one or any suggestions!
Code: | NAME="your_project"
all:
@echo "-- Nothing to do, please choose a target to make. --"
@echo "Available targets:"
@echo " rtf pdf"
@echo " dvi ps"
@echo " html txt"
@echo -e "\nYou can also use \"make clean\" to clean all non-source files."
rtf:
latex2rtf src/${NAME}.ltx
@mv src/${NAME}.rtf . &>/dev/null
html:
latex2html src/${NAME}.ltx
@mv src/${NAME} . &>/dev/null
pdf:
pdflatex src/${NAME}.ltx
ps: dvi
dvips -t letter -o ${NAME}.ps ${NAME}.dvi
dvi:
latex src/${NAME}.ltx
txt:
detex < src/${NAME}.ltx > ${NAME}.txt
clean:
@echo ' Cleaning...'
@find . \( -name '*.dvi' -o -name '*.ps' -o -name '*.pdf' \
-o -name '*.txt' -o -name '*.log' -o -name '*.aux' \
-o -name '*.rtf' -o -name '*.bak' -o -name '*~' \) \
-type f -print | xargs rm -f
@rm -rf ${NAME} &>/dev/null
|
_________________ "Pulling together is the aim of despotism and tyranny. Free men pull in all kinds of directions."
Terry Pratchett, The Truth |
|
Back to top |
|
|
karnesky Apprentice
Joined: 18 Mar 2004 Posts: 218
|
Posted: Mon Apr 12, 2004 5:07 pm Post subject: |
|
|
I must say I'm very impressed with HA-prosper's ability to create split slides & to use a table-of-contents. It makes for beautiful presentations.
I do have one question: does anyone know of a LaTeX package that would be analagous to WordPerfect's MakeItFit tool, which will automatically adjust margins, font size, line spacing, etc. so that the text will exactly fill a user-desired number of pages? This was a very useful trick that I am sure should be possible in LaTeX, but I can't figure out how to do it. |
|
Back to top |
|
|
erikbjohn n00b
Joined: 01 Mar 2004 Posts: 18 Location: Boulder, CO
|
Posted: Tue Apr 13, 2004 2:25 am Post subject: Emacs |
|
|
I am suprised nobody is mentioning using Emacs as an editor. I have fjound that this proves to be a very powerful tool. In fact, I am able to use the R program (for stats) using ESS in Emacs, while editing the final paper output in the LaTeX document all from one window. This proves to b e a very efficient combination. In addition, all of the pdf commands as well as spell checking can also be done from this window. |
|
Back to top |
|
|
stahlsau Guru
Joined: 09 Jan 2004 Posts: 584 Location: WildWestwoods
|
Posted: Thu Apr 15, 2004 6:01 am Post subject: |
|
|
And I am surprised only one of you mentioning LYX. It's sorta GUI for LaTex so one hasn't to learn the coding-language, very nice for beginners who only wanna write something without messing with the "how-to-make-it-look-good".
Possibly it's no choice for the hardliner-latex-code-fetishists, but I encourage anyone who doesn't want to learn latex to try it out. I've written a lot of docs for university with lyx in the last years, and that with ease |
|
Back to top |
|
|
daff Apprentice
Joined: 02 Jul 2003 Posts: 232 Location: Vienna, Austria
|
Posted: Thu Apr 15, 2004 10:35 am Post subject: |
|
|
I found two "cheat-sheets" for LaTeX, which are quite helpful:
LaTeX-Symbols, 91 (!) pages
Very nice cheat-sheet for quickly recalling things like text properties, document structure, etc. _________________ Instead of asking why a piece of software is using 1970s technology,
start asking why software is ignoring 30 years of accumulated wisdom. |
|
Back to top |
|
|
poke@ulyssis n00b
Joined: 22 Feb 2003 Posts: 9
|
Posted: Mon May 10, 2004 9:58 pm Post subject: graphicx en latex2html |
|
|
Wath about this combination!
I use pdflatex with graphicx and I also wanna make a html page of my document.
But latex2html gives this error:
*********** WARNINGS ***********
No implementation found for style `graphicx'
So I won't see my figures in html
thx |
|
Back to top |
|
|
omega_cubed n00b
Joined: 14 Nov 2003 Posts: 5 Location: Princeton, NJ
|
Posted: Fri May 14, 2004 6:02 am Post subject: Re: graphicx en latex2html |
|
|
poke@ulyssis wrote: | Wath about this combination!
I use pdflatex with graphicx and I also wanna make a html page of my document.
But latex2html gives this error:
*********** WARNINGS ***********
No implementation found for style `graphicx'
So I won't see my figures in html
thx |
What kind of graphics are you using? If you are just using eps files, you can try switching to using epsfig instead. I just tried latex2html on my thesis and the epsfigs translates into png image just fine with it.
Otherwise if the reason you use graphicx is for png or jpeg images, may I suggest hacking through the HTML file yourself and adding images? Okay, just kidding, but check out this guide and see if it helps.
And here is a page that gives some general info regarding using graphics in latex, it explicitly states that it keeps in mind the use with latex2html, so I think it will work.
Cheers,
W |
|
Back to top |
|
|
data n00b
Joined: 15 Jan 2004 Posts: 17 Location: France
|
Posted: Fri Jun 04, 2004 12:52 am Post subject: accents in latex listings |
|
|
It looks like everyone's having great fun with LaTeX here
I just discovered it a few days ago and I love it. However I need a little help.
When I include a C++ source file in my document all the accents that are in the included code get messed up (ie moved to the beginning of the word).
I use this to enable accents in my standard LaTeX.
Code: | \usepackage[latin9]{inputenc} |
and this to format and include a C++ file
Code: | \lstinputlisting[language=c++,breaklines]{simu1/Generator.cc} |
Any sound advice or even vague ideas about why this is happening
Thanks. |
|
Back to top |
|
|
|