comp.text.tex
and
The Em TeX mailing listWhen preparring this page I have done a minimum of editing: Of course I have inserted the HTML-codes and then I have tried only to take the parts of the question and answers, that where interessting (some times even omitting the question). There is therefore no gaurantee that the suggested solutions a suitable or even work, but in the last case, they might inspire you to find the right solution.
Any comments or suggestions, please mail me!
\jobname
comp.text.tex
)
aa056@ccn.cs.dal.ca
))
\newcommand{\grad}{\mbox{$^{\circ}$}}
ernst wallenborn (wall@phys.chem.ethz.ch
)
\langle
and \rangle
. For a bit more quality,
use the set of macros I made. The lowercase versions are regular size and
the capitalized versions are variable size (depending on the size of the
arguments).
% Use $$\Braket{\phi | {\partial^2}\over {\partial t^2} | \psi}$$ \def\bra#1{\mathinner{\langle{#1}|}} \def\ket#1{\mathinner{|{#1}\rangle}} \def\braket#1{\mathinner{\langle{#1}\rangle}} \def\Bra#1{\left<#1\right|} \def\Ket#1{\left|#1\right>} {\catcode`\|=\active \gdef\Braket#1{\left<\mathcode`\|"8000\let|\bravert {#1}\right>}} \def\bravert{\egroup\,\vrule\,\bgroup}Donald Arseneau (
asnd@reg.triumf.ca
)
\newdimen\@tempdima \newdimen\@tempdimb \newdimen\@tempdimc \newdimen\@tempdimd \def\mathbox#1{\hbox{$\mathpalette\@mathbox{#1}}} \def\@mathbox#1#2{#1#2} \def\braket#1#2{% \setbox0 = \mathbox{#1} \@tempdima=\ht0 \@tempdimb=\dp0 \setbox0 = \mathbox{#2} \@tempdimc=\ht0 \@tempdimd=\dp0 \ifdim \@tempdimc > \@tempdima \@tempdima = \@tempdimc \fi \ifdim \@tempdimd > \@tempdimc \@tempdimb = \@tempdimd \fi \def\@tempa{\vrule width0pt height\@tempdima depth\@tempdimb} \left.\left\langle\@tempa{#1}\,\right|\,{#2}\right\rangle}Colin James Wynne
I too have noticed that \dots
plus a period produces irregular
and unsightly spacing. Here's a solution: define a four-dot
ellipsis on the same pattern as \dots
, thus --
\def\ldotsplus{\mathinner{\ldotp\ldotp\ldotp\ldotp}} \def\fourdots{\relax\ifmmode\ldotsplus\else$\m@th \ldotsplus\,$\fi}Then you can type
\fourdots\
That made a proper sentence-ending
ellipsis. (Or you could type $\ldotsplus$
for the same effect.)
Just stick the above two definitions into the style file you are
using, or make a separate style file of them.
Allin Cottrell (cottrell@wfu.edu
)
I want the outer parenthesis larger than the inner parenthesis.Most people who ask for this are trying to use
\bigl((x+b)\bigr)
\left
and
\right
.
First, the problem with \bigl
and \bigr
is (or
was) that they just copy the plain TeX definition, for 10pt, and don't
change size to match the document. Moreover, LaTeX, by default, uses the
same font for big parentheses at all sizes. The upshot is that in a 12pt
document, \big
is the same size as an ordinary parenthesis!
The solution; \usepackage{exscale}
to scale the math extensions
properly, and get a sty file that redefines \big
etc to be
sensitive to the font size. I forget which package does this...but it
should probably go into exscale.
Alternatively, use exscale, but set
\delimitershortfall=-2pt
and then type $\left((x+b)\right)$
Donald Arseneau (asnd@reg.triumf.ca
)
calc
package.
%%% Begin Example \newlength{\myrightmargin} \newlength{\myleftmargin} \newlength{\mytopmargin} \newlength{\mybottommargin} % Change these settings to change the margins \setlength{\myrightmargin}{1.0in} \setlength{\myleftmargin}{1.0in} \setlength{\mytopmargin}{1.0in} \setlength{\mybottommargin}{1.0in} \setlength{\oddsidemargin}{0.0in} % extra room on inside side %%% use margin settings to set width variables \setlength{\evensidemargin}{0 in} \setlength{\marginparsep}{0 in} \setlength{\marginparwidth}{0 in} \setlength{\hoffset}{\myleftmargin - 1.0in} \setlength{\textwidth} {8.5in -\myleftmargin -\myrightmargin -\oddsidemargin} %%% use margin settings to set height variables \setlength{\voffset}{\mytopmargin -1.0in} \setlength{\topmargin}{0 in} \setlength{\headheight}{12 pt} \setlength{\headsep}{20 pt} \setlength{\footskip}{36 pt} \setlength{\textheight} {11.0in-\mytopmargin-\mybottommargin-\headheight-\headsep-\footskip}Hope this helps,
Keith Reckdahl (reckdahl@leland.stanford.edu
)
\raggedright
at the top
of the document, however with \raggedright
LaTeX
does not hyphenate at all and the lines come out much too ragged.A full solution is the following LaTeX2e-style file:
\makeatletter % LaTeX \raggedright turns off hyphenation somehow. \rightskip=0pt plus2em \spaceskip=.3333em plus.03em minus .02em \xspaceskip=.5em plus.08em minus.02em \@rightskip=\rightskip % for LaTeX %\hbadness=10000 % This is supposed to prevent very long words from sticking out into the % right margin. Instead they will be moved into the next line. \emergencystretch=\hsize \tolerance=9999 \def\@arrayparboxrestore{% \let\par\@@par \let\-\@dischyph \let\'\@acci\let\`\@accii\let\=\@acciii \parindent\z@ \parskip\z@skip \everypar{}% \linewidth\hsize \@totalleftmargin\z@ \leftskip\z@skip \rightskip\@rightskip \parfillskip\@flushglue \lineskip\normallineskip \baselineskip\normalbaselineskip \sloppy}David Hull (
hull@cs.uiuc.edu
) (Changed on advise from David Hull, ed.)
phy6jem@sun.leeds.ac.uk
) wrote:
David Gast (Indeed; the limit is indeed that of the number of unprocessed floats (instantaneously) permitted. Maybe David already has unprocessed floats lying around.gast@twinsun.com
)wrote:If I ever try to put more than 9 marginal notes on a page, I get an error message like! LaTeX Error: Too many unprocessed floats.I was unsuccessful in avoiding this problem by setting values like\totalnumber
.Is there some way to permit more than nine marginal notes?
While searching for something else recently, I came across a
reference to a package called morefloats.sty
which claims to
address this problem. I haven't found it yet let alone downloaded it and
tested it. I guess its in CTAN somewhere and may or may not work with
LaTeX2e.
It's in macros/latex209/contrib/misc/morefloats.sty
and it does
work with 2e. It's kind of sledgehammer code, but it does the job.
Robin Fairbairns (rf@cl.cam.ac.uk
)
text text text ... \begin{figure}[p] ... \caption{...}\end{figure} \clearpageGuido Sawade (
sawade@physik.tu-berlin.de
)
Roger de Reus (REUS@MIC.DTU.DK
)
I have a LaTeX2.09 compatible style file which uses the ``^^
'' symbol.
This is not understood by LaTeX2e at all (illegal character), and I don't
know how it worked or what it was meant to do originally.
In fact you missed out the important bit (which the charcter was) the usage
of ^^
(a primitive
TeX
feature, not a
LaTeX
feature) is either folled by a single character eg ^^A
this
means control-A ie a character 64 away from A in the ASCII table or two
lower case hex digits 0-91-f ^^ab
The character of code hex ab
(ie 16*10+11)
Most likely the ^^
notation was refering to a chaacter of code
less than 32, which are `illegal' in LaTeX as they do not work on all TeX
systems. However if you just want to make them legal again to get your
package working go
\catcode`\^^A=12 \catcode`\^^B=12(with whatever characters you need instead of
^^A
, ^^B
) before loading in the package.
David Carlisle (carlisle@ma.man.ac.uk
)
byx015@coventry.ac.uk
) wrote:
How do you get non-italicised Greek lower case characters in LaTeX? UsingHere is a short example, assuming you have fetched and installed the greek fonts in\mathrm
seems only to change capitals. I particularly need to get\mu
for units such as microamps.
ftp://ftp.tex.ac.uk/tex-archive/fonts/greek/kelly
\documentclass[a4paper]{article} \DeclareFontShape{OT1}{cmg}{m}{n}{<-> cmg10}{} \DeclareFontFamily{OT1}{cmg}{} \newcommand{\MU}{{\fontfamily{cmg}\fontseries{m}% \fontshape{n}\selectfont m}} \begin{document} \MU \end{document}Mike Piff (
M.Piff@shef.ac.uk
)
dejong@cpt6.stm.tudelft.nl
) wrote:
I am trying to substitute the italics in formulas for upright letters, but without the need for typingAs it is the wrong encoding, you will run into trouble (greek letters and other symbols). I would suggest to change only the letters you want to change.\mathrm{
. . .}
inside the formula all the time. In other words, I want to change the default font from italic to normal.The only thing that worked sofar was
\SetSymbolFont{letters}{normal}{OT1}{cmr}{m}{n}
\DeclareSymbolFont{pletters}{OT1}{panr}{m}{it} \SetSymbolFont{pletters}{bold}{OT1}{panr}{m}{it} \DeclareSymbolFont{operators}{OT1}{panr}{m}{n} \SetSymbolFont{operators}{bold}{OT1}{panr}{bx}{n} \DeclareMathsymbol{a}{\mathalpha}{pletters}{`a} \DeclareMathsymbol{b}{\mathalpha}{pletters}{`b} \DeclareMathsymbol{c}{\mathalpha}{pletters}{`c} \DeclareMathsymbol{d}{\mathalpha}{pletters}{`d}Vincent Zoonekynd (
zoonek@DPTMaths.ENS-Cachan.Fr
)
fontdc.zip
because
they are part or the dc fonts distribution.
Dan Luecking (luecking@comp.uark.edu
)
I am having trouble usingTry `cmb10
scaled at magstep8. Can anyone help? When I access it in Plain TeX however:\font\bigfont= cmb10 scaled \magstep8 \bigfont{test of Bigfont}TeX complains:! Missing number, treated as zero0. \relax l.5 \font\bigfont= cmb10 scaled \magstep8
MagSteps.TeX
': It allows dynamic re-creation of the
\magstep
macro for any number of magsteps limited only by TeX's
integer capabilities. Usage is `\magsteps
n', for
integer n, followed by (optional) usage of the so-created
\magstep
command.
\catcode `\@ = 11 \newcount \r@mainder \newcount \m@gstepcount \newcount \m@gsteplimit \newcount \m@gstepvalue \newdimen \m@gstepdimen \def \magsteps {\afterassignment \m@gsteps \m@gsteplimit = } \def \m@gsteps {\let \@r = \or \def \or {\noexpand \or}% \m@gstepdimen = 0.166667 \maxdimen \m@gstepvalue = 1000 \m@gstepcount = 0 \def \magstep {}% \loop \ifnum \m@gstepcount < \m@gsteplimit \advance \m@gstepcount by 1 \ifnum \m@gstepvalue > \m@gstepdimen \advance \m@gstepcount by -1 \message {Sorry --- integer overflow would occur if I went any further; stopped at \the \m@gstepcount.} \m@gsteplimit = \m@gstepcount \else \multiply \m@gstepvalue by 12 \multiply \r@mainder by 12 \divide \r@mainder by 10 \advance \m@gstepvalue by \r@mainder \r@mainder = \m@gstepvalue \divide \m@gstepvalue by 10 \multiply \m@gstepvalue by 10 \advance \r@mainder by -\m@gstepvalue \divide \m@gstepvalue by 10 \ifnum \r@mainder < 5 \edef \magstep {\magstep \or \the \m@gstepvalue}% \else \advance \m@gstepvalue by 1 \edef \magstep {\magstep \or \the \m@gstepvalue}% \advance \m@gstepvalue by -1 \fi \fi \repeat \edef \magstep ##1% {\noexpand \ifcase ##1 1000\magstep \noexpand \else 0% \noexpand \message {Sorry --- \string \magstep \space ##1 is not in range 0 .. \the \m@gsteplimit}% \noexpand \fi \noexpand \relax }% \let \or = \@r } \catcode `\@ = 12Philip Taylor (
CHAA006@alpha1.rhbnc.ac.uk
)
wkim+@pitt.edu
) writes:
The fonts you use must be specified inThis gave me a problem. cm fonts are substuted by 24.88pt if I tried any bigger fonts, and it didn't work with some other fonts. Any further help? (I'm using emTeX under OS/2.)\newcommand{\HUGE}{\fontsize{35}{45}\selectfont}
OT1cmr.fd
.
This is presumably to stop an inordinately large collection of fonts
being made.
Note that you can overrule the command in your own file, as eg
by copying this from OT1cmr.fd
to your LaTeX file
\DeclareFontShape{OT1}{cmr}{m}{n} { <5> <6> <7> <8> <9> <10> <12> gen * cmr <10.95> cmr10 <14.4> cmr12 <17.28><20.74><24.88>cmr17}{}and changing the last line (in your file) to
<17.28><20.74><24.88><35>cmr17}{}or to
<17.28><20.74><24.88->cmr17}{}(This allows any size larger than 24.88).
Timothy Murphy (tim@maths.tcd.ie
)
comp.text.tex
, ed.) is
supposed to cover metafont, but I know that a lot of high-power metafonters
don't read it.Try subscribing to the metafont list. I wrote in the UKTUG FAQ:
Issues related to Metafont (and, increasingly, MetaPost) are discussed on the metafont mailing list; subscribe by sending a message `Robin Fairbairns (subscribe metafont your name
' tolistserv@ens.fr
rf@cl.cam.ac.uk
)
ryoung@utdallas.edu
) writes
Then, is there any way that achieves the following imaginary command:In the special case where TK1 is a CS (more generally, whenever the token can act as a parameter), the solution is easy:\futurefuturelet
CS-a CS-b TK1 TK2 TK3 performs\let
CS-a=
TK2, performs\let
CS-b=
TK3, processes TK1, processes TK2, and then processes TK3.
\def\futurefuturelet#1#2#3{\def\tempmacro{\afterassignment#3% \futurelet#2}\futurelet#1\tempmacro}%I haven't actually checked this, but barring typos it should work (unless CS-a is the name
\tempmacro
, or
TK1 is the name \tempmacro
and CS-b
is not :-)
Tanmoy Bhattacharya (tanmoy@qcd.lanl.gov
)
\futurelet
is to detect a
following "{
". In many contexts, reading in a brace and putting it
back is not going to work. \futurelet
can also be used at
the end of a macro (without knowing what either TK1 or
TK2 is), but this use seems to be rare. Therefore the
following can frequently replace \futurelet
, but will not
be applicable in all cases.
One can emulate \futurelet
, when TK1 is a
command, by the following:
\afterassignment
TK1\let
CS
TK2 , provided TK1 does the job of processing
TK2 (or rather, the CS that has been
\let
equal to TK2.
This type of thing can be extended to more than one following token by
having TK1 perform another such operation or a \futurelet
:
\def\X{\afterassignment\getsecond\let\first=} \def\getsecond{\futurelet\second\processboth} \def\processboth{% ... % code to examine \first and \second, ... % perform some actions and then... \first % put \first back }This would be used like
\X
TK2 TK3 and produces the following order of execution:
\first
is \let
equal to TK1
(removing TK1 from input)
\getsecond
is expanded causing ...
\second
to be \futurelet
equal to
TK2
\processboth
(this plays the role of TK1) is \
expanded, taking action possibly dependent on both \first
and \second
and then causing ...
\first
to be executed at the end
\let
equal to a token is different than the token
itself. For instance, if one wishes to check some following token to
see if a brace delimited macro parameter
follows. \let
-ing some CS equal to that brace
and then putting the CS back will not work because TeX
requires an explicit "{
" (otherwise the single
CS is interpreted as the entire parameter, without
braces).
Dan Luecking (luecking@comp.uark.edu
)
verbatim
environment could be tricky (though not entirely
impossible).
However, if all you're ever doing is to transmit robust commands such
as \bf
, you can achieve the required effect by
\test{Hi \bf World} => \let\protect\noexpand \write\somefile{#1}This is easy enough, but note that if you're using 2.09,
\bf
will then get transmuted to \pbf
, which may or may not be
acceptable.
Robin Fairbairns (rf@cl.cam.ac.uk
)
\newtoks\argtoks \def\test#1{\argtoks={#1}\immediate\write\somefile{\the\argtoks}}The
\immediate
here is necessary lest the contents of
\argtoks
change before the \write
occurs.
Anders Svensson (svensson@math.ubc.ca
)
\jobname
I would like to include some conditional text, based on the name of the file that's being `TeXed'. I have tried the following:\def\fname={somename} if\jobname\fname\dothis\else\dothat\fiHowever, theif
-test is always false, even when the filename is `somename.tex
'. ...
\if ....expands the following tokens and tests the first two non-expandable tokens it finds, so it would return true if the first two letters of the filename were the same.
So you probably meant \ifx
rather than \if
\def\x{abc} \def\y{abc}
then \ifx\x\y
will be
true.
However \jobname
is a strange beast. It returns the letters
with catcode 12 and as it is not a macro it is not \ifx
equivalent to any macro. Thus you first have to make a macro with the
letters you want to test all set to catcode 12 (I use \meaning
and the
LaTeX
command \stip@prefix
to generate this below) and then you need
a second macro with the contents of \jobname
.
Then you can compare them with \ifx
.
\makeatletter \def\aaa{xx}\edef\aaa{\expandafter\strip@prefix\meaning\aaa} \edef\bbb{\jobname} \ifx\bbb\aaa \show\yes \else \show\no \fithis will show
\yes
if the file name is xx and \no
otherwise.
David Carlisle (carlisle@ma.man.ac.uk
)
mumble@maths.uct.ac.za
) writes:
whereYou will have to redefine\filename
returns the name of the file containing the\if
statement.
\input
:
\let\TeXinput\input \def\input#1 {\edef\Temporary{\noexpand\TeXinput#1 \def\noexpand\filename{\filename}}% \def\filename{#1}\Temporary}This restricts the
\input
syntax to ending filenames with a space;
\relax
or some such isn't allowed.(I hope it works as typed.)
Donald Arseneau (asnd@reg.triumf.ca
)
reus@PC2.MIC.DTU.DK
) writes:
:I posted something like this to c.t.t some time back, I am not sure anyone would really want to use this (especially if they have a small disk quota:-)\jobname
returns the name of the file being processed,This will give you the `name' part of the file (without path or extension). What is the hook for the full qualified file name?
but (if you know you are on a
TeX
that uses \jobname.log
as the log file (ie not on VMS, where
you have to make obvious change to .lis) you can get the full path from the
log file. Unfortunately on Unix and presumably other systems writing to the
file is buffered, so you have to write an awful lot of rubbish to flush out
the buffer so the log really appears in the file, then you can read in the
file and look at the first lines...
The code below sets the path to the path reported by
TeX.
If the file is in the current directory this may end up being just the filename
like \jobname
. On web2c unix
TeX
at least you can force
TeX
to give the full path in the log file by explicitly putting the current
directory at the front of the
TeX
input path.
Thus if you save the code below as jobpath.tex
this seems to
work on my machine at least...
vummath> TEXINPUTS=$PWD: tex jobpath This is TeX, Version 3.14159 (C version 6.1) (/home/carlisle/jobpath.tex Hyphenation patterns for english, german, loaded. !!! !!! Full path is /home/carlisle/jobpath.tex !!! !!! ) No pages of output. Transcript written on jobpath.log. vummath>
jobpath.tex
\newread\logfile \wlog{just to get started} \def\flush{% \openin\logfile=\jobname.log \read\logfile to \rubbish % get rid of a \par \ifeof\logfile \writerubbish \closein\logfile \expandafter\flush \fi} \def\writerubbish{% {\newlinechar`\ \wlog{\xx\xx\xx\xx}}} \def\xx{\xxx\xxx\xxx\xxx\xxx\xxx\xxx\xxx\xxx\xxx} \def\xxx{a b c } \def\getpath{% \read\logfile to \jobpathname \expandafter\testbracket\jobpathname((\testbracket} \def\testbracket#1(#2(#3\testbracket{% \def\jobpathname{#2}% \ifx\jobpathname\empty \expandafter\getpath \fi} % get the log file started \flush % now read it \getpath % see what happened \immediate\write17{!!!} \immediate\write17{!!! Full path is \jobpathname\space!!!} \immediate\write17{!!!} \byeDavid Carlisle (
carlisle@ma.man.ac.uk
)
filename.sty
'' by Bernd Raichle
which seems to do that:
% filename.sty \filename records the current filename % % first version: 1 Mar 91 (br) % last change : 5 Mar 91 (br) % \typeout{Style option `filename' <5 Mar 91> (br)} \let\filename=\jobname \let\old@@input=\@@input \def\@@input#1 {\def\file@name{#1}% \expandafter\file@@input \expandafter\reset@filename\expandafter{\filename}} \def\file@@input{\let\filename=\file@name \old@@input\filename\relax} \def\reset@filename{\def\filename} \endinput % -- end of `filename.sty' %From: raichle@azu.informatik.uni-stuttgart.de (Bernd Raichle)but I have not tested it (it is rather old).
Jean-Pierre Drucbert
\csname\uppercase{#1}\endcsname
replacementgalko@trix.genie.uottawa.ca
) wrote:
\def\uccsname#1#2{\expandafter\def\csname\uppercase{#1}\endcsname{#2}}This of course fails due to the fact that \uppercase doe not work in TeX's mouth. Anybody know how to get the required effect? Well, the following should do just fine:
\def\uccsname#1{\uppercase{\expandafter\def\csname#1\endcsname}}I have removed #2 from the macro arguments so that you might specify arguments yourself, like in
\uccsname{zappadapp}#1#2{something#1#2}If you wonder why this should work, read the TeXbook concerning
\uppercase
.
David Kastrup (dak@pool.informatik.rwth-aachen.de
)
It is an adaptation from drop.sty
targeted to the use with the
yinit
fonts (in CTAN) and Times-Roman on a PostScript printer.
Your mileage may vary...
% From "drop.sty", written by David G. Cantor and published % Fri, 12 Feb 88, in TeXhax, 1988 #16; then modified for use with LaTeX by % Dominik Wujastyk, February 17, 1988. % % Modified MLO 1994-12-05 : % - advanced \dimen0 by 0.5em, for use with yinit fonts; % - the largest declared size for yinit fonts is 24.88; here I define a % font"myinit", based on yinit.mf and having all sizes. The actual % size used is \dropcapsheight: the default (40pt) corresponds to 4 % lines of text with 10pt fonts, and generates a file yinit.310pk % through METAFONT. \dropcapsheight can be redefined by the user: e.g. % with a command \renewcommand{\dropcapsheight}{48pt} before % \begin{document}. \NeedsTeXFormat{LaTeX2e} \ProvidesPackage{ydrop} [1994/12/05 - Dropped capitals for the 'yinit' fonts] \DeclareFontFamily{U}{myinit}{} \DeclareFontShape{U}{myinit}{m}{n}{ <-> yinit }{} \newdimen\dropcapsheight \dropcapsheight=40pt \def\dropinitialfont {\fontsize{\dropcapsheight}{1.2\dropcapsheight} \usefont{U}{myinit}{m}{n}} \def\drop#1#2{{\noindent \setbox0\hbox{\dropinitialfont #1}\setbox1\hbox{#2}\setbox2\hbox{(}% \count0=\ht0\advance\count0 by\dp0\count1\baselineskip \advance\count0 by-\ht1\advance\count0by\ht2 \dimen1=.5ex\advance\count0by\dimen1\divide\count0 by\count1 \advance\count0 by1\dimen0\wd0 \advance\dimen0 by.75em\dimen1=\ht0\advance\dimen1 by-\ht1 \global\hangindent\dimen0\global\hangafter-\count0 \hskip-\dimen0\setbox0\hbox to\dimen0{\raise-\dimen1\box0\hss}% \dp0=0in\ht0=0in\box0}#2}Maurizio Loreti (
loreti@padova.infn.it
)
I want to typeset the same text in two languages side by side, and I thought that I had devised a suitable environment (using theYou may be better using the `tabularx
andarray
packages):.... "! Argument of \TX@get@body has an extra }".
parallel
' package from ctan, but
if you want to use tabularx
for this then note the following
text from tabularx.dtx
:
This mechanism of grabbing an environment body does have the disadvantage (shared with the AMS alignment environments) that you can not make extension environments by code such asDavid Carlisle (\newenvironment{foo}{\begin{tabularx}{XX}}{\end{tabularx}}as the code is looking for a literal string\end{tabularx}
to stop scanning. Since version 2.02, one may avoid this problem by using\tabularx
and\endtabularx
directly in the definition:\newenvironment{foo}{\tabularx{XX}}{\endtabularx}The scanner now looks for the end of the current environment (foo
in this example.) There are some restrictions on this usage, the principal one being that\endtabularx
is the first token of the `end code' of the environment.
carlisle@ma.man.ac.uk
)
%% Save file as: MULTICOLPAR.STY Source: FILESERV@SHSU.BITNET %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % File multicolpar.sty %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % by % Mauro Orlandini <orlandini@tesre.bo.cnr.it> % Modified by Max Hailperin <max@nic.gac.edu> %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % This LaTeX style, writes different paragraphs in different columns % the number of columns is free), as % This is the first paragraph | This is the second paragraph and its % and text follows... | own text follows... % % This is the third paragraph | This is the fourth paragraph... % and text follows... | % % This format is useful for translated articles, in which there is the % original language in the first column and the translated version in % the second. % % Usage: \begin{multicolpar}{N} % ... text ... % \end{multicolpar} % % where N is the number of columns in which the text will be displayed. % Warning: Inside the environment, each blank line (ie a \par) will % correspond to a paragraph, therefore do not leave blank lines % soon after the \begin{multicolpar}{N} command and soon before % the \end{multicolpar} command (unless you want so). % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \newenvironment{multicolpar}[1]{\begin{trivlist}\item[]% \multicolumnparallelparagraphs{#1}{2em}}% {\endmulticolumnparallelparagraphs\end{trivlist}} \newcount\columnsleft \newcount\totalcolumns \newdimen\separation \def\multicolumnparallelparagraphs#1#2{% \hbadness5000 \vbadness9999 \tolerance9999 \totalcolumns=#1 \separation=#2 \let\xpar=\par \vskip\parskip \columnsleft=#1\relax \hbox to\hsize\bgroup \let\par\nextmulticolumnparallelparagraph \dimen0=#2\advance\hsize-\columnsleft\dimen0 \advance\hsize\dimen0 \divide\hsize\columnsleft\relax \vtop\bgroup} \def\nextmulticolumnparallelparagraph{% \egroup \advance\columnsleft-1 \ifnum\columnsleft>0 \hfil\vtop\bgroup \else \egroup \xpar\vskip\baselineskip\xpar \multicolumnparallelparagraphs\totalcolumns\separation \fi} \def\endmulticolumnparallelparagraphs{% \egroup \advance\columnsleft-1 \ifnum\columnsleft>0 \hfil\vtop\bgroup\hbox to \hsize{} \endmulticolumnparallelparagraphs \else \egroup \xpar \fi}Alex Schoenmakers (
Alex.Schoenmakers@lhs.be
)
Hans-Juergen Godau (godau@dec2.wi-inf.uni-essen.de
)
\put
command.It seems wisest to put the picture in a header as the top of page could vary from page to page (eg. in the letter-class). (Added by editor after advise from Roger de Reus).
Roger de Reus (REUS@MIC.DTU.DK
)
quire
' macros (a quire is a small booklet), which are
TeX macros
to arrange arbitrary numbers of pages in the right order for printing.
They're part of his Midnight Macros collection, available from CTAN or our
FTP server.
Barry Smith, Blue Sky Research (barry@bluesky.com
)
carlisle@ma.man.ac.uk
) wrote:
I'm trying to format an index, where the subject can sometimes be fairly long. I'd like to force the text into the first 3 or 4 inches, with at least an inch where there is nothing but leader. An example will clarify:A paragraph has glue stuck into all sorts of places, and by redefining that gluet we can change the shape of the paragraph.
What I have now:Here is a short title .................... 24 Here is a long and annoying title that won't fit onto one line .................. 25 This is a very bad case. No leaders at all 26What I want:Here is a short title .................... 24 Here is a long and annoying title that won't fit onto one line ..................................... 25 This is a very bad case. No leaders at all ........................... 26
\leftskip
is
inserted at the beginning of every line; \rightskip
at the end;
and \parfillskip
is put at the end of each paragraph. We
normally start with \parfillskip=0pt plus 1fil
, to left justify
the last line.
So the solution to my problem is to add an inch to my
\rightskip
, which forces the right edge over 1 inch. And to get
my page numbers all the way over to the right, we set
\parfillskip
to -\rightskip
to counteract the
\rightskip
. Lastly, to make sure the very last line doesn't
take advantage of the extended room made available by the
\parfillskip
, we give the leader a minimum size of
\rightskip
.
I've put all this stuff together into a parameterized environment and played
with \textwidth
to stress the example I'm working from.
\newcommand{\leaderfill}{Error} % This will get redefined below % #1 is the title, #2 the page number, % and #3 and optional subtitle or author \newcommand{\IndexPaper}[3] {#1 \leaderfill #2 \par\emph{#3} \hfill\hfill\par\smallskip} \newenvironment{Myindex}[1] {\setlength\parindent{0pt} \setlength\rightskip{#1} \setlength\parfillskip{-#1} \renewcommand{\leaderfill} {\cleaders \hbox to 4pt {\hss.\hss} \hskip #1 plus1fil\relax}} {}(This used like, collectors note)
\begin{Myindex}{2in} \IndexPaper{The Phenomenon}{3}{We can put a Subtitle here} \IndexPaper{The Phenomenon of Being and the Being of the Phenomenon}{7}{Or maybe an author} \IndexPaper{The Pre-reflective \emph{Cogito} and the Being of the \emph{Percipere}}{9}{} \IndexPaper{The Being of the \emph{Percipi}}{9}{} \IndexPaper{The Ontological Proof}{21}{} \IndexPaper{Being-In-Itself}{24}{} \end{MyindexWith these definitions, the basic shape of the paragraph seems right, but the "at least 1 inch leader" rule can get broken. For example, if I typeset the above example with
\begin{MyIndex}{1in}
, I get listings
like:
The Phenomenon 3 We can put a Sub- title hereInstead of:
The Phenomenon ............... 3 We can put a Sub- title hereTodd Hivnor (
hivnot@rpi.edu
)
gordon@euclid.math.temple.edu
) writes:
I use thexy-pic
drawing package with emTeX. I am able to mage e.g. a format fileXYPLAIN.FMT
with xy-pic preloaded by saing `tex386 -i xyplain.ini
', where the contents ofXYPLAIN.INI
is:
...
The same trick used to work with the old ``inferior'' LaTeX. I cannot get it to work with LaTeX2e. I tried ini-files such as:\input latex.ltx \documentclass{article} \input xy \xyoption{v2} \xyoption{2cell} \UseAllTwocelss \xyoption{matrix} \xyoption{arrow} \dump
latex.ltx
has the command \dump
at the end of the
file. Thus everything after that gets ignored. There are various ways by
which you can get around this, but they all lead to non-portability of
documents, and are not to be recommended.
One way is to copy latex.ltx
to (say) mylatex.ltx
,
edit this file to remove \dump
near the end, and use
mylatex.ltx
in your file XYLATEX.INI
or whatever
you decide to call it. You will then have to modify your batch files,
etc. And you won't be able to send your source file to anyone else and have
them process it.
Ken Smith (kgs@maths.uq.oz.au
)
initex
, together with
the required classes, pacakges etc., and dump again. I don't know about
xy
, but to take a different example, suppose you ``standard''
documents start off with something like:
\documentclass[english,german,....,12pt,a4paper]{article} \usepackage[cp850]{inputenc} \usepackage[T1]{fontenc} \usepackage{babel,mymacros,....}then it is rather tedious watching dozens of files being loaded every time you write a letter. So you make a format ``
latex
'' with (say)
tex386 -i -8 latex.ltx(this is for
em
TeX and should also install hyphenation
paterns for babel
(see the documentation for
babel
), editors note)
and then a format ``my_latex
'' with tex386 -i &latex
my_latex.tex
where my_latex.tex
contains the above line
plus \dump
. Then you can comment out these lines and load
my_latex.fmt
instead. Portability is no problem: Just uncomment
the lines and the file is as portable as any other
LaTeX file
(which is admittedly not very portable in view of the various font,
packages, encoding etc. which are meanwhile in use).
Peter Ryder (ryder@theo.physik.uni-bremen.de
)
Can anyone suggest a simple means of placing two figures side by side?I dont't know, if you consider this as a simple means, but it does work...
the width of the two minipages plus the \hspace
should not be more than
\textwidth
.
this assumes you're using graphicx
. if not, simply replace
\includegraphics[...]
by your favorite command to include pictures.
\begin{figure}[ht] \begin{minipage}{187pt}%\mbox{} \center{\includegraphics[ % bb=llx lly urx ury, % angle=270, width=187pt, % height=v_length, % scale=factor, % clip=true/false, draft=false, ]{...ps}} \parbox{187pt}{\caption{..... \label{...}}} \end{minipage} \hspace{14pt} \begin{minipage}{187pt}%\mbox{} \center{\includegraphics[ % bb=llx lly urx ury, % angle=270, width=187pt, % height=v_length, % scale=factor, % clip=true/false, draft=false, ]{....ps}} \parbox{187pt}{\caption{..... \label{...}}} \end{minipage} \end{figure}Anonymous
manmac.tex
file (which is usually
distributed with
TeX.)
*.tfm
files called for by
texman.tex
(this includes some fonts that are distributed
with Metafont only in *.mf
source form. But all the
font sources are in the typical Metafont distribution.)
texman.tex
and read the Warning Message carefully.
texman.dvi
file.
weiqigao@crl.com
)
Tim Murphy asks if there is any restriction on TeXing the
TeXbook.
Here is the relevant statement from the latest texbook.tex
:
\loop\iftrue \errmessage{This manual is copyrighted and should not be TeXed}\repeatI think that's pretty clear.
There are a few specific conditions under which knuth has given explicit permission for the TeXbook to be TeXed:
dvi
file. (validation of a new or updated implementation can
be done by comparing the dvi
file with another known to be
valid.) For any other use, permission should be requested in writing from
knuth, addison-wesley, and the american mathematical society.
bbeeton (BNB@MATH.AMS.ORG
)
Laurence Penney (Lorp@truetype.demon.co.uk
)
Donald A. Hosek (quixote@Primenet.Com
)
CTAN tex-archive/info/metafont-for-beginners.tex
Robin Fairbairns (rf@cl.cam.ac.uk
)
.tar.gz
or .zip
file) to a CTAN
/incoming
directory, and send mail to
ctan@shsu.edu
saying:
Robin Fairbairns (rf@cl.cam.ac.uk
)
thorinn@diku.dk
)