ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Xan <dxpublica@telefonica.net>
To: Wolfgang Schuster <schuster.wolfgang@gmail.com>
Cc: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: Alignment table with comma, and long long space after
Date: Sun, 22 Sep 2013 20:32:51 +0200	[thread overview]
Message-ID: <20130922203251.454b418fdd0b2bd5778f2a6f@telefonica.net> (raw)
In-Reply-To: <F17B462D-99AE-4C70-A868-8338FD7DABF5@gmail.com>

[-- Attachment #1: Type: text/plain, Size: 70 bytes --]

Yes:



> You can show us a *complete* minimal example.
> 
> Wolfgang

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: prova.tex --]
[-- Type: text/x-tex; name="prova.tex", Size: 4870 bytes --]

% Regime
\enableregime[utf]

% Choose a language, and associated hyphenation rules.
\mainlanguage[ca]

% AMSTHM equivalent
%% Exercici
%% Mirar http://wiki.contextgarden.net/Command/setupdescriptions
%%% posar alternative=left per identar tots els continguts | alternative=serried per tractar el contingut com un paràgraf ordinari
\defineenumeration
  [exercici]
  [alternative=serried,text={\startcolor[darkblue]Exercici\stopcolor},stopper={.\space},left={\bgroup},right={\egroup},width=fit,headstyle=\ss,distance=0.25em,width=fit]

%\defineenumeration
%  [exerciciimportant]
%  [text={Exercici},headstyle=bold,between=\blank,titledistance=0em,textdistance=1em,
%stopper={.\space},location=serried,left={\bgroup\bf},right={\egroup},width=fit,before={\bgroup\startframedtext[background=screen,frame=off,width=broad]},after={\stopframedtext\egroup}]

% Intent fer una comanda per a fer requadres a les coses importants
% http://www.ntg.nl/pipermail/ntg-context/2013/074823.html
\def\important{\dodoubleempty\doimportant}
\def\doimportant[#1][#2]{\bgroup
    \ifsecondargument
       \startframedtext[background=color,backgroundcolor=#2,frame=off,width=broad]%
       #1
    \else
       \startframedtext[background=screen,frame=off,width=broad]%
       #1
    \fi
    \stopframedtext
    \egroup}

\defineframedtext
  [important]
  [background=screen,
   frame=off,
   width=broad]

% Per a veure què falla amb els símbols
\enabletrackers [fonts.missing]


% Choose a font
%\usetypescript[pagella][ec]
%\setupbodyfont[pagella,11pt]
\setupbodyfont [cmr,11pt] % cmr, 11pt

% Margins
%\setuplayout[topspace=2cm, backspace=2cm, header=1.5cm,margin=2cm,width=middle,footer=1cm]

% Colors
\definecolor[headingcolor][c=1,m=0.5431,y=0,k=0.5451]
\definecolor[tablecolor][b=1,t=.5,a=1]

% Page number
\setuppagenumbering [location={header,right}]

% Paper size
\setuppapersize [A4]

% Italic in emph (by default is slanted)
\setupbodyfontenvironment[default][em=italic]

% Headers and footers
\setupfooter[text][style={\ss\tfx},color=headingcolor,before={\hrule}]
\setupheader[text][style={\ss},color=headingcolor,after={\hrule}]

%% Display of headers
\setuphead[title][style={\tfd},align=middle,before={\begingroup},after={\bigskip\endgroup}]
\setupheads[section,subject][style={\tfc}]
\setupheads[subsubject,subsection][style={\tfb}]
\setuphead[title,chapter,subject,section,subsubject,subsection][color=headingcolor]

%% Per veure els enllaços
\setupinteraction[state=start]

%% Per a BibTeX
\setuppublications[alternative=ams]


%% Taules: estils

%%% Per a què les taules se me puguin alinear amb les comes
\chardef\characteralignmentmode=2
\chardef\characteralignmentmode\plustwo

%%% http://randomdeterminism.wordpress.com/2012/11/18/separation-of-content-and-presentation-for-tables-part-1/
\startsetups table:style
  \setupTABLE[row][first][background=color, backgroundcolor=tablecolor, color=black, align={middle,lohi},style=ss]
  \setupTABLE[column][1][align={right,lohi}]
  \setupTABLE[column][2][align={left,lohi},alignmentcharacter={,},aligncharacter=yes]
%  \setupTABLE[column][2][width=.20\textwidth]
  \setupTABLE[loffset=1mm,roffset=1mm]
  \setupTABLE[frame=off]
  \setupTABLE[topframe=on,bottomframe=on]
  \setupTABLE[column][first][leftframe=on]
  \setupTABLE[column][last][rightframe=on]
\stopsetups

%% Normal
\startsetups table2:style
  \setupTABLE[row][first][background=color, backgroundcolor=tablecolor, color=black, align={middle,lohi},style=ss]
  \setupTABLE[column][1][align={right,lohi}]
  \setupTABLE[column][2][align={left,lohi}]
%  \setupTABLE[column][2][width=.20\textwidth]
  \setupTABLE[loffset=1mm,roffset=1mm]
  \setupTABLE[frame=off]
  \setupTABLE[topframe=on,bottomframe=on]
  \setupTABLE[column][first][leftframe=on]
  \setupTABLE[column][last][rightframe=on]
\stopsetups


%% ConTeXt MIV

%% Capçaleres i peus

%%% Prenc els primers 5 caràcters del sha256 del fitxer (requereix ConTeXt MIV)
\setupfootertexts[\jobname\space(versió \ctxlua{context(os.resultof("sha256sum \jobname.tex | cut -c  -5"))}, \currentdate)][]

\starttext


\placefigure[here]{Diverses mesures}{
\bTABLE[setups={table:header, table:frame, table:style}]
\bTABLEhead
\bTR \bTD Esdeveniment \eTD \bTD Mesura (m) \eTD \eTR
\eTABLEhead
\bTABLEbody
\bTR \bTD Distància mitjana Terra-Lluna \eTD \bTD 150.000.000.000 \eTD \eTR
\bTR \bTD Diàmetre mitjà terrestre \eTD \bTD 12 800.000 \eTD \eTR
\bTR \bTD Distància Palma-Alcúdia \eTD \bTD 75.000 \eTD \eTR
\bTR \bTD Diàmetre mitjà de Júpiter \eTD \bTD 140.000.000 \eTD \eTR
\bTR \bTD L'altura d'una persona \eTD \bTD 1,75 \eTD \eTR
\bTR \bTD La distància mitjana entre el Sol i Alfa-Centauri \eTD \bTD 40.790.494.000.000.000 \eTD \eTR
\eTABLEbody
\eTABLE}

\stoptext

[-- Attachment #3: prova.pdf --]
[-- Type: application/pdf, Size: 16908 bytes --]

[-- Attachment #4: Type: text/plain, Size: 485 bytes --]

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

  reply	other threads:[~2013-09-22 18:32 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-09-21 14:22 Xan
2013-09-21 16:55 ` Wolfgang Schuster
2013-09-22 17:13   ` Xan
2013-09-22 17:31     ` Wolfgang Schuster
2013-09-22 18:32       ` Xan [this message]
2013-09-23 13:45       ` Xan
2013-09-23 18:11         ` Wolfgang Schuster
2013-09-24  7:18           ` Xan
2013-10-04 21:47           ` Hans Hagen
2013-10-05  3:37             ` hwitloc
2013-10-05  9:56               ` Hans Hagen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20130922203251.454b418fdd0b2bd5778f2a6f@telefonica.net \
    --to=dxpublica@telefonica.net \
    --cc=ntg-context@ntg.nl \
    --cc=schuster.wolfgang@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).