Graphics not being aligned correctly in natural tables
Hello fellow ConTeXt lovers, I am having trouble with placing graphics in between \bTD and \eTD. I am using the \externalfigure to do so which works great. The problem is that they aren't being aligned at all when i use \setupTABLE[align={middle,lohi}] whereas text is being aligned perfectly in the middle of each cell. I found out that one can use \dontleavehmode\externalfigure to force alignment, which als works. But when I use \dontleave... the graphic isn't being placed perfectly in the middle but slightly a little bit more to the top of the cell. It's not a real problem for me but since everything looks great in the document, the slightly to the top moved graphics bother me somehow. Does anybody know a workaround maybe? Greets, Sebastian
On Tue, May 17, 2016 at 6:47 PM, cryo shock
Hello fellow ConTeXt lovers,
I am having trouble with placing graphics in between \bTD and \eTD. I am using the \externalfigure to do so which works great. The problem is that they aren't being aligned at all when i use \setupTABLE[align={middle,lohi}] whereas text is being aligned perfectly in the middle of each cell. I found out that one can use \dontleavehmode\externalfigure to force alignment, which als works. But when I use \dontleave... the graphic isn't being placed perfectly in the middle but slightly a little bit more to the top of the cell. It's not a real problem for me but since everything looks great in the document, the slightly to the top moved graphics bother me somehow. Does anybody know a workaround maybe?
Greets, Sebastian
mwe... -- luigi
Hi Luigi, I am afraid that "mwe..." doesn't help. Thanks tho bro, Sebastian Am 17.05.2016 um 18:55 schrieb luigi scarso:
On Tue, May 17, 2016 at 6:47 PM, cryo shock
mailto:axteffekt@gmail.com> wrote: Hello fellow ConTeXt lovers,
I am having trouble with placing graphics in between \bTD and \eTD. I am using the \externalfigure to do so which works great. The problem is that they aren't being aligned at all when i use \setupTABLE[align={middle,lohi}] whereas text is being aligned perfectly in the middle of each cell. I found out that one can use \dontleavehmode\externalfigure to force alignment, which als works. But when I use \dontleave... the graphic isn't being placed perfectly in the middle but slightly a little bit more to the top of the cell. It's not a real problem for me but since everything looks great in the document, the slightly to the top moved graphics bother me somehow. Does anybody know a workaround maybe?
Greets, Sebastian
mwe...
-- luigi
___________________________________________________________________________________ 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 ___________________________________________________________________________________
ah ok! I am sorry Luigi, I didn't expect that. :D code is below; I also packed a ZIP file with this mail, with the correct graphics folder, *.tex and precompiled *.pdf, in case that the code isn't enough. but i checked the graphics, they are perfectly aligned on the canvas, so they shouldn't be the problem. Greets, Seba --------------------------------------------- \define\AND{\wedge} \define\OR{\vee} \define\NOT{\overbar} \starttext \placetable[here][Logikgatter]{Logikgatter} {\bTABLE \setupTABLE[offset=1mm,align={middle,lohi}] \setupTABLE[r][1][style=bold] \bTR \bTD Name \eTD \bTD Bezeichnung \eTD \bTD Gleichung \eTD \bTD Funktionsbaustein \eTD \eTR \bTR \bTD NOT \eTD \bTD nicht \eTD \bTD $Y=\NOT{A}$ \eTD \bTD \dontleavehmode\externalfigure[PX/NOT.png][width=50px] \eTD \eTR \bTR \bTD AND \eTD \bTD und \eTD \bTD $Y=A \AND B$ \eTD \bTD \dontleavehmode\externalfigure[PX/AND.png][width=50px] \eTD \eTR \bTR \bTD OR \eTD \bTD oder \eTD \bTD $Y=A \OR B$ \eTD \bTD \dontleavehmode\externalfigure[PX/OR.png][width=50px] \eTD \eTR \bTR \bTD NAND \eTD \bTD nicht und \eTD \bTD $Y=\NOT{A \AND B}$ \eTD \bTD \dontleavehmode\externalfigure[PX/NAND.png][width=50px] \eTD \eTR \bTR \bTD NOR \eTD \bTD nicht oder \eTD \bTD $Y=\NOT{A \OR B}$ \eTD \bTD \dontleavehmode\externalfigure[PX/NOR.png][width=50px] \eTD \eTR \bTR \bTD XOR \eTD \bTD entweder oder \eTD \bTD $Y=(\NOT{A} \AND B) \OR (A \AND \NOT{B})$ \eTD \bTD \dontleavehmode\externalfigure[PX/XOR.png][width=50px] \eTD \eTR \bTR \bTD XNOR \eTD \bTD nicht entweder oder \eTD \bTD $Y=\NOT{(\NOT{A} \AND B) \OR (A \AND \NOT{B})}$ \eTD \bTD \dontleavehmode\externalfigure[PX/XNOR.png][width=50px] \eTD \eTR \eTABLE} \stoptext --------------------------------------------- Am 17.05.2016 um 21:50 schrieb luigi scarso:
On Tue, May 17, 2016 at 9:44 PM, L.S.-Soc&Gam
mailto:axteffekt@gmail.com> wrote: Hi Luigi,
I am afraid that "mwe..." doesn't help.
a minimal working example (a.k.a mwe) that show your problem.
-- luigi
___________________________________________________________________________________ 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 ___________________________________________________________________________________
L.S.-Soc&Gam mailto:axteffekt@gmail.com 17. Mai 2016 um 22:22 ah ok! I am sorry Luigi, I didn't expect that. :D
code is below; I also packed a ZIP file with this mail, with the correct graphics folder, *.tex and precompiled *.pdf, in case that the code isn't enough. but i checked the graphics, they are perfectly aligned on the canvas, so they shouldn't be the problem. Add
\setupTABLE[c][4][strut=no] at the begin of your table. Wolfgang
Add
\setupTABLE[c][4][strut=no]
at the begin of your table.
Wolfgang
___________________________________________________________________________________ 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 ___________________________________________________________________________________
And of course it works. Danke sehr Wolfgang. Cheers, Seba
participants (4)
-
cryo shock
-
L.S.-Soc&Gam
-
luigi scarso
-
Wolfgang Schuster