3

I am trying something like a table, where I have an ID(identification) and the url. It looks like this:

ID     url

I16 \url{https://randr.nist.gov/enzyme/DataDetails.aspx?ID=72WUR/HES_1276&finalterm=5.1.3.15&data=enzyme}

I1  \url{https://randr.nist.gov/enzyme/DataDetails.aspx?ID=97STA/SUA_1365&finalterm=Reaction:\%20\%20D-glucose\%206-phosphate(aq)\%20=\%20D-fructose\%206-phosphate(aq)&data=enzyme}

I2  \url{https://randr.nist.gov/enzyme/DataDetails.aspx?ID=88LIM/RAI_1287&finalterm=D-glyceraldehyde\%203-phosphate(aq)\%20=\%20glycerone\%20phosphate(aq)&data=enzyme}

Is it possible to make ID, I16, I1,.. to be align? I have tried with a table but was impossible.

0

2 Answers 2

4

Using a tabularx environment, along with a version of the X column type that doesn't perform full justification, should do the job. Do be sure, though, to load the url package with the options hyphens, spaces, and obeyspaces.

enter image description here

% (parts of preamble copied from OP's earlier postings)
\documentclass[12pt,twoside]{report}
\usepackage[headheight=18pt,a4paper, width=150mm,top=25mm, bottom=25mm, 
    bindingoffset=6mm,headsep=18pt]{geometry}
\usepackage[spanish,es-noquoting]{babel}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}

\usepackage{tabularx,ragged2e,booktabs}
\newcolumntype{L}{>{\RaggedRight\arraybackslash}X}
\usepackage[hyphens,spaces,obeyspaces]{url}
\usepackage[colorlinks,urlcolor=black]{hyperref} % optional

\begin{document}
\noindent
\begin{tabularx}{\textwidth}{@{} lL @{}}
\toprule 
ID & URL 
\\ \midrule
I16 &
\url{https://randr.nist.gov/enzyme/DataDetails.aspx?ID=72WUR/HES_1276&finalterm=5.1.3.15&data=enzyme}
\\ \addlinespace
I1  &
\url{https://randr.nist.gov/enzyme/DataDetails.aspx?ID=97STA/SUA_1365&finalterm=Reaction:\%20\%20D-glucose\%206-phosphate(aq)\%20=\%20D-fructose\%206-phosphate(aq)&data=enzyme}
\\ \addlinespace
I2  &
\url{https://randr.nist.gov/enzyme/DataDetails.aspx?ID=88LIM/RAI_1287&finalterm=D-glyceraldehyde\%203-phosphate(aq)\%20=\%20glycerone\%20phosphate(aq)&data=enzyme}
\\ \bottomrule 
\end{tabularx}
\end{document}
2
  • 1
    very cool! I will probably accept but please don't forget to upload ss later!
    – user134500
    Sep 27, 2017 at 8:18
  • @HernanMiraola - Added a screenshot
    – Mico
    Sep 27, 2017 at 16:54
5

Table

In my opinion, those links are way too long to show them in their full length unless you explicitly need them written out like that. I assume you are already using the hyperref package (due to the \url), so I suggest using the \href command instead, like the following example (note that you can always change the colours of the links, i left the default boxes in to make it clear that they are links). It makes the links compact, yet still contain the full URL (mousing over in PDF output will show it):

\documentclass{report}
\usepackage{hyperref}
\usepackage{booktabs}

\begin{document}

\begin{table}
\begin{tabular}{l l}
\toprule
ID & Link\\
\midrule
I16 & \href{https://randr.nist.gov/enzyme/DataDetails.aspx?ID=72WUR/HES_1276&finalterm=5.1.3.15&data=enzyme}{randr.nist.gov}\\
I1 & \href{https://randr.nist.gov/enzyme/DataDetails.aspx?ID=97STA/SUA_1365&finalterm=Reaction:\%20\%20D-glucose\%206-phosphate(aq)\%20=\%20D-fructose\%206-phosphate(aq)&data=enzyme}{randr.nist.gov}\\
I2 & \href{https://randr.nist.gov/enzyme/DataDetails.aspx?ID=88LIM/RAI_1287&finalterm=D-glyceraldehyde\%203-phosphate(aq)\%20=\%20glycerone\%20phosphate(aq)&data=enzyme}{randr.nist.gov}\\
\bottomrule
\end{tabular}
\end{table}

\end{document}

enter image description here


Line

In fact, I even suggest not using a table at all. The \href command makes it easy to create these links in a single line. This might suite your tastes better:

\documentclass{report}
\usepackage{hyperref}

\begin{document}

(...) and the details of each ID can be found by clicking on them, bringing you to the randr.nist.gov site:
\href{https://randr.nist.gov/enzyme/DataDetails.aspx?ID=72WUR/HES_1276&finalterm=5.1.3.15&data=enzyme}{I16},
\href{https://randr.nist.gov/enzyme/DataDetails.aspx?ID=97STA/SUA_1365&finalterm=Reaction:\%20\%20D-glucose\%206-phosphate(aq)\%20=\%20D-fructose\%206-phosphate(aq)&data=enzyme}{I1}
and \href{https://randr.nist.gov/enzyme/DataDetails.aspx?ID=88LIM/RAI_1287&finalterm=D-glyceraldehyde\%203-phosphate(aq)\%20=\%20glycerone\%20phosphate(aq)&data=enzyme}{I2}.

\end{document}

enter image description here

1
  • great, I think I will use both answers. Thanks..
    – user134500
    Sep 27, 2017 at 8:45

You must log in to answer this question.