> For the complete documentation index, see [llms.txt](https://overleaf-pro.ayaka.space/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://overleaf-pro.ayaka.space/latex/overleaf-learn-latex-pt/artigos-aprofundados/02-a-quick-visual-guide-to-creating-table-cells-with-diagonal-lines-in-latex.md).

# Um guia visual rápido para criar células de tabela com linhas diagonais em LaTeX

Há muitos pacotes em LaTeX que ajudam na criação de tabelas – [booktabs](https://www.ctan.org/pkg/booktabs) é um exemplo popular — e também há um número crescente de geradores automáticos de tabelas agora disponíveis online (como [este](https://www.tablesgenerator.com/)) que são uma ótima forma de criar o código LaTeX para uma tabela sem ter de o escrever manualmente. Há até um pacote para ajudar a criar [tabelas realmente longas](https://www.overleaf.com/read/xxwzfxkxxjmc) que se estendem por várias páginas! Mas e se quiser adicionar alguma formatação ou estilo adicionais a certas células nas suas tabelas?

A resposta simples é que normalmente existe um pacote para isso! Aqui concentramo-nos numa peça específica de formatação de células — como criar células de tabela com linhas diagonais. Estas linhas diagonais são frequentemente usadas no canto superior esquerdo de uma tabela para permitir que os cabeçalhos de linha e de coluna sejam colocados na mesma célula, e há dois pacotes semelhantes que podem ser usados para conseguir isto: `slashbox` e `diagbox`.

Para o ajudar a experimentar isto, adicionámos [um pequeno exemplo](https://www.overleaf.com/read/zrnpkbmzvtk) que demonstra como produzir linhas diagonais em células de tabela usando esses pacotes. Algumas pessoas preferem usar `diagbox` porque as linhas produzidas por `slashbox` podem ser mais irregulares, enquanto as `diagbox` linhas são mais suaves; no entanto, incluímos opções para ambos no exemplo para que possa decidir por si!

Além disso, gravámos um GIF animado mostrando como adicionar o ficheiro `slashbox.sty` ao seu projeto diretamente a partir do repositório CTAN.

![Utilizar os pacotes LaTeX slashbox e diagbox para tabelas no Overleaf](/files/da00318335e84457f3a3bbfc50a62307b8e82f82)

Esperamos que isto ajude, e se quiser ver mais tutoriais em GIF animado, por favor [diga-nos](https://www.overleaf.com/contact).


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://overleaf-pro.ayaka.space/latex/overleaf-learn-latex-pt/artigos-aprofundados/02-a-quick-visual-guide-to-creating-table-cells-with-diagonal-lines-in-latex.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
